2015-03-22 11:24:23 -04:00
|
|
|
class Spinach::Features::NewProject < Spinach::FeatureSteps
|
|
|
|
include SharedAuthentication
|
|
|
|
include SharedPaths
|
|
|
|
include SharedProject
|
|
|
|
|
2015-10-14 11:26:24 -04:00
|
|
|
step 'I click "New Project" link' do
|
2015-06-12 01:36:00 -04:00
|
|
|
page.within('.content') do
|
2015-10-14 11:26:24 -04:00
|
|
|
click_link "New Project"
|
2015-04-25 14:26:04 -04:00
|
|
|
end
|
2015-03-22 11:24:23 -04:00
|
|
|
end
|
|
|
|
|
2015-10-14 11:26:24 -04:00
|
|
|
step 'I see "New Project" page' do
|
2016-06-07 21:10:55 -04:00
|
|
|
expect(page).to have_content('Project path')
|
2016-06-15 14:45:27 -04:00
|
|
|
expect(page).to have_content('Project name')
|
2015-03-22 11:24:23 -04:00
|
|
|
end
|
|
|
|
|
2016-08-11 10:59:37 -04:00
|
|
|
step 'I see all possible import options' do
|
2015-08-14 09:56:33 -04:00
|
|
|
expect(page).to have_link('GitHub')
|
|
|
|
expect(page).to have_link('Bitbucket')
|
|
|
|
expect(page).to have_link('GitLab.com')
|
|
|
|
expect(page).to have_link('Google Code')
|
2016-05-05 04:05:42 -04:00
|
|
|
expect(page).to have_link('Repo by URL')
|
2016-08-29 03:46:05 -04:00
|
|
|
expect(page).to have_link('GitLab export')
|
2015-08-14 09:56:33 -04:00
|
|
|
end
|
|
|
|
|
2015-03-22 11:24:23 -04:00
|
|
|
step 'I click on "Import project from GitHub"' do
|
2015-08-14 09:56:33 -04:00
|
|
|
first('.import_github').click
|
2015-03-22 11:24:23 -04:00
|
|
|
end
|
|
|
|
|
2016-06-27 07:42:22 -04:00
|
|
|
step 'I am redirected to the GitHub import page' do
|
2016-08-11 12:48:32 -04:00
|
|
|
expect(page).to have_content('Import Projects from GitHub')
|
2016-05-02 11:22:38 -04:00
|
|
|
expect(current_path).to eq new_import_github_path
|
2015-03-22 11:24:23 -04:00
|
|
|
end
|
2015-08-14 09:56:33 -04:00
|
|
|
|
2016-05-05 04:05:42 -04:00
|
|
|
step 'I click on "Repo by URL"' do
|
2015-08-14 09:56:33 -04:00
|
|
|
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"
|
|
|
|
end
|
|
|
|
|
|
|
|
step 'I click on "Google Code"' do
|
|
|
|
first('.import_google_code').click
|
|
|
|
end
|
|
|
|
|
|
|
|
step 'I redirected to Google Code import page' do
|
2016-08-11 12:48:32 -04:00
|
|
|
expect(page).to have_content('Import projects from Google Code')
|
2015-08-14 09:56:33 -04:00
|
|
|
expect(current_path).to eq new_import_google_code_path
|
|
|
|
end
|
2015-03-22 11:24:23 -04:00
|
|
|
end
|