From 79b9ff60768644287daace5a8f640d1790816353 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Mon, 16 May 2016 12:36:27 -0500 Subject: Modify tests to match new navigation behaviour for project pages Signed-off-by: Dmitriy Zaporozhets --- features/steps/admin/active_tab.rb | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'features/steps/admin') diff --git a/features/steps/admin/active_tab.rb b/features/steps/admin/active_tab.rb index 90d13abdb13..f2db1801389 100644 --- a/features/steps/admin/active_tab.rb +++ b/features/steps/admin/active_tab.rb @@ -1,7 +1,7 @@ class Spinach::Features::AdminActiveTab < Spinach::FeatureSteps include SharedAuthentication include SharedPaths - include SharedActiveTab + include SharedSidebarActiveTab step 'the active main tab should be Home' do ensure_active_main_tab('Overview') @@ -34,4 +34,12 @@ class Spinach::Features::AdminActiveTab < Spinach::FeatureSteps step 'the active main tab should be Messages' do ensure_active_main_tab('Messages') end + + step 'no other main tabs should be active' do + expect(page).to have_selector('.nav-sidebar > li.active', count: 1) + end + + def ensure_active_main_tab(content) + expect(find('.nav-sidebar > li.active')).to have_content(content) + end end -- cgit v1.2.1 From 75739e54be0fca389c05d3d9d3de69737c0ff3ab Mon Sep 17 00:00:00 2001 From: Robert Speicher Date: Mon, 23 May 2016 19:37:59 -0400 Subject: Enable RSpec/NotToNot cop and auto-correct offenses Also removes the note from the development/testing.md guide --- features/steps/admin/users.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'features/steps/admin') diff --git a/features/steps/admin/users.rb b/features/steps/admin/users.rb index 4bc290b6bdf..8fb8a86d58b 100644 --- a/features/steps/admin/users.rb +++ b/features/steps/admin/users.rb @@ -158,7 +158,7 @@ class Spinach::Features::AdminUsers < Spinach::FeatureSteps step 'I should not see twitter details' do expect(page).to have_content 'Pete' - expect(page).to_not have_content 'twitter' + expect(page).not_to have_content 'twitter' end step 'click on ssh keys tab' do -- cgit v1.2.1