From c207b5b66b2f41472b706b9e37557c6105eb1a80 Mon Sep 17 00:00:00 2001 From: Heinrich Fenkart Date: Tue, 26 Aug 2014 03:02:29 +0200 Subject: Change value of stateful button after event loop Fixes #14450 --- js/tests/unit/button.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'js/tests/unit/button.js') diff --git a/js/tests/unit/button.js b/js/tests/unit/button.js index bd431d546..e629918b1 100644 --- a/js/tests/unit/button.js +++ b/js/tests/unit/button.js @@ -33,9 +33,9 @@ $(function () { var $btn = $('') 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 = $('') 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 = $('