summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-03-22 22:20:20 +0000
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-03-22 22:20:20 +0000
commit37432147290b3b41c9e2732cfff033d950392f31 (patch)
tree5ef223dfe0d790d67a05ff8d02776fd57b7c0d77
parent993774797c172ec75670de934addac32f42156e2 (diff)
parent90cbb73ed6c7deed4ff7fab4a5cf796228e6d145 (diff)
downloadgitlab-ce-37432147290b3b41c9e2732cfff033d950392f31.tar.gz
Merge branch 'fix-import-from-modal' into 'master'
Fix "Import projects from" button to show the correct instructions Closes #1267 See merge request !422
-rw-r--r--CHANGELOG1
-rw-r--r--app/views/projects/new.html.haml6
-rw-r--r--features/dashboard/new_project.feature13
-rw-r--r--features/steps/dashboard/new_project.rb27
4 files changed, 44 insertions, 3 deletions
diff --git a/CHANGELOG b/CHANGELOG
index cf00780d332..854f5c88bc3 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,7 @@
Please view this file on the master branch, on stable branches it's out of date.
v 7.10.0 (unreleased)
+ - Fix "Import projects from" button to show the correct instructions (Stan Hu)
- Update poltergeist to version 1.6.0 to support PhantomJS 2.0 (Zeger-Jan van de Weg)
- Fix cross references when usernames, milestones, or project names contain underscores (Stan Hu)
- enable line wrapping per default and remove the checkbox to toggle it (Hannes Rosenögger)
diff --git a/app/views/projects/new.html.haml b/app/views/projects/new.html.haml
index 173a3080b31..9687c8ad87c 100644
--- a/app/views/projects/new.html.haml
+++ b/app/views/projects/new.html.haml
@@ -74,9 +74,9 @@
= f.text_field :import_url, class: 'form-control', placeholder: 'https://username:password@gitlab.company.com/group/project.git'
.alert.alert-info.prepend-top-10
%ul
- %li
+ %li
The repository must be accessible over HTTP(S). If it is not publicly accessible, you can add authentication information to the URL: <code>https://username:password@gitlab.company.com/group/project.git</code>.
- %li
+ %li
The import will time out after 4 minutes. For big repositories, use a clone/push combination.
%li
To migrate an SVN repository, check out #{link_to "this document", "http://doc.gitlab.com/ce/workflow/migrating_from_svn.html"}.
@@ -112,6 +112,6 @@
$ ->
$('.how_to_import_link').bind 'click', (e) ->
e.preventDefault()
- import_modal = $(this).parent().find(".modal").show()
+ import_modal = $(this).next(".modal").show()
$('.modal-header .close').bind 'click', ->
$(".modal").hide()
diff --git a/features/dashboard/new_project.feature b/features/dashboard/new_project.feature
new file mode 100644
index 00000000000..431dc4ccfcb
--- /dev/null
+++ b/features/dashboard/new_project.feature
@@ -0,0 +1,13 @@
+@dashboard
+Feature: New Project
+Background:
+ Given I sign in as a user
+ And I own project "Shop"
+ And I visit dashboard page
+
+ @javascript
+ Scenario: I should see New projects page
+ Given I click "New project" link
+ Then I see "New project" page
+ When I click on "Import project from GitHub"
+ Then I see instructions on how to import from GitHub
diff --git a/features/steps/dashboard/new_project.rb b/features/steps/dashboard/new_project.rb
new file mode 100644
index 00000000000..5e588ceb780
--- /dev/null
+++ b/features/steps/dashboard/new_project.rb
@@ -0,0 +1,27 @@
+class Spinach::Features::NewProject < Spinach::FeatureSteps
+ include SharedAuthentication
+ include SharedPaths
+ include SharedProject
+
+ step 'I click "New project" link' do
+ click_link "New project"
+ end
+
+ step 'I see "New project" page' do
+ page.should have_content("Project path")
+ end
+
+ step 'I click on "Import project from GitHub"' do
+ first('.how_to_import_link').click
+ end
+
+ step 'I see instructions on how to import from GitHub' do
+ github_modal = first('.modal-body')
+ github_modal.should be_visible
+ github_modal.should have_content "To enable importing projects from GitHub"
+
+ all('.modal-body').each do |element|
+ element.should_not be_visible unless element == github_modal
+ end
+ end
+end