Sha256: 69e24764aea7d6a4f26f6653ab802a6d618e017bb0fe072382c712deb612d09e
Contents?: true
Size: 1.33 KB
Versions: 23
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).toBeAround(linkBox.top - tooltipBox.height, 15) expect(tooltipBox.left).toBeAround(linkBox.left + 0.5 * (linkBox.width - tooltipBox.width), 15) it 'allows HTML for the tooltip text' it 'closes an existing tooltip' describe 'with position 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
23 entries across 23 versions & 1 rubygems