Sha256: f747ec89461da9bf31224ce89f7b5f26b01d3c104050df2abba11714f13ec9ab

Contents?: true

Size: 848 Bytes

Versions: 15

Compression:

Stored size: 848 Bytes

Contents

describe 'scrollTo', ->

  it 'function exist', ->
    expect(Partystreusel.scrollTo).toBeDefined()

  describe 'element finding', ->

    it 'scroll to returns false if element could not be found', ->
      expect(Partystreusel.scrollTo('.notexist')).toBe(false)

    it 'scrolls to selector', ->
      affix('.myselector')
      expect(Partystreusel.scrollTo('.myselector')).not.toBe(false)

    it 'scrolls link', ->
      affix('a[name="mylink"]')
      expect(Partystreusel.scrollTo(link: 'mylink')).not.toBe(false)

    it 'scrolls to jquery selection', ->
      tag = affix('a[name="mylink"]')
      expect(Partystreusel.scrollTo(tag)).not.toBe(false)

  describe 'offset', ->

    beforeEach ->
      @tag = affix('.myselector')

    it 'scrolls to jquery element', ->
      #expect(Partystreusel.scrollTo(@tag)[0]).toEqual(@tag[0])
      

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
partystreusel-2.0.0 spec/javascripts/partystreusel/scroll_to_spec.js.coffee
partystreusel-1.2.0 spec/javascripts/partystreusel/scroll_to_spec.js.coffee
partystreusel-1.1.1 spec/javascripts/partystreusel/scroll_to_spec.js.coffee
partystreusel-1.1.0 spec/javascripts/partystreusel/scroll_to_spec.js.coffee
partystreusel-1.1.0pre2 spec/javascripts/partystreusel/scroll_to_spec.js.coffee
partystreusel-1.1.0pre1 spec/javascripts/partystreusel/scroll_to_spec.js.coffee
partystreusel-1.0.8 spec/javascripts/partystreusel/scroll_to_spec.js.coffee
partystreusel-1.0.7 spec/javascripts/partystreusel/scroll_to_spec.js.coffee
partystreusel-1.0.6 spec/javascripts/partystreusel/scroll_to_spec.js.coffee
partystreusel-1.0.5 spec/javascripts/partystreusel/scroll_to_spec.js.coffee
partystreusel-1.0.4 spec/javascripts/partystreusel/scroll_to_spec.js.coffee
partystreusel-1.0.3 spec/javascripts/partystreusel/scroll_to_spec.js.coffee
partystreusel-1.0.2 spec/javascripts/partystreusel/scroll_to_spec.js.coffee
partystreusel-1.0.1 spec/javascripts/partystreusel/scroll_to_spec.js.coffee
partystreusel-1.0.0 spec/javascripts/partystreusel/scroll_to_spec.js.coffee