mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-20 12:21:35 +02:00
Swapped out .hasClass() with .is() when checking for multiple classes
This commit is contained in:
14
js/tests/unit/bootstrap-tooltip.js
vendored
14
js/tests/unit/bootstrap-tooltip.js
vendored
@@ -33,7 +33,7 @@ $(function () {
|
|||||||
.tooltip({placement: 'bottom'})
|
.tooltip({placement: 'bottom'})
|
||||||
.tooltip('show')
|
.tooltip('show')
|
||||||
|
|
||||||
ok($(".tooltip").hasClass('fade bottom in'), 'has correct classes applied')
|
ok($(".tooltip").is('.fade.bottom.in'), 'has correct classes applied')
|
||||||
tooltip.tooltip('hide')
|
tooltip.tooltip('hide')
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -69,10 +69,10 @@ $(function () {
|
|||||||
tooltip.trigger('mouseenter')
|
tooltip.trigger('mouseenter')
|
||||||
|
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
ok(!$(".tooltip").hasClass('fade in'), 'tooltip is not faded in')
|
ok(!$(".tooltip").is('.fade.in'), 'tooltip is not faded in')
|
||||||
tooltip.trigger('mouseout')
|
tooltip.trigger('mouseout')
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
ok(!$(".tooltip").hasClass('fade in'), 'tooltip is not faded in')
|
ok(!$(".tooltip").is('.fade.in'), 'tooltip is not faded in')
|
||||||
start()
|
start()
|
||||||
}, 200)
|
}, 200)
|
||||||
}, 100)
|
}, 100)
|
||||||
@@ -104,10 +104,10 @@ $(function () {
|
|||||||
stop()
|
stop()
|
||||||
tooltip.trigger('mouseenter')
|
tooltip.trigger('mouseenter')
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
ok(!$(".tooltip").hasClass('fade in'), 'tooltip is not faded in')
|
ok(!$(".tooltip").is('.fade.in'), 'tooltip is not faded in')
|
||||||
tooltip.trigger('mouseout')
|
tooltip.trigger('mouseout')
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
ok(!$(".tooltip").hasClass('fade in'), 'tooltip is not faded in')
|
ok(!$(".tooltip").is('.fade.in'), 'tooltip is not faded in')
|
||||||
start()
|
start()
|
||||||
}, 100)
|
}, 100)
|
||||||
}, 50)
|
}, 50)
|
||||||
@@ -120,9 +120,9 @@ $(function () {
|
|||||||
stop()
|
stop()
|
||||||
tooltip.trigger('mouseenter')
|
tooltip.trigger('mouseenter')
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
ok(!$(".tooltip").hasClass('fade in'), 'tooltip is not faded in')
|
ok(!$(".tooltip").is('.fade.in'), 'tooltip is not faded in')
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
ok(!$(".tooltip").hasClass('fade in'), 'tooltip has faded in')
|
ok(!$(".tooltip").is('.fade.in'), 'tooltip has faded in')
|
||||||
start()
|
start()
|
||||||
}, 200)
|
}, 200)
|
||||||
}, 100)
|
}, 100)
|
||||||
|
Reference in New Issue
Block a user