From 2605a0a844f187daeeff1f16920db445f53e2793 Mon Sep 17 00:00:00 2001 From: Josh Frye Date: Wed, 1 Jun 2016 10:50:32 -0400 Subject: Refactor. Add tests. --- features/steps/project/builds/summary.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'features/steps') diff --git a/features/steps/project/builds/summary.rb b/features/steps/project/builds/summary.rb index e9e2359146e..374eb0b0e07 100644 --- a/features/steps/project/builds/summary.rb +++ b/features/steps/project/builds/summary.rb @@ -36,4 +36,8 @@ class Spinach::Features::ProjectBuildsSummary < Spinach::FeatureSteps expect(page).to have_content 'Build has been erased' end end + + step 'the build count cache is updated' do + expect(@build.project.running_or_pending_build_count).to eq @build.project.builds.running_or_pending.count(:all) + end end -- cgit v1.2.3 From 7cfb445c15bdec0268f0a3800481e9cced973648 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Thu, 2 Jun 2016 19:35:46 +0300 Subject: Update tests to match new Code tab logic Signed-off-by: Dmitriy Zaporozhets --- features/steps/project/active_tab.rb | 4 ++++ features/steps/shared/project_tab.rb | 8 ++------ 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'features/steps') diff --git a/features/steps/project/active_tab.rb b/features/steps/project/active_tab.rb index 4a5a71e7e61..7db0d337192 100644 --- a/features/steps/project/active_tab.rb +++ b/features/steps/project/active_tab.rb @@ -63,6 +63,10 @@ class Spinach::Features::ProjectActiveTab < Spinach::FeatureSteps click_link('Tags') end + step 'the active sub tab should be Files' do + ensure_active_sub_tab('Files') + end + step 'the active sub tab should be Commits' do ensure_active_sub_tab('Commits') end diff --git a/features/steps/shared/project_tab.rb b/features/steps/shared/project_tab.rb index b209020c5a9..988ce0d1102 100644 --- a/features/steps/shared/project_tab.rb +++ b/features/steps/shared/project_tab.rb @@ -8,12 +8,8 @@ module SharedProjectTab ensure_active_main_tab('Project') end - step 'the active main tab should be Files' do - ensure_active_main_tab('Files') - end - - step 'the active main tab should be Commits' do - ensure_active_main_tab('Commits') + step 'the active main tab should be Code' do + ensure_active_main_tab('Code') end step 'the active main tab should be Graphs' do -- cgit v1.2.3 From db2109b086340a5bf5e049aa16f22a76c0a5aec7 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Thu, 2 Jun 2016 22:32:22 +0300 Subject: Fix more tests with new Code tab Signed-off-by: Dmitriy Zaporozhets --- features/steps/project/active_tab.rb | 8 -------- features/steps/project/project_find_file.rb | 4 ++-- features/steps/shared/project_tab.rb | 8 ++++++++ 3 files changed, 10 insertions(+), 10 deletions(-) (limited to 'features/steps') diff --git a/features/steps/project/active_tab.rb b/features/steps/project/active_tab.rb index 7db0d337192..745fd3471c4 100644 --- a/features/steps/project/active_tab.rb +++ b/features/steps/project/active_tab.rb @@ -63,14 +63,6 @@ class Spinach::Features::ProjectActiveTab < Spinach::FeatureSteps click_link('Tags') end - step 'the active sub tab should be Files' do - ensure_active_sub_tab('Files') - end - - step 'the active sub tab should be Commits' do - ensure_active_sub_tab('Commits') - end - step 'the active sub tab should be Compare' do ensure_active_sub_tab('Compare') end diff --git a/features/steps/project/project_find_file.rb b/features/steps/project/project_find_file.rb index 8c1d09d6cc6..47de4b91df1 100644 --- a/features/steps/project/project_find_file.rb +++ b/features/steps/project/project_find_file.rb @@ -13,12 +13,12 @@ class Spinach::Features::ProjectFindFile < Spinach::FeatureSteps end step 'I should see "find file" page' do - ensure_active_main_tab('Files') + ensure_active_main_tab('Code') expect(page).to have_selector('.file-finder-holder', count: 1) end step 'I fill in Find by path with "git"' do - ensure_active_main_tab('Files') + ensure_active_main_tab('Code') expect(page).to have_selector('.file-finder-holder', count: 1) end diff --git a/features/steps/shared/project_tab.rb b/features/steps/shared/project_tab.rb index 988ce0d1102..bfee8793301 100644 --- a/features/steps/shared/project_tab.rb +++ b/features/steps/shared/project_tab.rb @@ -47,4 +47,12 @@ module SharedProjectTab step 'the active sub tab should be Network' do ensure_active_sub_tab('Network') end + + step 'the active sub tab should be Files' do + ensure_active_sub_tab('Files') + end + + step 'the active sub tab should be Commits' do + ensure_active_sub_tab('Commits') + end end -- cgit v1.2.3