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
26a5f60f
Commit
26a5f60f
authored
Apr 18, 2019
by
mfluharty
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add tests for dependency proxy UI
parent
ce722a0c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
78 additions
and
0 deletions
+78
-0
ee/spec/features/groups/dependency_proxy_spec.rb
ee/spec/features/groups/dependency_proxy_spec.rb
+78
-0
No files found.
ee/spec/features/groups/dependency_proxy_spec.rb
0 → 100644
View file @
26a5f60f
# frozen_string_literal: true
require
'spec_helper'
describe
'Group Dependency Proxy'
do
let
(
:owner
)
{
create
(
:user
)
}
let
(
:developer
)
{
create
(
:user
)
}
let
(
:group
)
{
create
(
:group
)
}
let
(
:path
)
{
group_dependency_proxy_path
(
group
)
}
before
do
group
.
add_owner
(
owner
)
group
.
add_developer
(
developer
)
end
describe
'feature settings'
,
:js
do
context
'when not logged in'
do
it
'does not show the feature settings'
do
visit
path
expect
(
page
).
not_to
have_css
(
'.js-dependency-proxy-toggle-area'
)
expect
(
page
).
not_to
have_css
(
'.js-dependency-proxy-url'
)
end
end
context
'when logged in as group owner'
do
before
do
sign_in
(
owner
)
visit
path
end
it
'toggle defaults to disabled'
do
page
.
within
(
'.js-dependency-proxy-toggle-area'
)
do
expect
(
find
(
'.js-project-feature-toggle-input'
,
visible:
false
).
value
).
to
eq
(
'false'
)
end
end
context
'when disabled'
do
it
'does not show the proxy URL'
do
expect
(
page
).
not_to
have_css
(
'.js-dependency-proxy-url'
)
end
end
context
'when enabled by owner'
do
before
do
page
.
within
(
'.edit_dependency_proxy_group_setting'
)
do
find
(
'.js-project-feature-toggle'
).
click
end
click_button
(
'Save changes'
)
wait_for_requests
visit
path
end
it
'shows the proxy URL'
do
page
.
within
(
'.edit_dependency_proxy_group_setting'
)
do
expect
(
find
(
'.js-dependency-proxy-url'
).
value
).
to
have_content
(
'/dependency_proxy/containers'
)
end
end
context
'then when logged in as group developer'
do
before
do
sign_in
(
developer
)
visit
path
end
it
'does not show the feature toggle'
do
expect
(
page
).
not_to
have_css
(
'.js-dependency-proxy-toggle-area'
)
end
it
'shows the proxy URL'
do
expect
(
find
(
'.js-dependency-proxy-url'
).
value
).
to
have_content
(
'/dependency_proxy/containers'
)
end
end
end
end
end
end
\ No newline at end of file
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