2014-10-02 12:42:54 -04:00
|
|
|
class Spinach::Features::ProjectCreate < Spinach::FeatureSteps
|
2012-09-10 11:35:03 -04:00
|
|
|
include SharedAuthentication
|
|
|
|
include SharedPaths
|
2012-09-10 09:35:23 -04:00
|
|
|
|
2014-09-21 17:40:22 -04:00
|
|
|
step 'fill project form with valid data' do
|
2014-12-22 08:02:47 -05:00
|
|
|
fill_in 'project_path', with: 'Empty'
|
2012-09-10 09:35:23 -04:00
|
|
|
click_button "Create project"
|
|
|
|
end
|
|
|
|
|
2014-09-21 17:40:22 -04:00
|
|
|
step 'I should see project page' do
|
2015-06-12 00:44:13 -04:00
|
|
|
expect(page).to have_content "Empty"
|
|
|
|
expect(current_path).to eq namespace_project_path(Project.last.namespace, Project.last)
|
2012-09-10 09:35:23 -04:00
|
|
|
end
|
|
|
|
|
2014-09-21 17:40:22 -04:00
|
|
|
step 'I should see empty project instuctions' do
|
2015-06-12 00:44:13 -04:00
|
|
|
expect(page).to have_content "git init"
|
|
|
|
expect(page).to have_content "git remote"
|
|
|
|
expect(page).to have_content Project.last.url_to_repo
|
2012-09-10 09:35:23 -04:00
|
|
|
end
|
2013-09-13 05:37:13 -04:00
|
|
|
|
2014-09-21 17:40:22 -04:00
|
|
|
step 'I see empty project instuctions' do
|
2015-06-12 00:44:13 -04:00
|
|
|
expect(page).to have_content "git init"
|
|
|
|
expect(page).to have_content "git remote"
|
|
|
|
expect(page).to have_content Project.last.url_to_repo
|
2013-09-13 05:37:13 -04:00
|
|
|
end
|
|
|
|
|
2014-09-21 17:40:22 -04:00
|
|
|
step 'I click on HTTP' do
|
2013-09-13 05:37:13 -04:00
|
|
|
click_button 'HTTP'
|
|
|
|
end
|
|
|
|
|
2014-09-21 17:40:22 -04:00
|
|
|
step 'Remote url should update to http link' do
|
2015-06-12 00:44:13 -04:00
|
|
|
expect(page).to have_content "git remote add origin #{Project.last.http_url_to_repo}"
|
2013-09-13 05:37:13 -04:00
|
|
|
end
|
|
|
|
|
2014-09-21 17:40:22 -04:00
|
|
|
step 'If I click on SSH' do
|
2013-09-13 05:37:13 -04:00
|
|
|
click_button 'SSH'
|
|
|
|
end
|
|
|
|
|
2014-09-21 17:40:22 -04:00
|
|
|
step 'Remote url should update to ssh link' do
|
2015-06-12 00:44:13 -04:00
|
|
|
expect(page).to have_content "git remote add origin #{Project.last.url_to_repo}"
|
2013-09-13 05:37:13 -04:00
|
|
|
end
|
2012-09-10 09:35:23 -04:00
|
|
|
end
|