From 22479fd0ae41d16d7bbd579615ee10c4b22deeed Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Fri, 1 Apr 2016 19:53:29 +0200 Subject: Remove tests with back button Signed-off-by: Dmitriy Zaporozhets --- features/groups.feature | 4 ---- features/project/project.feature | 9 --------- features/steps/groups.rb | 4 ---- features/steps/project/project.rb | 8 -------- 4 files changed, 25 deletions(-) (limited to 'features') diff --git a/features/groups.feature b/features/groups.feature index 419a5d3963d..49e939807b5 100644 --- a/features/groups.feature +++ b/features/groups.feature @@ -7,10 +7,6 @@ Feature: Groups When I visit group "NonExistentGroup" page Then page status code should be 404 - Scenario: I should have back to group button - When I visit group "Owned" page - Then I should see back to dashboard button - @javascript Scenario: I should see group "Owned" dashboard list When I visit group "Owned" page diff --git a/features/project/project.feature b/features/project/project.feature index f1f3ed26065..aa22401c88e 100644 --- a/features/project/project.feature +++ b/features/project/project.feature @@ -18,15 +18,6 @@ Feature: Project Then I should see the default project avatar And I should not see the "Remove avatar" button - Scenario: I should have back to group button - And project "Shop" belongs to group - And I visit project "Shop" page - Then I should see back to group button - - Scenario: I should have back to group button - And I visit project "Shop" page - Then I should see back to dashboard button - Scenario: I should have readme on page And I visit project "Shop" page Then I should see project "Shop" README diff --git a/features/steps/groups.rb b/features/steps/groups.rb index e5b7db4c5e3..483370f41c6 100644 --- a/features/steps/groups.rb +++ b/features/steps/groups.rb @@ -4,10 +4,6 @@ class Spinach::Features::Groups < Spinach::FeatureSteps include SharedGroup include SharedUser - step 'I should see back to dashboard button' do - expect(page).to have_content 'Go to dashboard' - end - step 'I should see group "Owned"' do expect(page).to have_content '@owned' end diff --git a/features/steps/project/project.rb b/features/steps/project/project.rb index ef185861e00..d24f3cc3065 100644 --- a/features/steps/project/project.rb +++ b/features/steps/project/project.rb @@ -123,14 +123,6 @@ class Spinach::Features::Project < Spinach::FeatureSteps @project.save! end - step 'I should see back to dashboard button' do - expect(page).to have_content 'Go to dashboard' - end - - step 'I should see back to group button' do - expect(page).to have_content 'Go to group' - end - step 'I click notifications drop down button' do click_link 'notifications-button' end -- cgit v1.2.3 From 847940516b73977c2471d830e64a439f2d226685 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Fri, 1 Apr 2016 22:35:49 +0200 Subject: Fix some active tab tests that are broken because of 2 level sidebar Signed-off-by: Dmitriy Zaporozhets --- features/steps/group/milestones.rb | 4 +++- features/steps/project/active_tab.rb | 4 +++- features/steps/shared/project_tab.rb | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) (limited to 'features') diff --git a/features/steps/group/milestones.rb b/features/steps/group/milestones.rb index a167d259837..f047669ba3d 100644 --- a/features/steps/group/milestones.rb +++ b/features/steps/group/milestones.rb @@ -5,7 +5,9 @@ class Spinach::Features::GroupMilestones < Spinach::FeatureSteps include SharedUser step 'I click on group milestones' do - click_link 'Milestones' + within '.nav-secondary' do + click_link 'Milestones' + end end step 'I should see group milestones index page has no milestones' do diff --git a/features/steps/project/active_tab.rb b/features/steps/project/active_tab.rb index 19d81453d8c..b08eb45a452 100644 --- a/features/steps/project/active_tab.rb +++ b/features/steps/project/active_tab.rb @@ -82,7 +82,9 @@ class Spinach::Features::ProjectActiveTab < Spinach::FeatureSteps # Sub Tabs: Issues step 'I click the "Milestones" tab' do - click_link('Milestones') + within '.nav-secondary' do + click_link('Milestones') + end end step 'I click the "Labels" tab' do diff --git a/features/steps/shared/project_tab.rb b/features/steps/shared/project_tab.rb index 4fc2ece79ff..fa7d24ce611 100644 --- a/features/steps/shared/project_tab.rb +++ b/features/steps/shared/project_tab.rb @@ -41,7 +41,7 @@ module SharedProjectTab end step 'the active main tab should be Settings' do - page.within '.nav-sidebar' do + page.within '.nav-secondary' do expect(page).to have_content('Go to project') end end -- cgit v1.2.3 From 31b27adeb864ae5f057061b1c208005be181dac4 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Sat, 2 Apr 2016 11:26:46 +0200 Subject: Fix milestones tab active state and tests Signed-off-by: Dmitriy Zaporozhets --- features/steps/group/milestones.rb | 4 ++-- features/steps/project/active_tab.rb | 2 +- features/steps/project/fork.rb | 2 +- features/steps/project/project.rb | 4 +++- 4 files changed, 7 insertions(+), 5 deletions(-) (limited to 'features') diff --git a/features/steps/group/milestones.rb b/features/steps/group/milestones.rb index f047669ba3d..b6ce5bc9cec 100644 --- a/features/steps/group/milestones.rb +++ b/features/steps/group/milestones.rb @@ -5,8 +5,8 @@ class Spinach::Features::GroupMilestones < Spinach::FeatureSteps include SharedUser step 'I click on group milestones' do - within '.nav-secondary' do - click_link 'Milestones' + page.within '.nav-secondary' do + click_link("Milestones") end end diff --git a/features/steps/project/active_tab.rb b/features/steps/project/active_tab.rb index b08eb45a452..4584fc4d754 100644 --- a/features/steps/project/active_tab.rb +++ b/features/steps/project/active_tab.rb @@ -82,7 +82,7 @@ class Spinach::Features::ProjectActiveTab < Spinach::FeatureSteps # Sub Tabs: Issues step 'I click the "Milestones" tab' do - within '.nav-secondary' do + page.within '.nav-secondary' do click_link('Milestones') end end diff --git a/features/steps/project/fork.rb b/features/steps/project/fork.rb index 527f7853da9..d9b16afa9b8 100644 --- a/features/steps/project/fork.rb +++ b/features/steps/project/fork.rb @@ -36,7 +36,7 @@ class Spinach::Features::ProjectFork < Spinach::FeatureSteps end step 'I goto the Merge Requests page' do - page.within '.page-sidebar-expanded' do + page.within '.nav-secondary' do click_link "Merge Requests" end end diff --git a/features/steps/project/project.rb b/features/steps/project/project.rb index d24f3cc3065..8f1d4a223a9 100644 --- a/features/steps/project/project.rb +++ b/features/steps/project/project.rb @@ -114,7 +114,9 @@ class Spinach::Features::Project < Spinach::FeatureSteps end step 'I should not see "Snippets" button' do - expect(page).not_to have_link 'Snippets' + page.within '.nav-secondary' do + expect(page).not_to have_link 'Snippets' + end end step 'project "Shop" belongs to group' do -- cgit v1.2.3