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
f50ee65b
Commit
f50ee65b
authored
Dec 23, 2018
by
Stan Hu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add spec for HTTP/SSH clone panel
parent
4a8b4d8a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
9 deletions
+40
-9
spec/features/projects_spec.rb
spec/features/projects_spec.rb
+40
-9
No files found.
spec/features/projects_spec.rb
View file @
f50ee65b
...
...
@@ -104,22 +104,53 @@ describe 'Project' do
let
(
:path
)
{
project_path
(
project
)
}
before
do
stub_application_setting
(
enabled_git_access_protocol:
enabled_protocols
)
sign_in
(
create
(
:admin
))
visit
path
end
context
'desktop component'
do
it
'shows on md and larger breakpoints'
do
expect
(
find
(
'.git-clone-holder'
)).
to
be_visible
expect
(
find
(
'.mobile-git-clone'
,
visible:
false
)).
not_to
be_visible
context
'with all protocols enabled'
do
let
(
:enabled_protocols
)
{
nil
}
context
'desktop component'
do
it
'shows on md and larger breakpoints'
do
expect
(
find
(
'.git-clone-holder'
)).
to
be_visible
expect
(
find
(
'.mobile-git-clone'
,
visible:
false
)).
not_to
be_visible
end
end
context
'mobile component'
do
it
'shows mobile component on sm and smaller breakpoints'
do
resize_screen_xs
expect
(
find
(
'.mobile-git-clone'
)).
to
be_visible
expect
(
find
(
'.git-clone-holder'
,
visible:
false
)).
not_to
be_visible
end
end
end
context
'mobile component'
do
it
'shows mobile component on sm and smaller breakpoints'
do
resize_screen_xs
expect
(
find
(
'.mobile-git-clone'
)).
to
be_visible
expect
(
find
(
'.git-clone-holder'
,
visible:
false
)).
not_to
be_visible
context
'when only HTTP clones are allowed'
do
let
(
:enabled_protocols
)
{
'http'
}
it
'shows only the instructions for HTTP'
do
find
(
'.clone-dropdown-btn'
).
click
within
(
'.git-clone-holder'
)
do
expect
(
page
).
to
have_content
(
'Clone with HTTP'
)
expect
(
page
).
not_to
have_content
(
'Clone with SSH'
)
end
end
end
context
'when only SSH clones are allowed'
do
let
(
:enabled_protocols
)
{
'ssh'
}
it
'shows only the instructions for SSH'
do
find
(
'.clone-dropdown-btn'
).
click
within
(
'.git-clone-holder'
)
do
expect
(
page
).
to
have_content
(
'Clone with SSH'
)
expect
(
page
).
not_to
have_content
(
'Clone with HTTP'
)
end
end
end
end
...
...
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