equal($('.tooltip').children('.tooltip-inner').text(),'Simple tooltip','title is set from title attribute while preferred over title option')
assert.strictEqual($('.tooltip').children('.tooltip-inner').text(),'Simple tooltip','title is set from title attribute while preferred over title option')
$tooltip.bootstrapTooltip('hide')
equal($('.tooltip').length,0,'tooltip removed from dom')
assert.strictEqual($('.tooltip').length,0,'tooltip removed from dom')
})
test('should use title option',function(){
QUnit.test('should use title option',function(assert){
var$tooltip=$('<a href="#" rel="tooltip"/>')
.appendTo('#qunit-fixture')
.bootstrapTooltip({
...
...
@@ -329,13 +329,13 @@ $(function () {
})
$tooltip.bootstrapTooltip('show')
equal($('.tooltip').children('.tooltip-inner').text(),'This is a tooltip with some content','title from title option is set')
assert.strictEqual($('.tooltip').children('.tooltip-inner').text(),'This is a tooltip with some content','title from title option is set')
$tooltip.bootstrapTooltip('hide')
equal($('.tooltip').length,0,'tooltip removed from dom')
assert.strictEqual($('.tooltip').length,0,'tooltip removed from dom')
})
test('should be placed dynamically with the dynamic placement option',function(){
QUnit.test('should be placed dynamically with the dynamic placement option',function(assert){
equal($('.tooltip').length,0,'tooltip removed from dom')
assert.strictEqual($('.tooltip').length,0,'tooltip removed from dom')
$styles.remove()
})
test('should display the tip on bottom whenever scrollable viewport doesn\'t have enough room if the given placement is "auto top"',function(){
QUnit.test('should display the tip on bottom whenever scrollable viewport doesn\'t have enough room if the given placement is "auto top"',function(assert){
equal($('.tooltip').length,0,'tooltip removed from dom')
assert.strictEqual($('.tooltip').length,0,'tooltip removed from dom')
$styles.remove()
})
test('should display the tip on top whenever scrollable viewport doesn\'t have enough room if the given placement is "auto bottom"',function(){
QUnit.test('should display the tip on top whenever scrollable viewport doesn\'t have enough room if the given placement is "auto bottom"',function(assert){