gitlab-org--gitlab-foss/features/steps/project/project_services.rb

76 lines
1.8 KiB
Ruby
Raw Normal View History

2013-01-09 01:14:05 -05:00
class ProjectServices < Spinach::FeatureSteps
include SharedAuthentication
include SharedProject
include SharedPaths
When 'I visit project "Shop" services page' do
visit project_services_path(@project)
end
Then 'I should see list of available services' do
page.should have_content 'Services'
2013-05-22 11:10:51 -04:00
page.should have_content 'Campfire'
2013-05-23 14:10:32 -04:00
page.should have_content 'Hipchat'
2013-01-09 01:14:05 -05:00
page.should have_content 'GitLab CI'
end
And 'I click gitlab-ci service link' do
click_link 'GitLab CI'
end
And 'I fill gitlab-ci settings' do
check 'Active'
2013-05-22 11:10:51 -04:00
fill_in 'Project url', with: 'http://ci.gitlab.org/projects/3'
fill_in 'Token', with: 'verySecret'
2013-01-09 01:14:05 -05:00
click_button 'Save'
end
Then 'I should see service settings saved' do
2013-05-22 11:10:51 -04:00
find_field('Project url').value.should == 'http://ci.gitlab.org/projects/3'
2013-01-09 01:14:05 -05:00
end
2013-05-23 14:10:32 -04:00
And 'I click hipchat service link' do
click_link 'Hipchat'
end
And 'I fill hipchat settings' do
check 'Active'
fill_in 'Room', with: 'gitlab'
fill_in 'Token', with: 'verySecret'
click_button 'Save'
end
Then 'I should see hipchat service settings saved' do
find_field('Room').value.should == 'gitlab'
end
And 'I click pivotaltracker service link' do
click_link 'PivotalTracker'
end
And 'I fill pivotaltracker settings' do
check 'Active'
fill_in 'Token', with: 'verySecret'
click_button 'Save'
end
Then 'I should see pivotaltracker service settings saved' do
find_field('Token').value.should == 'verySecret'
end
And 'I click Flowdock service link' do
click_link 'Flowdock'
end
And 'I fill Flowdock settings' do
check 'Active'
fill_in 'Token', with: 'verySecret'
click_button 'Save'
end
Then 'I should see Flowdock service settings saved' do
find_field('Token').value.should == 'verySecret'
end
2013-01-09 01:14:05 -05:00
end