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
5e5cdaec
Commit
5e5cdaec
authored
Mar 11, 2020
by
Justin Ho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add specs for dismissing of message
parent
0f36dcd7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
1 deletion
+40
-1
app/views/projects/services/_integrations.html.haml
app/views/projects/services/_integrations.html.haml
+1
-1
spec/features/admin/admin_settings_spec.rb
spec/features/admin/admin_settings_spec.rb
+19
-0
spec/helpers/user_callouts_helper_spec.rb
spec/helpers/user_callouts_helper_spec.rb
+20
-0
No files found.
app/views/projects/services/_integrations.html.haml
View file @
5e5cdaec
...
...
@@ -12,7 +12,7 @@
%th
{
role:
'columnheader'
,
scope:
'col'
,
'aria-colindex'
:
4
}=
_
(
'Last updated'
)
%tbody
{
role:
'rowgroup'
}
-
@integrations
.
each
do
|
integration
|
-
@integrations
&
.
each
do
|
integration
|
%tr
{
role:
'row'
}
%td
{
role:
'cell'
,
'aria-colindex'
:
1
}
=
boolean_to_icon
integration
.
activated?
...
...
spec/features/admin/admin_settings_spec.rb
View file @
5e5cdaec
...
...
@@ -235,6 +235,25 @@ describe 'Admin updates settings', :clean_gitlab_redis_shared_state, :do_not_moc
end
end
context
'Integration page'
,
:js
do
before
do
visit
integrations_admin_application_settings_path
end
it
'allows user to dismiss deprecation notice'
do
expect
(
page
).
to
have_content
(
'Some settings have moved'
)
click_button
'Dismiss'
wait_for_requests
expect
(
page
).
not_to
have_content
(
'Some settings have moved'
)
visit
integrations_admin_application_settings_path
expect
(
page
).
not_to
have_content
(
'Some settings have moved'
)
end
end
context
'CI/CD page'
do
it
'Change CI/CD settings'
do
visit
ci_cd_admin_application_settings_path
...
...
spec/helpers/user_callouts_helper_spec.rb
View file @
5e5cdaec
...
...
@@ -47,6 +47,26 @@ describe UserCalloutsHelper do
end
end
describe
'.show_admin_integrations_moved?'
do
subject
{
helper
.
show_admin_integrations_moved?
}
context
'when user has not dismissed'
do
before
do
allow
(
helper
).
to
receive
(
:user_dismissed?
).
with
(
described_class
::
ADMIN_INTEGRATIONS_MOVED
)
{
false
}
end
it
{
is_expected
.
to
be
true
}
end
context
'when user dismissed'
do
before
do
allow
(
helper
).
to
receive
(
:user_dismissed?
).
with
(
described_class
::
ADMIN_INTEGRATIONS_MOVED
)
{
true
}
end
it
{
is_expected
.
to
be
false
}
end
end
describe
'.render_flash_user_callout'
do
it
'renders the flash_user_callout partial'
do
expect
(
helper
).
to
receive
(
:render
)
...
...
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