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
dce15f24
Commit
dce15f24
authored
Sep 20, 2017
by
Tim Zallmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Deleted Karma Specs for userCallout
parent
37213cc3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
49 deletions
+0
-49
spec/javascripts/user_callout_spec.js
spec/javascripts/user_callout_spec.js
+0
-49
No files found.
spec/javascripts/user_callout_spec.js
deleted
100644 → 0
View file @
37213cc3
import
Cookies
from
'
js-cookie
'
;
import
UserCallout
from
'
~/user_callout
'
;
const
USER_CALLOUT_COOKIE
=
'
user_callout_dismissed
'
;
describe
(
'
UserCallout
'
,
function
()
{
const
fixtureName
=
'
dashboard/user-callout.html.raw
'
;
preloadFixtures
(
fixtureName
);
beforeEach
(()
=>
{
loadFixtures
(
fixtureName
);
Cookies
.
remove
(
USER_CALLOUT_COOKIE
);
this
.
userCallout
=
new
UserCallout
();
this
.
closeButton
=
$
(
'
.js-close-callout.close
'
);
this
.
userCalloutBtn
=
$
(
'
.js-close-callout:not(.close)
'
);
});
it
(
'
hides when user clicks on the dismiss-icon
'
,
(
done
)
=>
{
this
.
closeButton
.
click
();
expect
(
Cookies
.
get
(
USER_CALLOUT_COOKIE
)).
toBe
(
'
true
'
);
setTimeout
(()
=>
{
expect
(
document
.
querySelector
(
'
.user-callout
'
),
).
toBeNull
();
done
();
});
});
it
(
'
hides when user clicks on the "check it out" button
'
,
()
=>
{
this
.
userCalloutBtn
.
click
();
expect
(
Cookies
.
get
(
USER_CALLOUT_COOKIE
)).
toBe
(
'
true
'
);
});
describe
(
'
Sets cookie with setCalloutPerProject
'
,
()
=>
{
beforeEach
(()
=>
{
spyOn
(
Cookies
,
'
set
'
).
and
.
callFake
(()
=>
{});
document
.
querySelector
(
'
.user-callout
'
).
setAttribute
(
'
data-project-path
'
,
'
foo/bar
'
);
this
.
userCallout
=
new
UserCallout
({
setCalloutPerProject
:
true
});
});
it
(
'
sets a cookie when the user clicks the close button
'
,
()
=>
{
this
.
userCalloutBtn
.
click
();
expect
(
Cookies
.
set
).
toHaveBeenCalledWith
(
'
user_callout_dismissed
'
,
'
true
'
,
Object
({
expires
:
365
,
path
:
'
foo/bar
'
}));
});
});
});
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