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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
7ba4482f
Commit
7ba4482f
authored
Dec 23, 2015
by
Jacob Schatz
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixes failing test by updating project clone instructions
parent
77daadc9
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
10 deletions
+14
-10
app/assets/javascripts/project.js.coffee
app/assets/javascripts/project.js.coffee
+3
-2
app/views/shared/_clone_panel.html.haml
app/views/shared/_clone_panel.html.haml
+4
-4
features/project/create.feature
features/project/create.feature
+1
-0
features/steps/project/create.rb
features/steps/project/create.rb
+6
-4
No files found.
app/assets/javascripts/project.js.coffee
View file @
7ba4482f
class
@
Project
class
@
Project
constructor
:
->
constructor
:
->
# Git protocol switcher
# Git protocol switcher
$
(
'
.js-protocol-switch
'
).
click
->
$
(
'
ul.clone-options-dropdown a
'
).
click
->
return
if
$
(
@
).
hasClass
(
'active'
)
return
if
$
(
@
).
hasClass
(
'active'
)
...
@@ -10,7 +10,8 @@ class @Project
...
@@ -10,7 +10,8 @@ class @Project
# Add the active class for the clicked button
# Add the active class for the clicked button
$
(
@
).
toggleClass
(
'active'
)
$
(
@
).
toggleClass
(
'active'
)
url
=
$
(
@
).
data
(
'clone'
)
url
=
$
(
"#project_clone"
).
val
()
console
.
log
(
"url"
,
url
)
# Update the input field
# Update the input field
$
(
'#project_clone'
).
val
(
url
)
$
(
'#project_clone'
).
val
(
url
)
...
...
app/views/shared/_clone_panel.html.haml
View file @
7ba4482f
...
@@ -2,16 +2,16 @@
...
@@ -2,16 +2,16 @@
.git-clone-holder
.git-clone-holder
.btn-group.clone-options
.btn-group.clone-options
%a
.clone-dropdown-btn.btn
{
href:
'#'
,
'data-toggle'
=>
'dropdown'
}
%a
#clone-dropdown
.clone-dropdown-btn.btn
{
href:
'#'
,
'data-toggle'
=>
'dropdown'
}
%span
%span
=
default_clone_protocol
.
upcase
=
default_clone_protocol
.
upcase
=
icon
(
'angle-down'
)
=
icon
(
'angle-down'
)
%ul
.dropdown-menu.dropdown-menu-right.clone-options-dropdown
%ul
.dropdown-menu.dropdown-menu-right.clone-options-dropdown
%li
%li
%a
{
href:
'#'
,
"data-url"
=>
@project
.
ssh_url_to_repo
}
%a
#ssh-selector
{
href:
@project
.
ssh_url_to_repo
}
SSH
SSH
%li
%li
%a
{
href:
'#'
,
"data-url"
=>
@project
.
http_url_to_repo
}
%a
#http-selector
{
href:
@project
.
http_url_to_repo
}
HTTPS
HTTPS
=
text_field_tag
:project_clone
,
default_url_to_repo
(
project
),
class:
"js-select-on-focus form-control"
,
readonly:
true
=
text_field_tag
:project_clone
,
default_url_to_repo
(
project
),
class:
"js-select-on-focus form-control"
,
readonly:
true
...
@@ -23,5 +23,5 @@
...
@@ -23,5 +23,5 @@
e
.
preventDefault
();
e
.
preventDefault
();
var
$this
=
$
(
this
);
var
$this
=
$
(
this
);
$
(
'
a.clone-dropdown-btn span
'
).
text
(
$this
.
text
());
$
(
'
a.clone-dropdown-btn span
'
).
text
(
$this
.
text
());
$
(
'
#project_clone
'
).
val
(
$this
.
data
(
'
url
'
));
$
(
'
#project_clone
'
).
val
(
$this
.
attr
(
'
href
'
));
});
});
features/project/create.feature
View file @
7ba4482f
@project-create
Feature
:
Project Create
Feature
:
Project Create
In order to get access to project sections
In order to get access to project sections
A user with ability to create a project
A user with ability to create a project
...
...
features/steps/project/create.rb
View file @
7ba4482f
...
@@ -26,18 +26,20 @@ class Spinach::Features::ProjectCreate < Spinach::FeatureSteps
...
@@ -26,18 +26,20 @@ class Spinach::Features::ProjectCreate < Spinach::FeatureSteps
end
end
step
'I click on HTTP'
do
step
'I click on HTTP'
do
click_button
'HTTP'
find
(
'#clone-dropdown'
).
click
find
(
'#http-selector'
).
click
end
end
step
'Remote url should update to http link'
do
step
'Remote url should update to http link'
do
expect
(
page
).
to
have_content
"git remote add origin
#{
Project
.
last
.
http_url_to_repo
}
"
expect
(
page
).
to
have_content
Project
.
last
.
http_url_to_repo
end
end
step
'If I click on SSH'
do
step
'If I click on SSH'
do
click_button
'SSH'
find
(
'#clone-dropdown'
).
click
find
(
'#ssh-selector'
).
click
end
end
step
'Remote url should update to ssh link'
do
step
'Remote url should update to ssh link'
do
expect
(
page
).
to
have_content
"git remote add origin
#{
Project
.
last
.
url_to_repo
}
"
expect
(
page
).
to
have_content
Project
.
last
.
ssh_url_to_repo
end
end
end
end
Kirill Smelkov
@kirr
mentioned in commit
42fc4233
·
Aug 03, 2016
mentioned in commit
42fc4233
mentioned in commit 42fc4233e56a9e4076fe8e26b4797a75d0acf5c0
Toggle commit list
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