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
7b24f3c4
Commit
7b24f3c4
authored
Oct 25, 2013
by
Chris Rebert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
QUnit.equals() is deprecated; use QUnit.equal() instead
parent
f2f70a4a
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
18 deletions
+18
-18
js/tests/unit/button.js
js/tests/unit/button.js
+5
-5
js/tests/unit/popover.js
js/tests/unit/popover.js
+6
-6
js/tests/unit/tab.js
js/tests/unit/tab.js
+6
-6
js/tests/unit/tooltip.js
js/tests/unit/tooltip.js
+1
-1
No files found.
js/tests/unit/button.js
View file @
7b24f3c4
...
...
@@ -18,9 +18,9 @@ $(function () {
test
(
"
should return set state to loading
"
,
function
()
{
var
btn
=
$
(
'
<button class="btn" data-loading-text="fat">mdo</button>
'
)
equal
s
(
btn
.
html
(),
'
mdo
'
,
'
btn text equals mdo
'
)
equal
(
btn
.
html
(),
'
mdo
'
,
'
btn text equals mdo
'
)
btn
.
button
(
'
loading
'
)
equal
s
(
btn
.
html
(),
'
fat
'
,
'
btn text equals fat
'
)
equal
(
btn
.
html
(),
'
fat
'
,
'
btn text equals fat
'
)
stop
()
setTimeout
(
function
()
{
ok
(
btn
.
attr
(
'
disabled
'
),
'
btn is disabled
'
)
...
...
@@ -31,9 +31,9 @@ $(function () {
test
(
"
should return reset state
"
,
function
()
{
var
btn
=
$
(
'
<button class="btn" data-loading-text="fat">mdo</button>
'
)
equal
s
(
btn
.
html
(),
'
mdo
'
,
'
btn text equals mdo
'
)
equal
(
btn
.
html
(),
'
mdo
'
,
'
btn text equals mdo
'
)
btn
.
button
(
'
loading
'
)
equal
s
(
btn
.
html
(),
'
fat
'
,
'
btn text equals fat
'
)
equal
(
btn
.
html
(),
'
fat
'
,
'
btn text equals fat
'
)
stop
()
setTimeout
(
function
()
{
ok
(
btn
.
attr
(
'
disabled
'
),
'
btn is disabled
'
)
...
...
@@ -41,7 +41,7 @@ $(function () {
start
()
stop
()
btn
.
button
(
'
reset
'
)
equal
s
(
btn
.
html
(),
'
mdo
'
,
'
btn text equals mdo
'
)
equal
(
btn
.
html
(),
'
mdo
'
,
'
btn text equals mdo
'
)
setTimeout
(
function
()
{
ok
(
!
btn
.
attr
(
'
disabled
'
),
'
btn is not disabled
'
)
ok
(
!
btn
.
hasClass
(
'
disabled
'
),
'
btn does not have disabled class
'
)
...
...
js/tests/unit/popover.js
View file @
7b24f3c4
...
...
@@ -53,8 +53,8 @@ $(function () {
popover
.
popover
(
'
show
'
)
ok
(
$
(
'
.popover
'
).
length
,
'
popover was inserted
'
)
equal
s
(
$
(
'
.popover .popover-title
'
).
text
(),
'
@fat
'
,
'
title correctly inserted
'
)
equal
s
(
$
(
'
.popover .popover-content
'
).
text
(),
'
loves writing tests (╯°□°)╯︵ ┻━┻
'
,
'
content correctly inserted
'
)
equal
(
$
(
'
.popover .popover-title
'
).
text
(),
'
@fat
'
,
'
title correctly inserted
'
)
equal
(
$
(
'
.popover .popover-content
'
).
text
(),
'
loves writing tests (╯°□°)╯︵ ┻━┻
'
,
'
content correctly inserted
'
)
popover
.
popover
(
'
hide
'
)
ok
(
!
$
(
'
.popover
'
).
length
,
'
popover was removed
'
)
...
...
@@ -69,8 +69,8 @@ $(function () {
.
popover
(
'
show
'
)
ok
(
$
(
'
.popover
'
).
length
,
'
popover was inserted
'
)
equal
s
(
$
(
'
.popover .popover-title
'
).
text
(),
'
@mdo
'
,
'
title correctly inserted
'
)
equal
s
(
$
(
'
.popover .popover-content
'
).
text
(),
"
loves data attributes (づ。◕‿‿◕。)づ ︵ ┻━┻
"
,
'
content correctly inserted
'
)
equal
(
$
(
'
.popover .popover-title
'
).
text
(),
'
@mdo
'
,
'
title correctly inserted
'
)
equal
(
$
(
'
.popover .popover-content
'
).
text
(),
"
loves data attributes (づ。◕‿‿◕。)づ ︵ ┻━┻
"
,
'
content correctly inserted
'
)
popover
.
popover
(
'
hide
'
)
ok
(
!
$
(
'
.popover
'
).
length
,
'
popover was removed
'
)
...
...
@@ -89,8 +89,8 @@ $(function () {
.
popover
(
'
show
'
)
ok
(
$
(
'
.popover
'
).
length
,
'
popover was inserted
'
)
equal
s
(
$
(
'
.popover .popover-title
'
).
text
(),
'
@mdo
'
,
'
title correctly inserted
'
)
equal
s
(
$
(
'
.popover .popover-content
'
).
text
(),
"
loves data attributes (づ。◕‿‿◕。)づ ︵ ┻━┻
"
,
'
content correctly inserted
'
)
equal
(
$
(
'
.popover .popover-title
'
).
text
(),
'
@mdo
'
,
'
title correctly inserted
'
)
equal
(
$
(
'
.popover .popover-content
'
).
text
(),
"
loves data attributes (づ。◕‿‿◕。)づ ︵ ┻━┻
"
,
'
content correctly inserted
'
)
popover
.
popover
(
'
hide
'
)
ok
(
!
$
(
'
.popover
'
).
length
,
'
popover was removed
'
)
...
...
js/tests/unit/tab.js
View file @
7b24f3c4
...
...
@@ -26,10 +26,10 @@ $(function () {
$
(
'
<ul><li id="home"></li><li id="profile"></li></ul>
'
).
appendTo
(
"
#qunit-fixture
"
)
$
(
tabsHTML
).
find
(
'
li:last a
'
).
tab
(
'
show
'
)
equal
s
(
$
(
"
#qunit-fixture
"
).
find
(
'
.active
'
).
attr
(
'
id
'
),
"
profile
"
)
equal
(
$
(
"
#qunit-fixture
"
).
find
(
'
.active
'
).
attr
(
'
id
'
),
"
profile
"
)
$
(
tabsHTML
).
find
(
'
li:first a
'
).
tab
(
'
show
'
)
equal
s
(
$
(
"
#qunit-fixture
"
).
find
(
'
.active
'
).
attr
(
'
id
'
),
"
home
"
)
equal
(
$
(
"
#qunit-fixture
"
).
find
(
'
.active
'
).
attr
(
'
id
'
),
"
home
"
)
})
test
(
"
should activate element by tab id
"
,
function
()
{
...
...
@@ -42,10 +42,10 @@ $(function () {
$
(
'
<ul><li id="home"></li><li id="profile"></li></ul>
'
).
appendTo
(
"
#qunit-fixture
"
)
$
(
pillsHTML
).
find
(
'
li:last a
'
).
tab
(
'
show
'
)
equal
s
(
$
(
"
#qunit-fixture
"
).
find
(
'
.active
'
).
attr
(
'
id
'
),
"
profile
"
)
equal
(
$
(
"
#qunit-fixture
"
).
find
(
'
.active
'
).
attr
(
'
id
'
),
"
profile
"
)
$
(
pillsHTML
).
find
(
'
li:first a
'
).
tab
(
'
show
'
)
equal
s
(
$
(
"
#qunit-fixture
"
).
find
(
'
.active
'
).
attr
(
'
id
'
),
"
home
"
)
equal
(
$
(
"
#qunit-fixture
"
).
find
(
'
.active
'
).
attr
(
'
id
'
),
"
home
"
)
})
...
...
@@ -77,9 +77,9 @@ $(function () {
$
(
dropHTML
).
find
(
'
ul>li:first a
'
).
tab
(
'
show
'
).
end
()
.
find
(
'
ul>li:last a
'
).
on
(
'
show
'
,
function
(
event
){
equal
s
(
event
.
relatedTarget
.
hash
,
"
#1-1
"
)
equal
(
event
.
relatedTarget
.
hash
,
"
#1-1
"
)
}).
on
(
'
shown
'
,
function
(
event
){
equal
s
(
event
.
relatedTarget
.
hash
,
"
#1-1
"
)
equal
(
event
.
relatedTarget
.
hash
,
"
#1-1
"
)
}).
tab
(
'
show
'
)
})
...
...
js/tests/unit/tooltip.js
View file @
7b24f3c4
...
...
@@ -29,7 +29,7 @@ $(function () {
test
(
"
should add data attribute for referencing original title
"
,
function
()
{
var
tooltip
=
$
(
'
<a href="#" rel="tooltip" title="Another tooltip"></a>
'
).
tooltip
()
equal
s
(
tooltip
.
attr
(
'
data-original-title
'
),
'
Another tooltip
'
,
'
original title preserved in data attribute
'
)
equal
(
tooltip
.
attr
(
'
data-original-title
'
),
'
Another tooltip
'
,
'
original title preserved in data attribute
'
)
})
test
(
"
should place tooltips relative to placement option
"
,
function
()
{
...
...
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