mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-30 16:50:00 +02:00
new qunit
This commit is contained in:
@@ -157,16 +157,15 @@ $(function () {
|
||||
test('should trigger hide event once when clicking outside of modal-content', function () {
|
||||
stop()
|
||||
$.support.transition = false
|
||||
var div = $('<div id="modal-test"><div class="contents"></div></div>')
|
||||
|
||||
var triggered
|
||||
var div = $('<div id="modal-test"><div class="contents"></div></div>')
|
||||
|
||||
div
|
||||
.bind('shown.bs.modal', function () {
|
||||
triggered = 0
|
||||
$('#modal-test').click()
|
||||
})
|
||||
.one('hidden.bs.modal', function () {
|
||||
div.modal('show')
|
||||
})
|
||||
.bind('hide.bs.modal', function () {
|
||||
triggered += 1
|
||||
ok(triggered === 1, 'modal hide triggered once')
|
||||
|
@@ -73,11 +73,14 @@ $(function () {
|
||||
'</ul>'
|
||||
|
||||
$(dropHTML).find('ul>li:first a').tab('show').end()
|
||||
.find('ul>li:last a').on('show', function (event) {
|
||||
.find('ul>li:last a')
|
||||
.on('show.bs.tab', function (event) {
|
||||
equal(event.relatedTarget.hash, '#1-1')
|
||||
}).on('shown', function (event) {
|
||||
})
|
||||
.on('show.bs.tab', function (event) {
|
||||
equal(event.relatedTarget.hash, '#1-1')
|
||||
}).tab('show')
|
||||
})
|
||||
.tab('show')
|
||||
})
|
||||
|
||||
})
|
||||
|
@@ -387,6 +387,8 @@ $(function () {
|
||||
})
|
||||
|
||||
test('tooltips should be placed dynamically, with the dynamic placement option', function () {
|
||||
$(document.body).scrollTop(0) // force to top of page
|
||||
|
||||
$.support.transition = false
|
||||
var ttContainer = $('<div id="dynamic-tt-test"/>').css({
|
||||
'height' : 400,
|
||||
@@ -402,7 +404,6 @@ $(function () {
|
||||
.tooltip({placement: 'auto'})
|
||||
.tooltip('show')
|
||||
|
||||
|
||||
ok($('.tooltip').is('.bottom'), 'top positioned tooltip is dynamically positioned bottom')
|
||||
|
||||
topTooltip.tooltip('hide')
|
||||
|
@@ -1,13 +0,0 @@
|
||||
$(function () {
|
||||
|
||||
module('transition')
|
||||
|
||||
test('should be defined on jquery support object', function () {
|
||||
ok($.support.transition !== undefined, 'transition object is defined')
|
||||
})
|
||||
|
||||
test('should provide an end object', function () {
|
||||
ok($.support.transition ? $.support.transition.end : true, 'end string is defined')
|
||||
})
|
||||
|
||||
})
|
Reference in New Issue
Block a user