From c6067a20b7fc29705d89b25a9bad28a9f10dcc78 Mon Sep 17 00:00:00 2001 From: Clement Ho Date: Wed, 8 Mar 2017 09:00:22 +0000 Subject: Merge branch 'settings-tab' into 'master' Removed the settings gear button inside the project view to a tab Closes #26733 See merge request !9786 --- features/project/active_tab.feature | 16 ++++++++-------- features/steps/project/active_tab.rb | 28 ++++++++++++++++------------ features/steps/shared/project_tab.rb | 6 +++--- 3 files changed, 27 insertions(+), 23 deletions(-) (limited to 'features') diff --git a/features/project/active_tab.feature b/features/project/active_tab.feature index ba04b03c3cc..0d6f7350181 100644 --- a/features/project/active_tab.feature +++ b/features/project/active_tab.feature @@ -52,28 +52,28 @@ Feature: Project Active Tab Scenario: On Project Settings/Integrations Given I visit my project's settings page And I click the "Integrations" tab - Then the active sub nav should be Integrations - And no other sub navs should be active + Then the active sub tab should be Integrations + And no other sub tabs should be active And the active main tab should be Settings Scenario: On Project Settings/Repository Given I visit my project's settings page And I click the "Repository" tab - Then the active sub nav should be Repository - And no other sub navs should be active + Then the active sub tab should be Repository + And no other sub tabs should be active And the active main tab should be Settings Scenario: On Project Settings/Pages Given I visit my project's settings page And I click the "Pages" tab - Then the active sub nav should be Pages - And no other sub navs should be active + Then the active sub tab should be Pages + And no other sub tabs should be active And the active main tab should be Settings Scenario: On Project Members Given I visit my project's members page - Then the active sub nav should be Members - And no other sub navs should be active + Then the active sub tab should be Members + And no other sub tabs should be active And the active main tab should be Settings # Sub Tabs: Repository diff --git a/features/steps/project/active_tab.rb b/features/steps/project/active_tab.rb index f901f4889dd..4befd49ac81 100644 --- a/features/steps/project/active_tab.rb +++ b/features/steps/project/active_tab.rb @@ -22,23 +22,27 @@ class Spinach::Features::ProjectActiveTab < Spinach::FeatureSteps end step 'I click the "Edit Project"' do - page.within '.layout-nav .controls' do + page.within '.sub-nav' do click_link('Edit Project') end end step 'I click the "Integrations" tab' do - click_link('Integrations') + page.within '.sub-nav' do + click_link('Integrations') + end end step 'I click the "Repository" tab' do - page.within '.layout-nav .controls' do + page.within '.sub-nav' do click_link('Repository') end end step 'I click the "Pages" tab' do - click_link('Pages') + page.within '.sub-nav' do + click_link('Pages') + end end step 'I click the "Activity" tab' do @@ -47,20 +51,20 @@ class Spinach::Features::ProjectActiveTab < Spinach::FeatureSteps end end - step 'the active sub nav should be Members' do - ensure_active_sub_nav('Members') + step 'the active sub tab should be Members' do + ensure_active_sub_tab('Members') end - step 'the active sub nav should be Integrations' do - ensure_active_sub_nav('Integrations') + step 'the active sub tab should be Integrations' do + ensure_active_sub_tab('Integrations') end - step 'the active sub nav should be Repository' do - ensure_active_sub_nav('Repository') + step 'the active sub tab should be Repository' do + ensure_active_sub_tab('Repository') end - step 'the active sub nav should be Pages' do - ensure_active_sub_nav('Pages') + step 'the active sub tab should be Pages' do + ensure_active_sub_tab('Pages') end step 'the active sub tab should be Activity' do diff --git a/features/steps/shared/project_tab.rb b/features/steps/shared/project_tab.rb index 400114f03c0..0cb9229dbae 100644 --- a/features/steps/shared/project_tab.rb +++ b/features/steps/shared/project_tab.rb @@ -16,8 +16,8 @@ module SharedProjectTab ensure_active_main_tab('Issues') end - step 'the active main tab should be Members' do - ensure_active_main_tab('Members') + step 'the active sub tab should be Members' do + ensure_active_sub_tab('Members') end step 'the active main tab should be Merge Requests' do @@ -33,7 +33,7 @@ module SharedProjectTab end step 'the active main tab should be Settings' do - expect(page).to have_selector('.layout-nav .nav-links > li.active', count: 0) + ensure_active_main_tab('Settings') end step 'the active sub tab should be Graph' do -- cgit v1.2.1