Sha256: 55d5cfb8c0f8bd777dd03ab857b2caa8bb80ff7bdf445efd23a1d753e922267b

Contents?: true

Size: 1.32 KB

Versions: 57

Compression:

Stored size: 1.32 KB

Contents

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

describe "card-form", ->
  beforeEach ->
    jasmine.getFixtures().fixturesPath = '../../public/assets/jasmine'
    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

57 entries across 57 versions & 1 rubygems

Version Path
wagn-1.21.1 spec/javascripts/wagn_spec.coffee
wagn-1.21.0 spec/javascripts/wagn_spec.coffee
wagn-1.20.4 spec/javascripts/wagn_spec.coffee
wagn-1.20.3 spec/javascripts/wagn_spec.coffee
wagn-1.20.2 spec/javascripts/wagn_spec.coffee
wagn-1.20.1 spec/javascripts/wagn_spec.coffee
wagn-1.20.0 spec/javascripts/wagn_spec.coffee
wagn-1.19.6 spec/javascripts/wagn_spec.coffee
wagn-1.19.5 spec/javascripts/wagn_spec.coffee
wagn-1.19.4 spec/javascripts/wagn_spec.coffee
wagn-1.19.3 spec/javascripts/wagn_spec.coffee
wagn-1.19.2 spec/javascripts/wagn_spec.coffee
wagn-1.19.1 spec/javascripts/wagn_spec.coffee
wagn-1.19.0 spec/javascripts/wagn_spec.coffee
wagn-1.18.6 spec/javascripts/wagn_spec.coffee
wagn-1.18.5 spec/javascripts/wagn_spec.coffee
wagn-1.18.4 spec/javascripts/wagn_spec.coffee
wagn-1.18.3 spec/javascripts/wagn_spec.coffee
wagn-1.18.2 spec/javascripts/wagn_spec.coffee
wagn-1.18.1 spec/javascripts/wagn_spec.coffee