Sha256: b9412596835f132b032ccc985a462a3e515c4a43c2474ef5fc260fba36b5db0d

Contents?: true

Size: 1.25 KB

Versions: 19

Compression:

Stored size: 1.25 KB

Contents

describe "Global Wagn variable", ->
  it "should be defined", ->
    expect(wagn).toBeDefined

describe "card-form", ->
  beforeEach ->
    loadFixtures('card_form.html')

  it "should find a form", ->
    expect($('form')).toBeDefined

  it "should be able to populate the content field based on nearby selector", ->
    $('.tinymce-textarea').setContentField -> 1+2
    expect($('.card-content')).toHaveValue '3'

  it "should be able to populate all content fields in a form", ->
    $('form').setContentFields '.tinymce-textarea', -> 2+2
    expect($('.card-content')).toHaveValue '4'

  it "should be able to populate content fields from a map", ->
    $('form').setContentFieldsFromMap { '.tinymce-textarea': -> 3+2 }
    expect($('.card-content')).toHaveValue '5'

  it "should be able to find the slot from any element within", ->
    expect($('.card-content').slot()).toHaveClass 'card-slot'

  it "should be able to populate slot from any element within", ->
    $('.card-content').setSlotContent '<div class="card-slot">whoopee</div>'
    expect($('.card-slot')).toHaveHtml 'whoopee'


###
describe "tiny-mce", ->
  beforeEach ->
    loadFixtures('card_form.html')

  it 'should load', ->
    wagn.initializeTinyMCE
    expect($('form')).toContain('.mceEditor')
###

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
wagn-1.14.4 spec/javascripts/wagn_spec.coffee
wagn-1.14.3 spec/javascripts/wagn_spec.coffee
wagn-1.14.2 spec/javascripts/wagn_spec.coffee
wagn-1.14.1 spec/javascripts/wagn_spec.coffee
wagn-1.14.0 spec/javascripts/wagn_spec.coffee
wagn-1.14.0.pre3 spec/javascripts/wagn_spec.coffee
wagn-1.14.0.pre2 spec/javascripts/wagn_spec.coffee
wagn-1.14.0.pre1 spec/javascripts/wagn_spec.coffee
wagn-1.13.0 spec/javascripts/wagn_spec.coffee
wagn-1.13.0.pre2 spec/javascripts/wagn_spec.coffee
wagn-1.13.0.pre1 spec/javascripts/wagn_spec.coffee
wagn-1.13.0.pre spec/javascripts/wagn_spec.coffee
wagn-1.12.13 spec/javascripts/wagn_spec.coffee
wagn-1.12.12 spec/javascripts/wagn_spec.coffee
wagn-1.12.11 spec/javascripts/wagn_spec.coffee
wagn-1.12.10 spec/javascripts/wagn_spec.coffee
wagn-1.12.9 spec/javascripts/wagn_spec.coffee
wagn-1.12.8 spec/javascripts/wagn_spec.coffee
wagn-1.12.7 spec/javascripts/wagn_spec.coffee