From 340f85512a4b4fa1ffd558ecaf64fef2eec8cc87 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Fri, 15 Sep 2023 09:12:37 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- spec/features/projects/user_uses_shortcuts_spec.rb | 52 ---------------------- 1 file changed, 52 deletions(-) (limited to 'spec/features') diff --git a/spec/features/projects/user_uses_shortcuts_spec.rb b/spec/features/projects/user_uses_shortcuts_spec.rb index 7b0ae6d8c32..b7b2093d78a 100644 --- a/spec/features/projects/user_uses_shortcuts_spec.rb +++ b/spec/features/projects/user_uses_shortcuts_spec.rb @@ -14,58 +14,6 @@ RSpec.describe 'User uses shortcuts', :js, feature_category: :groups_and_project wait_for_requests end - context 'disabling shortcuts' do - before do - page.evaluate_script("localStorage.removeItem('shortcutsDisabled')") - end - - it 'can disable shortcuts from help menu' do - open_modal_shortcut_keys - click_toggle_button - close_modal - - open_modal_shortcut_keys - - expect(page).not_to have_selector('[data-testid="modal-shortcuts"]') - - page.refresh - open_modal_shortcut_keys - - # after reload, shortcuts modal doesn't exist at all until we add it - expect(page).not_to have_selector('[data-testid="modal-shortcuts"]') - end - - it 're-enables shortcuts' do - open_modal_shortcut_keys - click_toggle_button - close_modal - - open_modal_from_help_menu - click_toggle_button - close_modal - - open_modal_shortcut_keys - expect(find('[data-testid="modal-shortcuts"]')).to be_visible - end - - def open_modal_shortcut_keys - find('body').native.send_key('?') - end - - def open_modal_from_help_menu - find('.header-help-dropdown-toggle').click - find('button', text: 'Keyboard shortcuts').click - end - - def click_toggle_button - find('.js-toggle-shortcuts .gl-toggle').click - end - - def close_modal - find('.modal button[aria-label="Close"]').click - end - end - context 'when navigating to the Project pages' do it 'redirects to the project overview page' do visit project_issues_path(project) -- cgit v1.2.3