debian-mirror-gitlab/features/steps/project/create.rb

46 lines
1.3 KiB
Ruby
Raw Normal View History

2015-04-26 12:48:37 +05:30
class Spinach::Features::ProjectCreate < Spinach::FeatureSteps
2014-09-02 18:07:02 +05:30
include SharedAuthentication
include SharedPaths
2015-12-23 02:04:40 +05:30
include SharedUser
2014-09-02 18:07:02 +05:30
2015-04-26 12:48:37 +05:30
step 'fill project form with valid data' do
fill_in 'project_path', with: 'Empty'
2014-09-02 18:07:02 +05:30
click_button "Create project"
end
2015-04-26 12:48:37 +05:30
step 'I should see project page' do
2015-09-11 14:41:01 +05:30
expect(page).to have_content "Empty"
expect(current_path).to eq namespace_project_path(Project.last.namespace, Project.last)
2014-09-02 18:07:02 +05:30
end
2015-04-26 12:48:37 +05:30
step 'I should see empty project instuctions' do
2015-09-11 14:41:01 +05:30
expect(page).to have_content "git init"
expect(page).to have_content "git remote"
expect(page).to have_content Project.last.url_to_repo
2014-09-02 18:07:02 +05:30
end
2015-04-26 12:48:37 +05:30
step 'I see empty project instuctions' do
2015-09-11 14:41:01 +05:30
expect(page).to have_content "git init"
expect(page).to have_content "git remote"
expect(page).to have_content Project.last.url_to_repo
2014-09-02 18:07:02 +05:30
end
2015-04-26 12:48:37 +05:30
step 'I click on HTTP' do
find('#clone-dropdown').click
find('#http-selector').click
2014-09-02 18:07:02 +05:30
end
2015-04-26 12:48:37 +05:30
step 'Remote url should update to http link' do
2015-09-11 14:41:01 +05:30
expect(page).to have_content "git remote add origin #{Project.last.http_url_to_repo}"
2014-09-02 18:07:02 +05:30
end
2015-04-26 12:48:37 +05:30
step 'If I click on SSH' do
find('#clone-dropdown').click
find('#ssh-selector').click
2014-09-02 18:07:02 +05:30
end
2015-04-26 12:48:37 +05:30
step 'Remote url should update to ssh link' do
2015-09-11 14:41:01 +05:30
expect(page).to have_content "git remote add origin #{Project.last.url_to_repo}"
2014-09-02 18:07:02 +05:30
end
end