aboutsummaryrefslogtreecommitdiff
path: root/js/tests/unit/button.js
diff options
context:
space:
mode:
authorHeinrich Fenkart <[email protected]>2014-10-29 04:28:22 +0100
committerHeinrich Fenkart <[email protected]>2014-10-29 04:28:22 +0100
commite851b8685a13ee4c8ab79ca517dcdbb49c891b9a (patch)
treec26f1704482184f9dcb3dc8f376cb7c5cdfaa84b /js/tests/unit/button.js
parent2aac61ed175164fdc885573a0ca0d49306d20851 (diff)
parentc207b5b66b2f41472b706b9e37557c6105eb1a80 (diff)
downloadbootstrap-e851b8685a13ee4c8ab79ca517dcdbb49c891b9a.tar.xz
bootstrap-e851b8685a13ee4c8ab79ca517dcdbb49c891b9a.zip
Merge pull request #14457 from hnrch02/button-set-val-after-event-loop
Change value of stateful button after event loop
Diffstat (limited to 'js/tests/unit/button.js')
-rw-r--r--js/tests/unit/button.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/js/tests/unit/button.js b/js/tests/unit/button.js
index 73747cdd4..320996483 100644
--- a/js/tests/unit/button.js
+++ b/js/tests/unit/button.js
@@ -33,9 +33,9 @@ $(function () {
var $btn = $('<button class="btn" data-loading-text="fat">mdo</button>')
equal($btn.html(), 'mdo', 'btn text equals mdo')
$btn.bootstrapButton('loading')
- equal($btn.html(), 'fat', 'btn text equals fat')
stop()
setTimeout(function () {
+ equal($btn.html(), 'fat', 'btn text equals fat')
ok($btn[0].hasAttribute('disabled'), 'btn is disabled')
ok($btn.hasClass('disabled'), 'btn has disabled class')
start()
@@ -46,16 +46,16 @@ $(function () {
var $btn = $('<button class="btn" data-loading-text="fat">mdo</button>')
equal($btn.html(), 'mdo', 'btn text equals mdo')
$btn.bootstrapButton('loading')
- equal($btn.html(), 'fat', 'btn text equals fat')
stop()
setTimeout(function () {
+ equal($btn.html(), 'fat', 'btn text equals fat')
ok($btn[0].hasAttribute('disabled'), 'btn is disabled')
ok($btn.hasClass('disabled'), 'btn has disabled class')
start()
stop()
$btn.bootstrapButton('reset')
- equal($btn.html(), 'mdo', 'btn text equals mdo')
setTimeout(function () {
+ equal($btn.html(), 'mdo', 'btn text equals mdo')
ok(!$btn[0].hasAttribute('disabled'), 'btn is not disabled')
ok(!$btn.hasClass('disabled'), 'btn does not have disabled class')
start()
@@ -67,16 +67,16 @@ $(function () {
var $btn = $('<button class="btn" data-loading-text="fat"/>')
equal($btn.html(), '', 'btn text equals ""')
$btn.bootstrapButton('loading')
- equal($btn.html(), 'fat', 'btn text equals fat')
stop()
setTimeout(function () {
+ equal($btn.html(), 'fat', 'btn text equals fat')
ok($btn[0].hasAttribute('disabled'), 'btn is disabled')
ok($btn.hasClass('disabled'), 'btn has disabled class')
start()
stop()
$btn.bootstrapButton('reset')
- equal($btn.html(), '', 'btn text equals ""')
setTimeout(function () {
+ equal($btn.html(), '', 'btn text equals ""')
ok(!$btn[0].hasAttribute('disabled'), 'btn is not disabled')
ok(!$btn.hasClass('disabled'), 'btn does not have disabled class')
start()