2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-06-17 19:21:23 +03:00

Comply to the new rules.

This commit is contained in:
XhmikosR
2017-12-16 14:00:38 +02:00
parent 6d336502c7
commit 80d0943b95
32 changed files with 1798 additions and 1760 deletions
+11 -8
View File
@@ -47,8 +47,7 @@ $(function () {
$el.bootstrapModal()
try {
$el.bootstrapModal('noMethod')
}
catch (err) {
} catch (err) {
assert.strictEqual(err.message, 'No method named "noMethod"')
}
})
@@ -213,7 +212,9 @@ $(function () {
.on('shown.bs.modal', function () {
assert.ok($('#modal-test').length, 'modal inserted into dom')
assert.ok($('#modal-test').is(':visible'), 'modal visible')
$div.trigger($.Event('keydown', { which: 27 }))
$div.trigger($.Event('keydown', {
which: 27
}))
setTimeout(function () {
assert.ok(!$('#modal-test').is(':visible'), 'modal hidden')
@@ -233,7 +234,9 @@ $(function () {
.on('shown.bs.modal', function () {
assert.ok($('#modal-test').length, 'modal inserted into dom')
assert.ok($('#modal-test').is(':visible'), 'modal visible')
$div.trigger($.Event('keyup', { which: 27 }))
$div.trigger($.Event('keyup', {
which: 27
}))
setTimeout(function () {
assert.ok($div.is(':visible'), 'modal still visible')
@@ -289,7 +292,7 @@ $(function () {
$('#close').trigger('click')
})
.one('hidden.bs.modal', function () {
// after one open-close cycle
// After one open-close cycle
assert.ok(!$('#modal-test').is(':visible'), 'modal hidden')
$(this)
.one('shown.bs.modal', function () {
@@ -416,8 +419,8 @@ $(function () {
var originalPadding = $body.css('padding-right')
// Hide scrollbars to prevent the body overflowing
$body.css('overflow', 'hidden') // real scrollbar (for in-browser testing)
$('html').css('padding-right', '0px') // simulated scrollbar (for PhantomJS)
$body.css('overflow', 'hidden') // Real scrollbar (for in-browser testing)
$('html').css('padding-right', '0px') // Simulated scrollbar (for PhantomJS)
$('<div id="modal-test"/>')
.on('shown.bs.modal', function () {
@@ -425,7 +428,7 @@ $(function () {
assert.strictEqual(currentPadding, originalPadding, 'body padding should not be adjusted')
$(this).bootstrapModal('hide')
// restore scrollbars
// Restore scrollbars
$body.css('overflow', 'auto')
$('html').css('padding-right', '16px')
done()