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
b23ed1b0
Commit
b23ed1b0
authored
Jun 06, 2014
by
Chris Rebert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
put the tooltips into the DOM in the tooltip unit tests
parent
20c099d4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
4 deletions
+12
-4
js/tests/unit/tooltip.js
js/tests/unit/tooltip.js
+12
-4
No files found.
js/tests/unit/tooltip.js
View file @
b23ed1b0
...
@@ -118,9 +118,11 @@ $(function () {
...
@@ -118,9 +118,11 @@ $(function () {
test
(
'
should fire shown event
'
,
function
()
{
test
(
'
should fire shown event
'
,
function
()
{
stop
()
stop
()
$
(
'
<div title="tooltip title"></div>
'
)
var
tooltip
=
$
(
'
<div title="tooltip title"></div>
'
).
appendTo
(
'
#qunit-fixture
'
)
tooltip
.
on
(
'
shown.bs.tooltip
'
,
function
()
{
.
on
(
'
shown.bs.tooltip
'
,
function
()
{
ok
(
true
,
'
shown was called
'
)
ok
(
true
,
'
shown was called
'
)
tooltip
.
remove
()
start
()
start
()
})
})
.
bootstrapTooltip
(
'
show
'
)
.
bootstrapTooltip
(
'
show
'
)
...
@@ -142,12 +144,14 @@ $(function () {
...
@@ -142,12 +144,14 @@ $(function () {
test
(
'
should fire hide event
'
,
function
()
{
test
(
'
should fire hide event
'
,
function
()
{
stop
()
stop
()
$
(
'
<div title="tooltip title"></div>
'
)
var
tooltip
=
$
(
'
<div title="tooltip title"></div>
'
).
appendTo
(
'
#qunit-fixture
'
)
tooltip
.
on
(
'
shown.bs.tooltip
'
,
function
()
{
.
on
(
'
shown.bs.tooltip
'
,
function
()
{
$
(
this
).
bootstrapTooltip
(
'
hide
'
)
$
(
this
).
bootstrapTooltip
(
'
hide
'
)
})
})
.
on
(
'
hide.bs.tooltip
'
,
function
()
{
.
on
(
'
hide.bs.tooltip
'
,
function
()
{
ok
(
true
,
'
hide was called
'
)
ok
(
true
,
'
hide was called
'
)
tooltip
.
remove
()
start
()
start
()
})
})
.
bootstrapTooltip
(
'
show
'
)
.
bootstrapTooltip
(
'
show
'
)
...
@@ -155,12 +159,14 @@ $(function () {
...
@@ -155,12 +159,14 @@ $(function () {
test
(
'
should fire hidden event
'
,
function
()
{
test
(
'
should fire hidden event
'
,
function
()
{
stop
()
stop
()
$
(
'
<div title="tooltip title"></div>
'
)
var
tooltip
=
$
(
'
<div title="tooltip title"></div>
'
).
appendTo
(
'
#qunit-fixture
'
)
tooltip
.
on
(
'
shown.bs.tooltip
'
,
function
()
{
.
on
(
'
shown.bs.tooltip
'
,
function
()
{
$
(
this
).
bootstrapTooltip
(
'
hide
'
)
$
(
this
).
bootstrapTooltip
(
'
hide
'
)
})
})
.
on
(
'
hidden.bs.tooltip
'
,
function
()
{
.
on
(
'
hidden.bs.tooltip
'
,
function
()
{
ok
(
true
,
'
hidden was called
'
)
ok
(
true
,
'
hidden was called
'
)
tooltip
.
remove
()
start
()
start
()
})
})
.
bootstrapTooltip
(
'
show
'
)
.
bootstrapTooltip
(
'
show
'
)
...
@@ -168,13 +174,15 @@ $(function () {
...
@@ -168,13 +174,15 @@ $(function () {
test
(
'
should not fire hidden event when default prevented
'
,
function
()
{
test
(
'
should not fire hidden event when default prevented
'
,
function
()
{
stop
()
stop
()
$
(
'
<div title="tooltip title"></div>
'
)
var
tooltip
=
$
(
'
<div title="tooltip title"></div>
'
).
appendTo
(
'
#qunit-fixture
'
)
tooltip
.
on
(
'
shown.bs.tooltip
'
,
function
()
{
.
on
(
'
shown.bs.tooltip
'
,
function
()
{
$
(
this
).
bootstrapTooltip
(
'
hide
'
)
$
(
this
).
bootstrapTooltip
(
'
hide
'
)
})
})
.
on
(
'
hide.bs.tooltip
'
,
function
(
e
)
{
.
on
(
'
hide.bs.tooltip
'
,
function
(
e
)
{
e
.
preventDefault
()
e
.
preventDefault
()
ok
(
true
,
'
hide was called
'
)
ok
(
true
,
'
hide was called
'
)
tooltip
.
remove
()
start
()
start
()
})
})
.
on
(
'
hidden.bs.tooltip
'
,
function
()
{
.
on
(
'
hidden.bs.tooltip
'
,
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