From 1ee4f98694f482099de9f21dc957071e53395313 Mon Sep 17 00:00:00 2001 From: Jose Ivan Vargas Date: Fri, 30 Dec 2016 13:27:51 -0600 Subject: Fixed spinach feature tests for the services and hooks controllers Added a test for the integrations controller --- features/steps/project/hooks.rb | 6 +++--- features/steps/project/services.rb | 2 +- features/steps/shared/paths.rb | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'features') diff --git a/features/steps/project/hooks.rb b/features/steps/project/hooks.rb index 13c0713669a..37b608ffbd3 100644 --- a/features/steps/project/hooks.rb +++ b/features/steps/project/hooks.rb @@ -36,12 +36,12 @@ class Spinach::Features::ProjectHooks < Spinach::FeatureSteps end step 'I should see newly created hook' do - expect(current_path).to eq namespace_project_hooks_path(current_project.namespace, current_project) + expect(current_path).to eq namespace_project_settings_integrations_path(current_project.namespace, current_project) expect(page).to have_content(@url) end step 'I should see newly created hook with SSL verification enabled' do - expect(current_path).to eq namespace_project_hooks_path(current_project.namespace, current_project) + expect(current_path).to eq namespace_project_settings_integrations_path(current_project.namespace, current_project) expect(page).to have_content(@url) expect(page).to have_content("SSL Verification: enabled") end @@ -57,7 +57,7 @@ class Spinach::Features::ProjectHooks < Spinach::FeatureSteps end step 'hook should be triggered' do - expect(current_path).to eq namespace_project_hooks_path(current_project.namespace, current_project) + expect(current_path).to eq namespace_project_settings_integrations_path(current_project.namespace, current_project) expect(page).to have_selector '.flash-notice', text: 'Hook executed successfully: HTTP 200' end diff --git a/features/steps/project/services.rb b/features/steps/project/services.rb index a4d29770922..772b07d0ad8 100644 --- a/features/steps/project/services.rb +++ b/features/steps/project/services.rb @@ -4,7 +4,7 @@ class Spinach::Features::ProjectServices < Spinach::FeatureSteps include SharedPaths step 'I visit project "Shop" services page' do - visit namespace_project_services_path(@project.namespace, @project) + visit namespace_project_settings_integrations_path(@project.namespace, @project) end step 'I should see list of available services' do diff --git a/features/steps/shared/paths.rb b/features/steps/shared/paths.rb index 670e6ca49a3..718cf924729 100644 --- a/features/steps/shared/paths.rb +++ b/features/steps/shared/paths.rb @@ -256,7 +256,7 @@ module SharedPaths end step 'I visit project hooks page' do - visit namespace_project_hooks_path(@project.namespace, @project) + visit namespace_project_settings_integrations_path(@project.namespace, @project) end step 'I visit project deploy keys page' do -- cgit v1.2.3 From bc7c6c689239a5db3f0c4edcbb77d6b9e586ba22 Mon Sep 17 00:00:00 2001 From: Jose Ivan Vargas Date: Fri, 30 Dec 2016 15:09:31 -0600 Subject: Fixed more tests --- features/project/active_tab.feature | 6 +++--- features/steps/project/active_tab.rb | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'features') diff --git a/features/project/active_tab.feature b/features/project/active_tab.feature index 57dda9c2234..d033e6b167b 100644 --- a/features/project/active_tab.feature +++ b/features/project/active_tab.feature @@ -39,10 +39,10 @@ Feature: Project Active Tab # Sub Tabs: Settings - Scenario: On Project Settings/Hooks + Scenario: On Project Settings/Integrations Given I visit my project's settings page - And I click the "Hooks" tab - Then the active sub nav should be Hooks + And I click the "Integrations" tab + Then the active sub nav should be Integrations And no other sub navs should be active And the active main tab should be Settings diff --git a/features/steps/project/active_tab.rb b/features/steps/project/active_tab.rb index 58225032859..9f701840f1d 100644 --- a/features/steps/project/active_tab.rb +++ b/features/steps/project/active_tab.rb @@ -27,8 +27,8 @@ class Spinach::Features::ProjectActiveTab < Spinach::FeatureSteps end end - step 'I click the "Hooks" tab' do - click_link('Webhooks') + step 'I click the "Integrations" tab' do + click_link('Integrations') end step 'I click the "Deploy Keys" tab' do @@ -39,8 +39,8 @@ class Spinach::Features::ProjectActiveTab < Spinach::FeatureSteps ensure_active_sub_nav('Members') end - step 'the active sub nav should be Hooks' do - ensure_active_sub_nav('Webhooks') + step 'the active sub nav should be Integrations' do + ensure_active_sub_nav('Integrations') end step 'the active sub nav should be Deploy Keys' do -- cgit v1.2.3