From 52352be6be357d30be9760d5b442e97806eb0e10 Mon Sep 17 00:00:00 2001 From: Kushal Pandya Date: Thu, 2 Mar 2017 17:57:01 +0000 Subject: Cleaning up navigational order - Project --- features/project/active_tab.feature | 6 +++--- features/project/graph.feature | 12 ++++++++++-- features/project/shortcuts.feature | 14 ++------------ features/steps/project/graph.rb | 4 ++++ features/steps/project/network_graph.rb | 2 +- features/steps/project/project_shortcuts.rb | 5 ----- features/steps/shared/paths.rb | 2 +- features/steps/shared/project_tab.rb | 12 ++---------- 8 files changed, 23 insertions(+), 34 deletions(-) (limited to 'features') diff --git a/features/project/active_tab.feature b/features/project/active_tab.feature index 5c14c5db665..1dd2bdd9b36 100644 --- a/features/project/active_tab.feature +++ b/features/project/active_tab.feature @@ -80,9 +80,9 @@ Feature: Project Active Tab And no other sub tabs should be active And the active main tab should be Repository - Scenario: On Project Repository/Network - Given I visit my project's network page - Then the active sub tab should be Network + Scenario: On Project Repository/Graph + Given I visit my project's graph page + Then the active sub tab should be Graph And no other sub tabs should be active And the active main tab should be Repository diff --git a/features/project/graph.feature b/features/project/graph.feature index 63793d6f989..b25c73ad870 100644 --- a/features/project/graph.feature +++ b/features/project/graph.feature @@ -9,9 +9,10 @@ Feature: Project Graph Then page should have graphs @javascript - Scenario: I should see project commits graphs + Scenario: I should see project languages & commits graphs on commits graph url When I visit project "Shop" commits graph page Then page should have commits graphs + Then page should have languages graphs @javascript Scenario: I should see project ci graphs @@ -20,6 +21,13 @@ Feature: Project Graph Then page should have CI graphs @javascript - Scenario: I should see project languages graphs + Scenario: I should see project languages & commits graphs on language graph url When I visit project "Shop" languages graph page Then page should have languages graphs + Then page should have commits graphs + + @javascript + Scenario: I should see project languages & commits graphs on charts url + When I visit project "Shop" chart page + Then page should have languages graphs + Then page should have commits graphs diff --git a/features/project/shortcuts.feature b/features/project/shortcuts.feature index f71f69ef060..95de63ba21a 100644 --- a/features/project/shortcuts.feature +++ b/features/project/shortcuts.feature @@ -19,16 +19,11 @@ Feature: Project Shortcuts Then the active sub tab should be Commits @javascript - Scenario: Navigate to network tab + Scenario: Navigate to graph tab Given I press "g" and "n" - Then the active sub tab should be Network + Then the active sub tab should be Graph And the active main tab should be Repository - @javascript - Scenario: Navigate to graphs tab - Given I press "g" and "g" - Then the active main tab should be Graphs - @javascript Scenario: Navigate to issues tab Given I press "g" and "i" @@ -53,8 +48,3 @@ Feature: Project Shortcuts Scenario: Navigate to project home Given I press "g" and "p" Then the active main tab should be Home - - @javascript - Scenario: Navigate to project feed - Given I press "g" and "e" - Then the active main tab should be Activity diff --git a/features/steps/project/graph.rb b/features/steps/project/graph.rb index 48ac7a98f0d..176d04d721c 100644 --- a/features/steps/project/graph.rb +++ b/features/steps/project/graph.rb @@ -18,6 +18,10 @@ class Spinach::Features::ProjectGraph < Spinach::FeatureSteps visit languages_namespace_project_graph_path(project.namespace, project, "master") end + step 'I visit project "Shop" chart page' do + visit charts_namespace_project_graph_path(project.namespace, project, "master") + end + step 'page should have languages graphs' do expect(page).to have_content /Ruby 66.* %/ expect(page).to have_content /JavaScript 22.* %/ diff --git a/features/steps/project/network_graph.rb b/features/steps/project/network_graph.rb index ff9251615c9..370e46265c7 100644 --- a/features/steps/project/network_graph.rb +++ b/features/steps/project/network_graph.rb @@ -66,7 +66,7 @@ class Spinach::Features::ProjectNetworkGraph < Spinach::FeatureSteps end step 'page should have "v1.0.0" in title' do - expect(page).to have_css 'title', text: 'Network · v1.0.0', visible: false + expect(page).to have_css 'title', text: 'Graph · v1.0.0', visible: false end step 'page should only have content from "v1.0.0"' do diff --git a/features/steps/project/project_shortcuts.rb b/features/steps/project/project_shortcuts.rb index 8143b01ca40..02c08b784bc 100644 --- a/features/steps/project/project_shortcuts.rb +++ b/features/steps/project/project_shortcuts.rb @@ -34,9 +34,4 @@ class Spinach::Features::ProjectShortcuts < Spinach::FeatureSteps find('body').native.send_key('g') find('body').native.send_key('w') end - - step 'I press "g" and "e"' do - find('body').native.send_key('g') - find('body').native.send_key('e') - end end diff --git a/features/steps/shared/paths.rb b/features/steps/shared/paths.rb index 718cf924729..d5b3bb34d7a 100644 --- a/features/steps/shared/paths.rb +++ b/features/steps/shared/paths.rb @@ -232,7 +232,7 @@ module SharedPaths visit stats_namespace_project_repository_path(@project.namespace, @project) end - step "I visit my project's network page" do + step "I visit my project's graph page" do # Stub Graph max_size to speed up test (10 commits vs. 650) Network::Graph.stub(max_count: 10) diff --git a/features/steps/shared/project_tab.rb b/features/steps/shared/project_tab.rb index d6024212601..83446afe424 100644 --- a/features/steps/shared/project_tab.rb +++ b/features/steps/shared/project_tab.rb @@ -12,10 +12,6 @@ module SharedProjectTab ensure_active_main_tab('Repository') end - step 'the active main tab should be Graphs' do - ensure_active_main_tab('Graphs') - end - step 'the active main tab should be Issues' do ensure_active_main_tab('Issues') end @@ -40,12 +36,8 @@ module SharedProjectTab expect(page).to have_selector('.layout-nav .nav-links > li.active', count: 0) end - step 'the active main tab should be Activity' do - ensure_active_main_tab('Activity') - end - - step 'the active sub tab should be Network' do - ensure_active_sub_tab('Network') + step 'the active sub tab should be Graph' do + ensure_active_sub_tab('Graph') end step 'the active sub tab should be Files' do -- cgit v1.2.3