diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-23 21:11:12 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-23 21:11:12 +0300 |
commit | cfc8827f6bf9573b02401b1908728da3aed96698 (patch) | |
tree | 30180d04062db3e56d1cc3772888ff4f15e56c10 /qa | |
parent | a8b96c3072b3bd4d45e6364931042b350bf7fa2e (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'qa')
-rw-r--r-- | qa/qa/specs/features/shared_contexts/advanced_search_shared_context.rb | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/qa/qa/specs/features/shared_contexts/advanced_search_shared_context.rb b/qa/qa/specs/features/shared_contexts/advanced_search_shared_context.rb index c6836d11803..805e5ce782a 100644 --- a/qa/qa/specs/features/shared_contexts/advanced_search_shared_context.rb +++ b/qa/qa/specs/features/shared_contexts/advanced_search_shared_context.rb @@ -8,18 +8,25 @@ module QA QA::EE::Resource::Settings::Elasticsearch.fabricate_via_api! unless advanced_search_on end - after do - Runtime::Search.disable_elasticsearch(api_client) if !advanced_search_on && !api_client.nil? - end + # TODO: convert check_advanced_search_status method to use the API instead of the UI once the functionality exists + # https://gitlab.com/gitlab-org/gitlab/-/issues/382849 and then we can resume turning off advanced search after the + # tests as in the `after` block here. For now the advanced search tests will have the side effect of turning on + # advanced search if it wasn't enabled before the tests run. + + # after do + # Runtime::Search.disable_elasticsearch(api_client) if !advanced_search_on && !api_client.nil? + # end - # TODO: convert this method to use the API instead of the UI once the functionality exists - # https://gitlab.com/gitlab-org/gitlab/-/issues/382849 def check_advanced_search_status Flow::Login.sign_in - QA::Page::Main::Menu.perform do |menu| - menu.search_for('lorem ipsum') + QA::Support::Retrier.retry_on_exception( + max_attempts: Runtime::Search::RETRY_MAX_ITERATION, + sleep_interval: Runtime::Search::RETRY_SLEEP_INTERVAL) do + QA::Page::Main::Menu.perform do |menu| + menu.search_for('lorem ipsum') + end + page.has_text?('Advanced search is enabled') end - page.has_text?('Advanced search is enabled') end end end |