Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
25cf9225
Commit
25cf9225
authored
Mar 28, 2018
by
Luke Bennett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix spec
parent
37a2ac77
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
spec/javascripts/feature_highlight/feature_highlight_spec.js
spec/javascripts/feature_highlight/feature_highlight_spec.js
+5
-5
No files found.
spec/javascripts/feature_highlight/feature_highlight_spec.js
View file @
25cf9225
import
$
from
'
jquery
'
;
import
*
as
featureHighlightHelper
from
'
~/feature_highlight/feature_highlight_helper
'
;
import
*
as
featureHighlight
from
'
~/feature_highlight/feature_highlight
'
;
import
*
as
popover
from
'
~/shared/popover
'
;
import
axios
from
'
~/lib/utils/axios_utils
'
;
import
MockAdapter
from
'
axios-mock-adapter
'
;
...
...
@@ -44,15 +44,15 @@ describe('feature highlight', () => {
expect
(
$
(
selector
).
data
(
'
content
'
)).
toEqual
(
outerHTML
);
});
it
(
'
setup mouseenter
'
,
()
=>
{
const
toggleSpy
=
spyOn
(
featureHighlightHelp
er
.
togglePopover
,
'
call
'
);
f
it
(
'
setup mouseenter
'
,
()
=>
{
const
toggleSpy
=
spyOn
(
popov
er
.
togglePopover
,
'
call
'
);
$
(
selector
).
trigger
(
'
mouseenter
'
);
expect
(
toggleSpy
).
toHaveBeenCalledWith
(
jasmine
.
any
(
Object
),
true
);
});
it
(
'
setup debounced mouseleave
'
,
(
done
)
=>
{
const
toggleSpy
=
spyOn
(
featureHighlightHelp
er
.
togglePopover
,
'
call
'
);
const
toggleSpy
=
spyOn
(
popov
er
.
togglePopover
,
'
call
'
);
$
(
selector
).
trigger
(
'
mouseleave
'
);
// Even though we've set the debounce to 0ms, setTimeout is needed for the debounce
...
...
@@ -85,7 +85,7 @@ describe('feature highlight', () => {
it
(
'
toggles when clicked
'
,
()
=>
{
$
(
selector
).
trigger
(
'
mouseenter
'
);
const
popoverId
=
$
(
selector
).
attr
(
'
aria-describedby
'
);
const
toggleSpy
=
spyOn
(
featureHighlightHelp
er
.
togglePopover
,
'
call
'
);
const
toggleSpy
=
spyOn
(
popov
er
.
togglePopover
,
'
call
'
);
$
(
`#
${
popoverId
}
.dismiss-feature-highlight`
).
click
();
...
...
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