summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKushal Pandya <kushal@gitlab.com>2017-03-03 13:46:10 +0530
committerKushal Pandya <kushal@gitlab.com>2017-03-03 13:46:10 +0530
commitdfbb4709101252abd409d98f82fbc56705808a06 (patch)
treebe47209f133c85be89c85f2d74dfa3e8de21ccc1
parent30fd7c062733c464ef8bb561fc6a92597cf0243b (diff)
downloadgitlab-ce-28538-restore-nav-shortcuts.tar.gz
Fix failing tests for updated nav28538-restore-nav-shortcuts
-rw-r--r--features/project/active_tab.feature13
-rw-r--r--features/steps/project/active_tab.rb16
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