summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Schatz <jacobschatz@Jacobs-MBP.fios-router.home>2015-12-23 19:57:30 -0500
committerJacob Schatz <jacobschatz@Jacobs-MBP.fios-router.home>2015-12-23 19:57:30 -0500
commit7ba4482fcf6faae162ceb920044f4ec07ef048af (patch)
tree8aacd9f6989cd5840c22d7e5394c339a84397d3e
parent77daadc92c8574c048511c4f8363d51ea78b1b9e (diff)
downloadgitlab-ce-7ba4482fcf6faae162ceb920044f4ec07ef048af.tar.gz
fixes failing test by updating project clone instructions
-rw-r--r--app/assets/javascripts/project.js.coffee5
-rw-r--r--app/views/shared/_clone_panel.html.haml8
-rw-r--r--features/project/create.feature1
-rw-r--r--features/steps/project/create.rb10
4 files changed, 14 insertions, 10 deletions
diff --git a/app/assets/javascripts/project.js.coffee b/app/assets/javascripts/project.js.coffee
index 1f221945c06..d7a658f8faa 100644
--- a/app/assets/javascripts/project.js.coffee
+++ b/app/assets/javascripts/project.js.coffee
@@ -1,7 +1,7 @@
class @Project
constructor: ->
# Git protocol switcher
- $('.js-protocol-switch').click ->
+ $('ul.clone-options-dropdown a').click ->
return if $(@).hasClass('active')
@@ -10,7 +10,8 @@ class @Project
# Add the active class for the clicked button
$(@).toggleClass('active')
- url = $(@).data('clone')
+ url = $("#project_clone").val()
+ console.log("url",url)
# Update the input field
$('#project_clone').val(url)
diff --git a/app/views/shared/_clone_panel.html.haml b/app/views/shared/_clone_panel.html.haml
index 9edd1f0750e..687a59c270f 100644
--- a/app/views/shared/_clone_panel.html.haml
+++ b/app/views/shared/_clone_panel.html.haml
@@ -2,16 +2,16 @@
.git-clone-holder
.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
= default_clone_protocol.upcase
= icon('angle-down')
%ul.dropdown-menu.dropdown-menu-right.clone-options-dropdown
%li
- %a{href: '#', "data-url" => @project.ssh_url_to_repo}
+ %a#ssh-selector{href: @project.ssh_url_to_repo}
SSH
%li
- %a{href: '#', "data-url" => @project.http_url_to_repo}
+ %a#http-selector{href: @project.http_url_to_repo}
HTTPS
= text_field_tag :project_clone, default_url_to_repo(project), class: "js-select-on-focus form-control", readonly: true
@@ -23,5 +23,5 @@
e.preventDefault();
var $this = $(this);
$('a.clone-dropdown-btn span').text($this.text());
- $('#project_clone').val($this.data('url'));
+ $('#project_clone').val($this.attr('href'));
});
diff --git a/features/project/create.feature b/features/project/create.feature
index a86079143e5..27136798e36 100644
--- a/features/project/create.feature
+++ b/features/project/create.feature
@@ -1,3 +1,4 @@
+@project-create
Feature: Project Create
In order to get access to project sections
A user with ability to create a project
diff --git a/features/steps/project/create.rb b/features/steps/project/create.rb
index f90218f3791..0c247c83133 100644
--- a/features/steps/project/create.rb
+++ b/features/steps/project/create.rb
@@ -26,18 +26,20 @@ class Spinach::Features::ProjectCreate < Spinach::FeatureSteps
end
step 'I click on HTTP' do
- click_button 'HTTP'
+ find('#clone-dropdown').click
+ find('#http-selector').click
end
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
step 'If I click on SSH' do
- click_button 'SSH'
+ find('#clone-dropdown').click
+ find('#ssh-selector').click
end
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