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
ea052092
Commit
ea052092
authored
Mar 02, 2017
by
Simon Knox
Committed by
Alfredo Sumaran
Mar 02, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove extra whitespace on dashboard projects page
parent
f0dc00d4
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
10 deletions
+33
-10
app/assets/javascripts/user_callout.js
app/assets/javascripts/user_callout.js
+3
-1
app/assets/stylesheets/pages/profile.scss
app/assets/stylesheets/pages/profile.scss
+2
-1
spec/javascripts/user_callout_spec.js.es6
spec/javascripts/user_callout_spec.js.es6
+28
-8
No files found.
app/assets/javascripts/user_callout.js
View file @
ea052092
...
...
@@ -43,6 +43,8 @@ class UserCallout {
this
.
userCalloutBody
.
append
(
$template
);
$template
.
find
(
closeButton
).
on
(
'
click
'
,
e
=>
this
.
dismissCallout
(
e
));
$template
.
find
(
userCalloutBtn
).
on
(
'
click
'
,
e
=>
this
.
dismissCallout
(
e
));
}
else
{
this
.
userCalloutBody
.
remove
();
}
}
...
...
@@ -50,7 +52,7 @@ class UserCallout {
Cookies
.
set
(
USER_CALLOUT_COOKIE
,
'
true
'
);
const
$currentTarget
=
$
(
e
.
currentTarget
);
if
(
$currentTarget
.
hasClass
(
'
close-user-callout
'
))
{
this
.
userCalloutBody
.
empty
();
this
.
userCalloutBody
.
remove
();
}
}
}
...
...
app/assets/stylesheets/pages/profile.scss
View file @
ea052092
...
...
@@ -279,7 +279,7 @@ table.u2f-registrations {
}
.user-callout
{
margin
:
24px
auto
0
;
margin
:
0
auto
;
.bordered-box
{
border
:
1px
solid
$border-color
;
...
...
@@ -287,6 +287,7 @@ table.u2f-registrations {
}
.landing
{
margin-top
:
$gl-padding
;
margin-bottom
:
$gl-padding
;
.close
{
...
...
spec/javascripts/user_callout_spec.js.es6
View file @
ea052092
...
...
@@ -3,35 +3,55 @@ const UserCallout = require('~/user_callout');
const USER_CALLOUT_COOKIE = 'user_callout_dismissed';
const Cookie = window.Cookies;
describe('UserCallout',
() =>
{
describe('UserCallout',
function ()
{
const fixtureName = 'static/user_callout.html.raw';
preloadFixtures(fixtureName);
beforeEach(
function ()
{
beforeEach(
() =>
{
loadFixtures(fixtureName);
Cookie.remove(USER_CALLOUT_COOKIE);
this.userCallout = new UserCallout();
this.closeButton = $('.close-user-callout');
this.userCalloutBtn = $('.user-callout-btn');
this.userCalloutContainer = $('.user-callout');
Cookie.set(USER_CALLOUT_COOKIE, 'false');
});
afterEach(function () {
Cookie.set(USER_CALLOUT_COOKIE, 'false');
it('does not show when cookie is set not defined', () => {
expect(Cookie.get(USER_CALLOUT_COOKIE)).toBeUndefined();
expect(this.userCalloutContainer.is(':visible')).toBe(true);
});
it('shows when cookie is set to false', function () {
it('shows when cookie is set to false', () => {
Cookie.set(USER_CALLOUT_COOKIE, 'false');
expect(Cookie.get(USER_CALLOUT_COOKIE)).toBeDefined();
expect(this.userCalloutContainer.is(':visible')).toBe(true);
});
it('hides when user clicks on the dismiss-icon',
function ()
{
it('hides when user clicks on the dismiss-icon',
() =>
{
this.closeButton.click();
expect(Cookie.get(USER_CALLOUT_COOKIE)).toBe('true');
});
it('hides when user clicks on the "check it out" button',
function ()
{
it('hides when user clicks on the "check it out" button',
() =>
{
this.userCalloutBtn.click();
expect(Cookie.get(USER_CALLOUT_COOKIE)).toBe('true');
});
});
describe('UserCallout when cookie is present', function () {
const fixtureName = 'static/user_callout.html.raw';
preloadFixtures(fixtureName);
beforeEach(() => {
loadFixtures(fixtureName);
Cookie.set(USER_CALLOUT_COOKIE, 'true');
this.userCallout = new UserCallout();
this.userCalloutContainer = $('.user-callout');
});
it('removes the DOM element', () => {
expect(this.userCalloutContainer.length).toBe(0);
});
});
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