diff options
-rw-r--r-- | features/project/active_tab.feature | 13 | ||||
-rw-r--r-- | features/steps/project/active_tab.rb | 16 |
2 files changed, 23 insertions, 6 deletions
diff --git a/features/project/active_tab.feature b/features/project/active_tab.feature index e7f36332faf..8570c637b36 100644 --- a/features/project/active_tab.feature +++ b/features/project/active_tab.feature @@ -7,9 +7,8 @@ Feature: Project Active Tab Scenario: On Project Home Given I visit my project's home page - And I click the "Home" tab - Then the active sub nav should be Home - And no other sub navs should be active + Then the active sub tab should be Home + And no other sub tabs should be active And the active main tab should be Project Scenario: On Project Repository @@ -36,14 +35,16 @@ Feature: Project Active Tab Scenario: On Project Home/Show Given I visit my project's home page - Then the active main tab should be Project + Then the active sub tab should be Home + And no other sub tabs should be active + And the active main tab should be Project And no other main tabs should be active Scenario: On Project Home/Activity Given I visit my project's home page And I click the "Activity" tab - Then the active sub nav should be Activity - And no other sub navs should be active + Then the active sub tab should be Activity + And no other sub tabs should be active And the active main tab should be Project # Sub Tabs: Settings diff --git a/features/steps/project/active_tab.rb b/features/steps/project/active_tab.rb index e842d7bec2b..d29b22d42ec 100644 --- a/features/steps/project/active_tab.rb +++ b/features/steps/project/active_tab.rb @@ -39,6 +39,12 @@ class Spinach::Features::ProjectActiveTab < Spinach::FeatureSteps click_link('Pages') end + step 'I click the "Activity" tab' do + page.within '.sub-nav' do + click_link('Activity') + end + end + step 'the active sub nav should be Members' do ensure_active_sub_nav('Members') end @@ -55,6 +61,10 @@ class Spinach::Features::ProjectActiveTab < Spinach::FeatureSteps ensure_active_sub_nav('Pages') end + step 'the active sub tab should be Activity' do + ensure_active_sub_tab('Activity') + end + # Sub Tabs: Commits step 'I click the "Compare" tab' do @@ -71,6 +81,12 @@ class Spinach::Features::ProjectActiveTab < Spinach::FeatureSteps click_link('Tags') end + step 'I click the "Charts" tab' do + page.within '.sub-nav' do + click_link('Charts') + end + end + step 'the active sub tab should be Compare' do ensure_active_sub_tab('Compare') end |