Sha256: 1b104801b840e325686d845f0774c09f66911d1bcb0687f09b0381882e23d35a

Contents?: true

Size: 1.33 KB

Versions: 10

Compression:

Stored size: 1.33 KB

Contents

describe 'up.tooltip', ->
  
  describe 'Javascript functions', ->
    
    describe 'up.tooltip.open', ->
      
      it 'opens a tooltop above the center of the given element', ->
        $link = affix('span').text('button label')
        $link.css(
          position: 'absolute'
          left: '200px'
          top: '200px'
          width: '50px'
          height: '50px'
        )
        up.tooltip.open($link, html: 'tooltip text')
        $tooltip = $('.up-tooltip')
        expect($tooltip).toBeInDOM()
        expect($tooltip).toHaveText('tooltip text')
        tooltipBox = up.util.measure($tooltip, relative: true)
        linkBox = up.util.measure($link, relative: true)
        expect(tooltipBox.top).toBeCloseTo(linkBox.top - tooltipBox.height, 15)
        expect(tooltipBox.left).toBeCloseTo(linkBox.left + 0.5 * (linkBox.width - tooltipBox.width), 15)
        
      it 'allows HTML for the tooltip text'
        
      it 'closes an existing tooltip'
      
      describe 'with origin option', ->
        
        it 'anchors the tooltip at a different edge of the element'
      
    describe 'up.tooltip.close', ->

      it 'should have tests'
  
  describe 'unobtrusive behavior', ->
    
    describe '[up-tooltip]', ->

      it 'should have tests'
      
    describe 'body', ->
      
      it 'closes a tooltip when clicked'
      

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
upjs-rails-0.5.0 spec_app/spec/javascripts/up/tooltip_spec.js.coffee
upjs-rails-0.4.4 spec_app/spec/javascripts/up/tooltip_spec.js.coffee
upjs-rails-0.4.3 spec_app/spec/javascripts/up/tooltip_spec.js.coffee
upjs-rails-0.4.2 spec_app/spec/javascripts/up/tooltip_spec.js.coffee
upjs-rails-0.4.1 spec_app/spec/javascripts/up/tooltip_spec.js.coffee
upjs-rails-0.4.0 spec_app/spec/javascripts/up/tooltip_spec.js.coffee
upjs-rails-0.3.3 spec_app/spec/javascripts/up/tooltip_spec.js.coffee
upjs-rails-0.3.2 spec_app/spec/javascripts/up/tooltip_spec.js.coffee
upjs-rails-0.3.0 spec_app/spec/javascripts/up/tooltip_spec.js.coffee
upjs-rails-0.2.2 spec_app/spec/javascripts/up/tooltip_spec.js.coffee