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
Boxiang Sun
gitlab-ce
Commits
1097724f
Commit
1097724f
authored
Feb 23, 2017
by
Alfredo Sumaran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix failing specs
parent
2f681138
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
spec/javascripts/user_callout_spec.js.es6
spec/javascripts/user_callout_spec.js.es6
+9
-5
No files found.
spec/javascripts/user_callout_spec.js
→
spec/javascripts/user_callout_spec.js
.es6
View file @
1097724f
...
@@ -3,11 +3,11 @@ const UserCallout = require('~/user_callout');
...
@@ -3,11 +3,11 @@ const UserCallout = require('~/user_callout');
const USER_CALLOUT_COOKIE = 'user_callout_dismissed';
const USER_CALLOUT_COOKIE = 'user_callout_dismissed';
const Cookie = window.Cookies;
const Cookie = window.Cookies;
describe
(
'
UserCallout
'
,
function
()
{
describe('UserCallout',
() =>
{
const fixtureName = 'static/user_callout.html.raw';
const fixtureName = 'static/user_callout.html.raw';
preloadFixtures(fixtureName);
preloadFixtures(fixtureName);
beforeEach
(
()
=>
{
beforeEach(
function ()
{
loadFixtures(fixtureName);
loadFixtures(fixtureName);
this.userCallout = new UserCallout();
this.userCallout = new UserCallout();
this.closeButton = $('.close-user-callout');
this.closeButton = $('.close-user-callout');
...
@@ -16,17 +16,21 @@ describe('UserCallout', function () {
...
@@ -16,17 +16,21 @@ describe('UserCallout', function () {
Cookie.set(USER_CALLOUT_COOKIE, 'false');
Cookie.set(USER_CALLOUT_COOKIE, 'false');
});
});
fit
(
'
shows when cookie is set to false
'
,
()
=>
{
afterEach(function () {
Cookie.set(USER_CALLOUT_COOKIE, 'false');
});
it('shows when cookie is set to false', function () {
expect(Cookie.get(USER_CALLOUT_COOKIE)).toBeDefined();
expect(Cookie.get(USER_CALLOUT_COOKIE)).toBeDefined();
expect(this.userCalloutContainer.is(':visible')).toBe(true);
expect(this.userCalloutContainer.is(':visible')).toBe(true);
});
});
fit
(
'
hides when user clicks on the dismiss-icon
'
,
()
=>
{
it('hides when user clicks on the dismiss-icon', function ()
{
this.closeButton.click();
this.closeButton.click();
expect(Cookie.get(USER_CALLOUT_COOKIE)).toBe('true');
expect(Cookie.get(USER_CALLOUT_COOKIE)).toBe('true');
});
});
fit
(
'
hides when user clicks on the "check it out" button
'
,
()
=>
{
it('hides when user clicks on the "check it out" button', function ()
{
this.userCalloutBtn.click();
this.userCalloutBtn.click();
expect(Cookie.get(USER_CALLOUT_COOKIE)).toBe('true');
expect(Cookie.get(USER_CALLOUT_COOKIE)).toBe('true');
});
});
...
...
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