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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
2c4d57ff
Commit
2c4d57ff
authored
Sep 07, 2017
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updates tests and i18n
parent
e5e0acfc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
13 deletions
+4
-13
app/views/shared/_auto_devops_callout.html.haml
app/views/shared/_auto_devops_callout.html.haml
+1
-1
spec/javascripts/user_callout_spec.js
spec/javascripts/user_callout_spec.js
+3
-12
No files found.
app/views/shared/_auto_devops_callout.html.haml
View file @
2c4d57ff
...
...
@@ -9,7 +9,7 @@
%h4
=
_
(
'Auto DevOps (Beta)'
)
%p
=
_
(
'Auto DevOps can be activated for this project. It will automatically build, test, and deploy your application based on a predefined CI/CD configuration.'
)
%p
#{
s_
(
'
LearnMoreInThe
|Learn more in the'
)
}
#{
s_
(
'
AutoDevOps
|Learn more in the'
)
}
=
link_to
_
(
'Auto DevOps documentation'
),
help_page_path
(
'topics/autodevops/index.md'
),
target:
'_blank'
,
rel:
'noopener noreferrer'
=
link_to
_
(
'Enable in settings'
),
project_settings_ci_cd_path
(
@project
,
anchor:
'js-general-pipeline-settings'
),
class:
'btn btn-primary js-close-callout'
spec/javascripts/user_callout_spec.js
View file @
2c4d57ff
...
...
@@ -35,24 +35,15 @@ describe('UserCallout', function () {
});
describe
(
'
Sets cookie with setCalloutPerProject
'
,
()
=>
{
let
originalGon
;
beforeEach
(()
=>
{
originalGon
=
window
.
gon
;
window
.
gon
=
Object
.
assign
({},
{
project_url
:
'
http://localhost:3000/gitlab-org/gitlab-ce
'
,
});
spyOn
(
Cookies
,
'
set
'
).
and
.
callFake
(()
=>
{});
document
.
querySelector
(
'
.user-callout
'
).
setAttribute
(
'
data-project-path
'
,
'
foo/bar
'
);
this
.
userCallout
=
new
UserCallout
({
setCalloutPerProject
:
true
});
});
afterEach
(()
=>
{
window
.
gon
=
originalGon
;
});
it
(
'
sets a cookie when the user clicks the close button
'
,
()
=>
{
this
.
userCalloutBtn
.
click
();
// Note the path of a cookie is not accessible via JS, we can not test for that
// We can test if a cookie is set when an option is provided
expect
(
Cookies
.
get
(
USER_CALLOUT_COOKIE
)).
toBe
(
'
true
'
);
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