debian-mirror-gitlab/features/steps/dashboard/new_project.rb

54 lines
1.5 KiB
Ruby
Raw Normal View History

2015-04-26 12:48:37 +05:30
class Spinach::Features::NewProject < Spinach::FeatureSteps
include SharedAuthentication
include SharedPaths
include SharedProject
2015-10-24 18:46:33 +05:30
step 'I click "New Project" link' do
2015-09-11 14:41:01 +05:30
page.within('.content') do
2015-10-24 18:46:33 +05:30
click_link "New Project"
2015-09-11 14:41:01 +05:30
end
2015-04-26 12:48:37 +05:30
end
2015-10-24 18:46:33 +05:30
step 'I see "New Project" page' do
2016-08-24 12:49:21 +05:30
expect(page).to have_content('Project path')
2016-06-22 15:30:34 +05:30
expect(page).to have_content('Project name')
2015-04-26 12:48:37 +05:30
end
2016-09-13 17:45:13 +05:30
step 'I see all possible import options' do
2015-09-25 12:07:36 +05:30
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')
2016-06-22 15:30:34 +05:30
expect(page).to have_link('Repo by URL')
2015-09-25 12:07:36 +05:30
end
2015-04-26 12:48:37 +05:30
step 'I click on "Import project from GitHub"' do
2015-09-25 12:07:36 +05:30
first('.import_github').click
2015-04-26 12:48:37 +05:30
end
2016-08-24 12:49:21 +05:30
step 'I am redirected to the GitHub import page' do
2016-09-13 17:45:13 +05:30
expect(page).to have_content('Import Projects from GitHub')
2016-08-24 12:49:21 +05:30
expect(current_path).to eq new_import_github_path
2015-04-26 12:48:37 +05:30
end
2015-09-25 12:07:36 +05:30
2016-06-22 15:30:34 +05:30
step 'I click on "Repo by URL"' do
2015-09-25 12:07:36 +05:30
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-09-13 17:45:13 +05:30
expect(page).to have_content('Import projects from Google Code')
2015-09-25 12:07:36 +05:30
expect(current_path).to eq new_import_google_code_path
end
2015-04-26 12:48:37 +05:30
end