diff options
Diffstat (limited to 'spec/support')
-rw-r--r-- | spec/support/helpers/database/duplicate_indexes.yml | 10 | ||||
-rw-r--r-- | spec/support/helpers/login_helpers.rb | 15 | ||||
-rw-r--r-- | spec/support/shared_examples/features/inviting_members_shared_examples.rb | 1 |
3 files changed, 11 insertions, 15 deletions
diff --git a/spec/support/helpers/database/duplicate_indexes.yml b/spec/support/helpers/database/duplicate_indexes.yml index 5ae529ea8ef..e7f45db326d 100644 --- a/spec/support/helpers/database/duplicate_indexes.yml +++ b/spec/support/helpers/database/duplicate_indexes.yml @@ -156,18 +156,8 @@ sbom_component_versions: sbom_occurrences: index_sbom_occurrences_for_input_file_path_search: - index_sbom_occurrences_on_project_id_component_id - - index_sbom_occurrences_on_project_id - idx_sbom_occurrences_on_project_id_and_source_id: - - index_sbom_occurrences_on_project_id - index_sbom_occurrences_on_project_id_and_id: - - index_sbom_occurrences_on_project_id - index_sbom_occurrences_on_project_id_component_id: - - index_sbom_occurrences_on_project_id index_sbom_occurrences_on_project_id_and_component_id_and_id: - index_sbom_occurrences_on_project_id_component_id - - index_sbom_occurrences_on_project_id - index_sbom_occurrences_on_project_id_and_package_manager: - - index_sbom_occurrences_on_project_id search_namespace_index_assignments: index_search_namespace_index_assignments_uniqueness_index_type: - index_search_namespace_index_assignments_on_namespace_id diff --git a/spec/support/helpers/login_helpers.rb b/spec/support/helpers/login_helpers.rb index d35fa801638..913316c8622 100644 --- a/spec/support/helpers/login_helpers.rb +++ b/spec/support/helpers/login_helpers.rb @@ -3,6 +3,7 @@ require_relative 'devise_helpers' module LoginHelpers + include AdminModeHelper include DeviseHelpers # Overriding Devise::Test::IntegrationHelpers#sign_in to store @current_user @@ -48,12 +49,16 @@ module LoginHelpers @current_user = user end - def gitlab_enable_admin_mode_sign_in(user) - visit new_admin_session_path - fill_in 'user_password', with: user.password - click_button 'Enter admin mode' + def gitlab_enable_admin_mode_sign_in(user, use_mock_admin_mode: true) + if use_mock_admin_mode + enable_admin_mode!(user) + else + visit new_admin_session_path + fill_in 'user_password', with: user.password + click_button 'Enter admin mode' - wait_for_requests + wait_for_requests + end end def gitlab_sign_in_via(provider, user, uid, saml_response = nil) diff --git a/spec/support/shared_examples/features/inviting_members_shared_examples.rb b/spec/support/shared_examples/features/inviting_members_shared_examples.rb index 178f85cb85b..b479d71b274 100644 --- a/spec/support/shared_examples/features/inviting_members_shared_examples.rb +++ b/spec/support/shared_examples/features/inviting_members_shared_examples.rb @@ -181,6 +181,7 @@ RSpec.shared_examples 'inviting members' do |snowplow_invite_label| visit subentity_members_page_path click_on _('Invite members') + wait_for_requests page.within invite_modal_selector do choose_options(role, nil) |