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

30 lines
804 B
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
step 'I click "New project" link' do
2015-09-11 14:41:01 +05:30
page.within('.content') do
click_link "New project"
end
2015-04-26 12:48:37 +05:30
end
step 'I see "New project" page' do
2015-09-11 14:41:01 +05:30
expect(page).to have_content('Project path')
2015-04-26 12:48:37 +05:30
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')
2015-09-11 14:41:01 +05:30
expect(github_modal).to be_visible
expect(github_modal).to have_content "To enable importing projects from GitHub"
2015-04-26 12:48:37 +05:30
2015-09-11 14:41:01 +05:30
page.all('.modal-body').each do |element|
expect(element).not_to be_visible unless element == github_modal
2015-04-26 12:48:37 +05:30
end
end
end