Sha256: cb0b9bf6b9b0c1afb4b00f5303efa45765613d67d257814cc10d14e25182b13a

Contents?: true

Size: 899 Bytes

Versions: 2

Compression:

Stored size: 899 Bytes

Contents

describe 'Offcanvas', ->

  it 'Streusel.Offcanvas exist', ->
    expect(Streusel.Offcanvas).toBeDefined()

  describe 'Readmore object', ->

    beforeEach ->
      @el = affix('[data-streusel-offcanvas] .js-offcanvas__toggler+.offcanvas__overlay')
      @subject = Partystreusel.Offcanvas.init()[0]

    it 'toggles correcty with togger', ->
      expect(@el).not.toHaveClass('offcanvas--open')
      $('.js-offcanvas__toggler').trigger('click')
      expect(@el).toHaveClass('offcanvas--open')
      $('.js-offcanvas__toggler').trigger('click')
      expect(@el).not.toHaveClass('offcanvas--open')

    it 'closes correctly with overlay', ->
      expect(@el).not.toHaveClass('offcanvas--open')
      $('.js-offcanvas__toggler').trigger('click')
      expect(@el).toHaveClass('offcanvas--open')
      $('.offcanvas__overlay').trigger('click')
      expect(@el).not.toHaveClass('offcanvas--open')

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
partystreusel-1.1.0pre2 spec/javascripts/partystreusel/offcanvas_spec.js.coffee
partystreusel-1.1.0pre1 spec/javascripts/partystreusel/offcanvas_spec.js.coffee