Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Bootstrap
bootstrap
Commits
0bc458df
Commit
0bc458df
authored
13 years ago
by
William Oliveira
Browse files
Options
Download
Email Patches
Plain Diff
Creating asynchronous tests for loading buttons, because they have setTimeout() function
parent
52171316
1 merge request
!1024
Buttons Tests
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
js/tests/unit/bootstrap-buttons.js
+12
-4
js/tests/unit/bootstrap-buttons.js
with
12 additions
and
4 deletions
+12
-4
js/tests/unit/bootstrap-buttons.js
+
12
-
4
View file @
0bc458df
...
...
@@ -15,8 +15,12 @@ $(function () {
equals
(
btn
.
html
(),
'
mdo
'
,
'
btn text equals mdo
'
)
btn
.
button
(
'
loading
'
)
equals
(
btn
.
html
(),
'
fat
'
,
'
btn text equals fat
'
)
ok
(
btn
.
attr
(
'
disabled
'
),
'
btn is disabled
'
)
ok
(
btn
.
hasClass
(
'
disabled
'
),
'
btn has disabled class
'
)
stop
()
setTimeout
(
function
()
{
start
()
ok
(
btn
.
attr
(
'
disabled
'
),
'
btn is disabled
'
)
ok
(
btn
.
hasClass
(
'
disabled
'
),
'
btn has disabled class
'
)
},
0
)
})
test
(
"
should return reset state
"
,
function
()
{
...
...
@@ -24,8 +28,12 @@ $(function () {
equals
(
btn
.
html
(),
'
mdo
'
,
'
btn text equals mdo
'
)
btn
.
button
(
'
loading
'
)
equals
(
btn
.
html
(),
'
fat
'
,
'
btn text equals fat
'
)
ok
(
btn
.
attr
(
'
disabled
'
),
'
btn is disabled
'
)
ok
(
btn
.
hasClass
(
'
disabled
'
),
'
btn is disabled
'
)
stop
()
setTimeout
(
function
()
{
start
()
ok
(
btn
.
attr
(
'
disabled
'
),
'
btn is disabled
'
)
ok
(
btn
.
hasClass
(
'
disabled
'
),
'
btn is disabled
'
)
},
0
)
btn
.
button
(
'
reset
'
)
equals
(
btn
.
html
(),
'
mdo
'
,
'
btn text equals mdo
'
)
ok
(
!
btn
.
attr
(
'
disabled
'
),
'
btn is not disabled
'
)
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Snippets