summaryrefslogtreecommitdiff
path: root/features
diff options
context:
space:
mode:
authorEric K Idema <eki@vying.org>2016-05-02 11:22:38 -0400
committerRémy Coutable <remy@rymai.me>2016-06-30 18:48:17 +0200
commit12aa1f898dbfea3aaeb2de351ac1cccef304717f (patch)
tree86a15a55b4bd1666e7994d702a684589afa8efa4 /features
parentc5d164d1df46eb34668a032b234484f142e1a881 (diff)
downloadgitlab-ce-12aa1f898dbfea3aaeb2de351ac1cccef304717f.tar.gz
Import from Github using Personal Access Tokens.
This stands as an alternative to using OAuth to access a user's Github repositories. This is setup in such a way that it can be used without OAuth configuration. From a UI perspective, the how to import modal has been replaced by a full page, which includes a form for posting a personal access token back to the Import::GithubController. If the user has logged in via GitHub, skip the Personal Access Token and go directly to Github for an access token via OAuth.
Diffstat (limited to 'features')
-rw-r--r--features/dashboard/new_project.feature2
-rw-r--r--features/steps/dashboard/new_project.rb10
2 files changed, 3 insertions, 9 deletions
diff --git a/features/dashboard/new_project.feature b/features/dashboard/new_project.feature
index 56b4a639c01..32c88965bcf 100644
--- a/features/dashboard/new_project.feature
+++ b/features/dashboard/new_project.feature
@@ -21,7 +21,7 @@ Background:
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
+ Then I am redirected to the Github import page
@javascript
Scenario: I should see Google Code import page
diff --git a/features/steps/dashboard/new_project.rb b/features/steps/dashboard/new_project.rb
index 31f8924c38c..0bd621da0f3 100644
--- a/features/steps/dashboard/new_project.rb
+++ b/features/steps/dashboard/new_project.rb
@@ -28,14 +28,8 @@ class Spinach::Features::NewProject < Spinach::FeatureSteps
first('.import_github').click
end
- step 'I see instructions on how to import from GitHub' do
- github_modal = first('.modal-body')
- expect(github_modal).to be_visible
- expect(github_modal).to have_content "To enable importing projects from GitHub"
-
- page.all('.modal-body').each do |element|
- expect(element).not_to be_visible unless element == github_modal
- end
+ step 'I am redirected to the Github import page' do
+ expect(current_path).to eq new_import_github_path
end
step 'I click on "Repo by URL"' do