From d1fa3b336d1d3e3c1f9a10ca007e3d1193e5e205 Mon Sep 17 00:00:00 2001 From: Sullivan SENECHAL Date: Wed, 1 Oct 2014 02:48:41 +0200 Subject: Add Pushover service integration That introduce select field type for services options. --- features/project/service.feature | 6 ++++++ features/steps/project/services.rb | 23 +++++++++++++++++++++++ 2 files changed, 29 insertions(+) (limited to 'features') diff --git a/features/project/service.feature b/features/project/service.feature index a5af065c9e7..af88eaefa8f 100644 --- a/features/project/service.feature +++ b/features/project/service.feature @@ -43,6 +43,12 @@ Feature: Project Services And I fill Slack settings Then I should see Slack service settings saved + Scenario: Activate Pushover service + When I visit project "Shop" services page + And I click Pushover service link + And I fill Pushover settings + Then I should see Pushover service settings saved + Scenario: Activate email on push service When I visit project "Shop" services page And I click email on push service link diff --git a/features/steps/project/services.rb b/features/steps/project/services.rb index b56b413eac8..d816fcafbaa 100644 --- a/features/steps/project/services.rb +++ b/features/steps/project/services.rb @@ -13,6 +13,7 @@ class Spinach::Features::ProjectServices < Spinach::FeatureSteps page.should have_content 'Hipchat' page.should have_content 'GitLab CI' page.should have_content 'Assembla' + page.should have_content 'Pushover' end step 'I click gitlab-ci service link' do @@ -118,4 +119,26 @@ class Spinach::Features::ProjectServices < Spinach::FeatureSteps find_field('Room').value.should == '#gitlab' find_field('Token').value.should == 'verySecret' end + + step 'I click Pushover service link' do + click_link 'Pushover' + end + + step 'I fill Pushover settings' do + check 'Active' + fill_in 'Api key', with: 'verySecret' + fill_in 'User key', with: 'verySecret' + fill_in 'Device', with: 'myDevice' + select 'High Priority', from: 'Priority' + select 'Bike', from: 'Sound' + click_button 'Save' + end + + step 'I should see Pushover service settings saved' do + find_field('Api key').value.should == 'verySecret' + find_field('User key').value.should == 'verySecret' + find_field('Device').value.should == 'myDevice' + find_field('Priority').find('option[selected]').value.should == '1' + find_field('Sound').find('option[selected]').value.should == 'bike' + end end -- cgit v1.2.1