summaryrefslogtreecommitdiff
path: root/features
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2015-03-23 05:51:38 -0700
committerStan Hu <stanhu@gmail.com>2015-03-23 05:51:38 -0700
commita3daead1b00c28a16684cf11970ebd6da27511e2 (patch)
tree58798281668a824e1e810b4e65a4038cc2cc5a0d /features
parentfb30039668f68834d9951746181201423fa8b269 (diff)
downloadgitlab-ce-a3daead1b00c28a16684cf11970ebd6da27511e2.tar.gz
Include missing events and fix save functionality in admin service template settings form
Closes #1275
Diffstat (limited to 'features')
-rw-r--r--features/admin/settings.feature7
-rw-r--r--features/steps/admin/settings.rb29
2 files changed, 36 insertions, 0 deletions
diff --git a/features/admin/settings.feature b/features/admin/settings.feature
index 8fdf0575c2c..52e47307b23 100644
--- a/features/admin/settings.feature
+++ b/features/admin/settings.feature
@@ -7,3 +7,10 @@ Feature: Admin Settings
Scenario: Change application settings
When I modify settings and save form
Then I should see application settings saved
+
+ Scenario: Change Slack Service Template settings
+ When I click on "Service Templates"
+ And I click on "Slack" service
+ Then I check all events and submit form
+ And I should see service template settings saved
+ And I should see all checkboxes checked
diff --git a/features/steps/admin/settings.rb b/features/steps/admin/settings.rb
index c2d0d2a3fa3..87d4e969ff5 100644
--- a/features/steps/admin/settings.rb
+++ b/features/steps/admin/settings.rb
@@ -15,4 +15,33 @@ class Spinach::Features::AdminSettings < Spinach::FeatureSteps
current_application_settings.home_page_url.should == 'https://about.gitlab.com/'
page.should have_content 'Application settings saved successfully'
end
+
+ step 'I click on "Service Templates"' do
+ click_link 'Service Templates'
+ end
+
+ step 'I click on "Slack" service' do
+ click_link 'Slack'
+ end
+
+ step 'I check all events and submit form' do
+ page.check('Active')
+ page.check('Push events')
+ page.check('Tag push events')
+ page.check('Comments')
+ page.check('Issues events')
+ page.check('Merge Request events')
+ fill_in 'Webhook', with: "http://localhost"
+ click_on 'Save'
+ end
+
+ step 'I should see service template settings saved' do
+ page.should have_content 'Application settings saved successfully'
+ end
+
+ step 'I should see all checkboxes checked' do
+ all('input[type=checkbox]').each do |checkbox|
+ checkbox.should be_checked
+ end
+ end
end