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
59f847e8
Commit
59f847e8
authored
Jul 17, 2013
by
fat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixes #7777
parent
8cf04911
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
0 deletions
+36
-0
js/tests/unit/tooltip.js
js/tests/unit/tooltip.js
+36
-0
No files found.
js/tests/unit/tooltip.js
View file @
59f847e8
...
@@ -305,4 +305,40 @@ $(function () {
...
@@ -305,4 +305,40 @@ $(function () {
ok
(
Math
.
round
(
target
.
offset
().
top
+
target
[
0
].
offsetHeight
/
2
-
tooltip
[
0
].
offsetHeight
/
2
)
===
Math
.
round
(
tooltip
.
offset
().
top
)
)
ok
(
Math
.
round
(
target
.
offset
().
top
+
target
[
0
].
offsetHeight
/
2
-
tooltip
[
0
].
offsetHeight
/
2
)
===
Math
.
round
(
tooltip
.
offset
().
top
)
)
target
.
tooltip
(
'
hide
'
)
target
.
tooltip
(
'
hide
'
)
})
})
test
(
"
tooltip title test #1
"
,
function
()
{
var
tooltip
=
$
(
'
<a href="#" rel="tooltip" title="Simple tooltip" style="display: inline-block; position: absolute; top: 0; left: 0;"></a>
'
)
.
appendTo
(
'
#qunit-fixture
'
)
.
tooltip
({
})
.
tooltip
(
'
show
'
)
equal
(
$
(
'
.tooltip
'
).
children
(
'
.tooltip-inner
'
).
text
(),
'
Simple tooltip
'
,
'
title from title attribute is set
'
)
tooltip
.
tooltip
(
'
hide
'
)
ok
(
!
$
(
"
.tooltip
"
).
length
,
'
tooltip removed
'
)
})
test
(
"
tooltip title test #2
"
,
function
()
{
var
tooltip
=
$
(
'
<a href="#" rel="tooltip" title="Simple tooltip" style="display: inline-block; position: absolute; top: 0; left: 0;"></a>
'
)
.
appendTo
(
'
#qunit-fixture
'
)
.
tooltip
({
title
:
'
This is a tooltip with some content
'
})
.
tooltip
(
'
show
'
)
equal
(
$
(
'
.tooltip
'
).
children
(
'
.tooltip-inner
'
).
text
(),
'
Simple tooltip
'
,
'
title is set from title attribute while prefered over title option
'
)
tooltip
.
tooltip
(
'
hide
'
)
ok
(
!
$
(
"
.tooltip
"
).
length
,
'
tooltip removed
'
)
})
test
(
"
tooltip title test #3
"
,
function
()
{
var
tooltip
=
$
(
'
<a href="#" rel="tooltip" style="display: inline-block; position: absolute; top: 0; left: 0;"></a>
'
)
.
appendTo
(
'
#qunit-fixture
'
)
.
tooltip
({
title
:
'
This is a tooltip with some content
'
})
.
tooltip
(
'
show
'
)
equal
(
$
(
'
.tooltip
'
).
children
(
'
.tooltip-inner
'
).
text
(),
'
This is a tooltip with some content
'
,
'
title from title option is set
'
)
tooltip
.
tooltip
(
'
hide
'
)
ok
(
!
$
(
"
.tooltip
"
).
length
,
'
tooltip removed
'
)
})
})
})
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