diff options
Diffstat (limited to 'spec/features/dashboard')
4 files changed, 18 insertions, 42 deletions
diff --git a/spec/features/dashboard/active_tab_spec.rb b/spec/features/dashboard/active_tab_spec.rb index a1fb0beda70..aa767d75c00 100644 --- a/spec/features/dashboard/active_tab_spec.rb +++ b/spec/features/dashboard/active_tab_spec.rb @@ -2,6 +2,9 @@ require 'spec_helper' +# TODO: This entire spec file can be deleted once the combined_menu feature is fully rolled +# out and the flag is removed, because it will then be irrelevant (there will be no more tabs). +# Feature flag removal issue: https://gitlab.com/gitlab-org/gitlab/-/issues/324086 RSpec.describe 'Dashboard Active Tab', :js do shared_examples 'combined_menu: feature flag examples' do before do @@ -10,8 +13,6 @@ RSpec.describe 'Dashboard Active Tab', :js do shared_examples 'page has active tab' do |title| it "#{title} tab" do - pending_on_combined_menu_flag - subject expect(page).to have_selector('.navbar-sub-nav li.active', count: 1) @@ -32,27 +33,11 @@ RSpec.describe 'Dashboard Active Tab', :js do end end - context 'with combined_menu: feature flag on' do - let(:needs_rewrite_for_combined_menu_flag_on) { true } - - before do - stub_feature_flags(combined_menu: true) - end - - it_behaves_like 'combined_menu: feature flag examples' - end - context 'with combined_menu feature flag off' do - let(:needs_rewrite_for_combined_menu_flag_on) { false } - before do stub_feature_flags(combined_menu: false) end it_behaves_like 'combined_menu: feature flag examples' end - - def pending_on_combined_menu_flag - pending 'https://gitlab.com/gitlab-org/gitlab/-/merge_requests/56587' if needs_rewrite_for_combined_menu_flag_on - end end diff --git a/spec/features/dashboard/group_dashboard_with_external_authorization_service_spec.rb b/spec/features/dashboard/group_dashboard_with_external_authorization_service_spec.rb index 0620f819332..3dd993b4bb5 100644 --- a/spec/features/dashboard/group_dashboard_with_external_authorization_service_spec.rb +++ b/spec/features/dashboard/group_dashboard_with_external_authorization_service_spec.rb @@ -4,6 +4,7 @@ require 'spec_helper' RSpec.describe 'The group dashboard' do include ExternalAuthorizationServiceHelpers + include Spec::Support::Helpers::Features::TopNavSpecHelpers let(:user) { create(:user) } @@ -14,11 +15,11 @@ RSpec.describe 'The group dashboard' do describe 'The top navigation' do it 'has all the expected links' do - pending_on_combined_menu_flag - visit dashboard_groups_path - within('.navbar') do + open_top_nav + + within_top_nav do expect(page).to have_button('Projects') expect(page).to have_button('Groups') expect(page).to have_link('Activity') @@ -28,12 +29,12 @@ RSpec.describe 'The group dashboard' do end it 'hides some links when an external authorization service is enabled' do - pending_on_combined_menu_flag - enable_external_authorization_service_check visit dashboard_groups_path - within('.navbar') do + open_top_nav + + within_top_nav do expect(page).to have_button('Projects') expect(page).to have_button('Groups') expect(page).not_to have_link('Activity') @@ -44,7 +45,7 @@ RSpec.describe 'The group dashboard' do end end - context 'with combined_menu: feature flag on' do + context 'with combined_menu feature flag on', :js do let(:needs_rewrite_for_combined_menu_flag_on) { true } before do @@ -63,8 +64,4 @@ RSpec.describe 'The group dashboard' do it_behaves_like 'combined_menu: feature flag examples' end - - def pending_on_combined_menu_flag - pending 'https://gitlab.com/gitlab-org/gitlab/-/merge_requests/56587' if needs_rewrite_for_combined_menu_flag_on - end end diff --git a/spec/features/dashboard/group_spec.rb b/spec/features/dashboard/group_spec.rb index bc6f449edc5..02cbdc7c777 100644 --- a/spec/features/dashboard/group_spec.rb +++ b/spec/features/dashboard/group_spec.rb @@ -16,6 +16,8 @@ RSpec.describe 'Dashboard Group' do it 'creates new group', :js do visit dashboard_groups_path find('[data-testid="new-group-button"]').click + click_link 'Create group' + new_name = 'Samurai' fill_in 'group_name', with: new_name diff --git a/spec/features/dashboard/shortcuts_spec.rb b/spec/features/dashboard/shortcuts_spec.rb index 5f60832dbc9..7439bfd334b 100644 --- a/spec/features/dashboard/shortcuts_spec.rb +++ b/spec/features/dashboard/shortcuts_spec.rb @@ -15,8 +15,6 @@ RSpec.describe 'Dashboard shortcuts', :js do end it 'navigate to tabs' do - pending_on_combined_menu_flag - find('body').send_keys([:shift, 'I']) check_page_title('Issues') @@ -40,6 +38,10 @@ RSpec.describe 'Dashboard shortcuts', :js do find('body').send_keys([:shift, 'A']) check_page_title('Activity') + + find('body').send_keys([:shift, 'L']) + + check_page_title('Milestones') end end @@ -49,8 +51,6 @@ RSpec.describe 'Dashboard shortcuts', :js do end it 'navigate to tabs' do - pending_on_combined_menu_flag - find('body').send_keys([:shift, 'G']) find('.nothing-here-block') @@ -73,9 +73,7 @@ RSpec.describe 'Dashboard shortcuts', :js do end end - context 'with combined_menu: feature flag on' do - let(:needs_rewrite_for_combined_menu_flag_on) { true } - + context 'with combined_menu feature flag on' do before do stub_feature_flags(combined_menu: true) end @@ -84,16 +82,10 @@ RSpec.describe 'Dashboard shortcuts', :js do end context 'with combined_menu feature flag off' do - let(:needs_rewrite_for_combined_menu_flag_on) { false } - before do stub_feature_flags(combined_menu: false) end it_behaves_like 'combined_menu: feature flag examples' end - - def pending_on_combined_menu_flag - pending 'https://gitlab.com/gitlab-org/gitlab/-/merge_requests/56587' if needs_rewrite_for_combined_menu_flag_on - end end |