summaryrefslogtreecommitdiff
path: root/features
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-12-17 16:29:08 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-12-17 16:29:08 +0200
commit68f8ffb55164a97bae4efec30646ee6cb0036f5a (patch)
treecdda1177c492a4743fab4abc86ea37d8f7e71e00 /features
parent074efd8fd57736bcec25b2f08324b9d25aa886d5 (diff)
downloadgitlab-ce-68f8ffb55164a97bae4efec30646ee6cb0036f5a.tar.gz
Add spinach tests for email on push service
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'features')
-rw-r--r--features/project/service.feature8
-rw-r--r--features/steps/project/project_services.rb47
2 files changed, 37 insertions, 18 deletions
diff --git a/features/project/service.feature b/features/project/service.feature
index f8684f3b3b7..46b983e8f9a 100644
--- a/features/project/service.feature
+++ b/features/project/service.feature
@@ -35,4 +35,10 @@ Feature: Project Services
When I visit project "Shop" services page
And I click Assembla service link
And I fill Assembla settings
- Then I should see Assembla service settings saved \ No newline at end of file
+ Then I should see Assembla service settings saved
+
+ Scenario: Activate email on push service
+ When I visit project "Shop" services page
+ And I click email on push service link
+ And I fill email on push settings
+ Then I should see email on push service settings saved
diff --git a/features/steps/project/project_services.rb b/features/steps/project/project_services.rb
index 2f248090831..549968dce55 100644
--- a/features/steps/project/project_services.rb
+++ b/features/steps/project/project_services.rb
@@ -3,11 +3,11 @@ class ProjectServices < Spinach::FeatureSteps
include SharedProject
include SharedPaths
- When 'I visit project "Shop" services page' do
+ step 'I visit project "Shop" services page' do
visit project_services_path(@project)
end
- Then 'I should see list of available services' do
+ step 'I should see list of available services' do
page.should have_content 'Services'
page.should have_content 'Campfire'
page.should have_content 'Hipchat'
@@ -15,76 +15,89 @@ class ProjectServices < Spinach::FeatureSteps
page.should have_content 'Assembla'
end
- And 'I click gitlab-ci service link' do
+ step 'I click gitlab-ci service link' do
click_link 'GitLab CI'
end
- And 'I fill gitlab-ci settings' do
+ step 'I fill gitlab-ci settings' do
check 'Active'
fill_in 'Project url', with: 'http://ci.gitlab.org/projects/3'
fill_in 'Token', with: 'verySecret'
click_button 'Save'
end
- Then 'I should see service settings saved' do
+ step 'I should see service settings saved' do
find_field('Project url').value.should == 'http://ci.gitlab.org/projects/3'
end
- And 'I click hipchat service link' do
+ step 'I click hipchat service link' do
click_link 'Hipchat'
end
- And 'I fill hipchat settings' do
+ step '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
+ step 'I should see hipchat service settings saved' do
find_field('Room').value.should == 'gitlab'
end
- And 'I click pivotaltracker service link' do
+ step 'I click pivotaltracker service link' do
click_link 'PivotalTracker'
end
- And 'I fill pivotaltracker settings' do
+ step '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
+ step 'I should see pivotaltracker service settings saved' do
find_field('Token').value.should == 'verySecret'
end
- And 'I click Flowdock service link' do
+ step 'I click Flowdock service link' do
click_link 'Flowdock'
end
- And 'I fill Flowdock settings' do
+ step '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
+ step 'I should see Flowdock service settings saved' do
find_field('Token').value.should == 'verySecret'
end
- And 'I click Assembla service link' do
+ step 'I click Assembla service link' do
click_link 'Assembla'
end
- And 'I fill Assembla settings' do
+ step 'I fill Assembla settings' do
check 'Active'
fill_in 'Token', with: 'verySecret'
click_button 'Save'
end
- Then 'I should see Assembla service settings saved' do
+ step 'I should see Assembla service settings saved' do
find_field('Token').value.should == 'verySecret'
end
+
+ step 'I click email on push service link' do
+ click_link 'Emails on push'
+ end
+
+ step 'I fill email on push settings' do
+ fill_in 'Recipients', with: 'qa@company.name'
+ click_button 'Save'
+ end
+
+ step 'I should see email on push service settings saved' do
+ find_field('Recipients').value.should == 'qa@company.name'
+ end
end