Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArtem Sidorenko <artem.sidorenko@telekom.de>2015-08-14 16:56:33 +0300
committerArtem Sidorenko <artem.sidorenko@telekom.de>2015-08-20 13:13:22 +0300
commite238a8dad5ec6d1bb80cc8d4dd2b3f85b55a6879 (patch)
tree5571e55d54c0bc83594083a42acae76594c4321b /features
parent55dca86b983496a26a3913aead77439edf96afe9 (diff)
Import sources: show only enabled sources
Diffstat (limited to 'features')
-rw-r--r--features/dashboard/new_project.feature19
-rw-r--r--features/steps/dashboard/new_project.rb31
2 files changed, 48 insertions, 2 deletions
diff --git a/features/dashboard/new_project.feature b/features/dashboard/new_project.feature
index 431dc4ccfcb..bbd82a85e3a 100644
--- a/features/dashboard/new_project.feature
+++ b/features/dashboard/new_project.feature
@@ -4,10 +4,27 @@ Background:
Given I sign in as a user
And I own project "Shop"
And I visit dashboard page
+ And I click "New project" link
@javascript
Scenario: I should see New projects page
- Given I click "New project" link
Then I see "New project" page
+ Then I see all possible import optios
+
+ @javascript
+ Scenario: I should see instructions on how to import from Git URL
+ Given I see "New project" page
+ When I click on "Any repo by URL"
+ Then I see instructions on how to import from Git URL
+
+ @javascript
+ Scenario: I should see instructions on how to import from GitHub
+ Given I see "New project" page
When I click on "Import project from GitHub"
Then I see instructions on how to import from GitHub
+
+ @javascript
+ Scenario: I should see Google Code import page
+ Given I see "New project" page
+ When I click on "Google Code"
+ Then I redirected to Google Code import page
diff --git a/features/steps/dashboard/new_project.rb b/features/steps/dashboard/new_project.rb
index d4440c1fb4d..1e09162a5b5 100644
--- a/features/steps/dashboard/new_project.rb
+++ b/features/steps/dashboard/new_project.rb
@@ -13,8 +13,17 @@ class Spinach::Features::NewProject < Spinach::FeatureSteps
expect(page).to have_content('Project path')
end
+ step 'I see all possible import optios' do
+ expect(page).to have_link('GitHub')
+ expect(page).to have_link('Bitbucket')
+ expect(page).to have_link('GitLab.com')
+ expect(page).to have_link('Gitorious.org')
+ expect(page).to have_link('Google Code')
+ expect(page).to have_link('Any repo by URL')
+ end
+
step 'I click on "Import project from GitHub"' do
- first('.how_to_import_link').click
+ first('.import_github').click
end
step 'I see instructions on how to import from GitHub' do
@@ -26,4 +35,24 @@ class Spinach::Features::NewProject < Spinach::FeatureSteps
expect(element).not_to be_visible unless element == github_modal
end
end
+
+ step 'I click on "Any repo by URL"' do
+ first('.import_git').click
+ end
+
+ step 'I see instructions on how to import from Git URL' do
+ git_import_instructions = first('.js-toggle-content')
+ expect(git_import_instructions).to be_visible
+ expect(git_import_instructions).to have_content "Git repository URL"
+ expect(git_import_instructions).to have_content "The repository must be accessible over HTTP(S). If it is not publicly accessible, you can add authentication information to the URL:"
+ end
+
+ step 'I click on "Google Code"' do
+ first('.import_google_code').click
+ end
+
+ step 'I redirected to Google Code import page' do
+ expect(current_path).to eq new_import_google_code_path
+ end
+
end