Commit 441948f4 authored by Annabel Dunstone Gray's avatar Annabel Dunstone Gray

Fix spinach tests

parent 4281daf3
...@@ -18,7 +18,7 @@ Feature: Dashboard Active Tab ...@@ -18,7 +18,7 @@ Feature: Dashboard Active Tab
Then the active main tab should be Merge Requests Then the active main tab should be Merge Requests
And no other main tabs should be active And no other main tabs should be active
Scenario: On Dashboard Help Scenario: On Dashboard Groups
Given I visit dashboard help page Given I visit dashboard groups page
Then the active main tab should be Help Then the active main tab should be Groups
And no other main tabs should be active And no other main tabs should be active
...@@ -11,7 +11,6 @@ Feature: Dashboard ...@@ -11,7 +11,6 @@ Feature: Dashboard
And I visit dashboard page And I visit dashboard page
Scenario: I should see projects list Scenario: I should see projects list
Then I should see "New Project" link
Then I should see "Shop" project link Then I should see "Shop" project link
Then I should see "Shop" project CI status Then I should see "Shop" project CI status
......
module SharedSidebarActiveTab module SharedSidebarActiveTab
include Spinach::DSL include Spinach::DSL
step 'the active main tab should be Help' do
ensure_active_main_tab('Help')
end
step 'no other main tabs should be active' do step 'no other main tabs should be active' do
expect(page).to have_selector('.nav-sidebar > li.active', count: 1) expect(page).to have_selector('.nav-sidebar li.active', count: 1)
end end
def ensure_active_main_tab(content) def ensure_active_main_tab(content)
...@@ -17,6 +13,10 @@ module SharedSidebarActiveTab ...@@ -17,6 +13,10 @@ module SharedSidebarActiveTab
ensure_active_main_tab('Projects') ensure_active_main_tab('Projects')
end end
step 'the active main tab should be Groups' do
ensure_active_main_tab('Groups')
end
step 'the active main tab should be Projects' do step 'the active main tab should be Projects' do
ensure_active_main_tab('Projects') ensure_active_main_tab('Projects')
end end
...@@ -28,8 +28,4 @@ module SharedSidebarActiveTab ...@@ -28,8 +28,4 @@ module SharedSidebarActiveTab
step 'the active main tab should be Merge Requests' do step 'the active main tab should be Merge Requests' do
ensure_active_main_tab('Merge Requests') ensure_active_main_tab('Merge Requests')
end end
step 'the active main tab should be Help' do
ensure_active_main_tab('Help')
end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment