Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
bootstrap
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
bootstrap
Commits
0bc458df
Commit
0bc458df
authored
Jan 16, 2012
by
William Oliveira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Creating asynchronous tests for loading buttons, because they have setTimeout() function
parent
52171316
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
4 deletions
+12
-4
js/tests/unit/bootstrap-buttons.js
js/tests/unit/bootstrap-buttons.js
+12
-4
No files found.
js/tests/unit/bootstrap-buttons.js
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
'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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