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
Boxiang Sun
gitlab-ce
Commits
91b0754d
Commit
91b0754d
authored
Dec 23, 2018
by
Stan Hu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix HTTP/SSH clone panel for mobile
parent
f50ee65b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
4 deletions
+26
-4
app/views/shared/_mobile_clone_panel.html.haml
app/views/shared/_mobile_clone_panel.html.haml
+6
-4
spec/features/projects_spec.rb
spec/features/projects_spec.rb
+20
-0
No files found.
app/views/shared/_mobile_clone_panel.html.haml
View file @
91b0754d
...
...
@@ -7,7 +7,9 @@
%button
.btn.btn-primary.dropdown-toggle.js-dropdown-toggle
{
type:
"button"
,
data:
{
toggle:
"dropdown"
}
}
=
sprite_icon
(
"arrow-down"
,
css_class:
"dropdown-btn-icon icon"
)
%ul
.dropdown-menu.dropdown-menu-selectable.dropdown-menu-right.clone-options-dropdown
{
data:
{
dropdown:
true
}
}
%li
=
dropdown_item_with_description
(
ssh_copy_label
,
project
.
ssh_url_to_repo
,
href:
project
.
ssh_url_to_repo
,
data:
{
clone_type:
'ssh'
},
default:
true
)
%li
=
dropdown_item_with_description
(
http_copy_label
,
project
.
http_url_to_repo
,
href:
project
.
http_url_to_repo
,
data:
{
clone_type:
'http'
})
-
if
ssh_enabled?
%li
=
dropdown_item_with_description
(
ssh_copy_label
,
project
.
ssh_url_to_repo
,
href:
project
.
ssh_url_to_repo
,
data:
{
clone_type:
'ssh'
},
default:
true
)
-
if
http_enabled?
%li
=
dropdown_item_with_description
(
http_copy_label
,
project
.
http_url_to_repo
,
href:
project
.
http_url_to_repo
,
data:
{
clone_type:
'http'
})
spec/features/projects_spec.rb
View file @
91b0754d
...
...
@@ -139,6 +139,16 @@ describe 'Project' do
expect
(
page
).
not_to
have_content
(
'Clone with SSH'
)
end
end
context
'mobile component'
do
it
'shows only the instructions for HTTP'
do
resize_screen_xs
find
(
'.dropdown-toggle'
).
click
expect
(
page
).
to
have_content
(
'Copy HTTP clone URL'
)
expect
(
page
).
not_to
have_content
(
'Copy SSH clone URL'
)
end
end
end
context
'when only SSH clones are allowed'
do
...
...
@@ -152,6 +162,16 @@ describe 'Project' do
expect
(
page
).
not_to
have_content
(
'Clone with HTTP'
)
end
end
context
'mobile component'
do
it
'shows only the instructions for SSH'
do
resize_screen_xs
find
(
'.dropdown-toggle'
).
click
expect
(
page
).
to
have_content
(
'Copy SSH clone URL'
)
expect
(
page
).
not_to
have_content
(
'Copy HTTP clone URL'
)
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