diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-12-18 09:17:51 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-12-18 09:17:51 +0300 |
commit | f5eac201c2b887d75800674ad5663d1cda8cbeb9 (patch) | |
tree | ea28133fdc3fd97abb7dbc7afda2cddc50a242c2 /qa | |
parent | 77c803f52899ccc450c183a959913ea89d85de88 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'qa')
4 files changed, 38 insertions, 11 deletions
diff --git a/qa/qa/page/project/web_ide/vscode.rb b/qa/qa/page/project/web_ide/vscode.rb index 6bdb1fb3927..d7fbd3b0458 100644 --- a/qa/qa/page/project/web_ide/vscode.rb +++ b/qa/qa/page/project/web_ide/vscode.rb @@ -245,15 +245,31 @@ module QA open_file_from_explorer(file_name) click_inside_editor_frame within_file_editor do - send_keys(:enter, :enter, prompt_data) + wait_until_code_suggestions_enabled + send_keys(:enter, :enter) + + # Send keys one at a time to allow suggestions request to be triggered + prompt_data.each_char { |c| send_keys(c) } end end end + def wait_until_code_suggestions_enabled + wait_until(max_duration: 30, message: 'Wait for Code Suggestions extension to be enabled') do + has_code_suggestions_status?('enabled') + end + end + + def has_code_suggestions_status?(status) + page.document.has_css?( + "#GitLab\\.gitlab-workflow\\.gl\\.status\\.code_suggestions[aria-label~=#{status.downcase}]" + ) + end + def verify_prompt_appears_and_accept(pattern) within_vscode_editor do within_file_editor do - Support::Waiter.wait_until(max_duration: 30) do + Support::Waiter.wait_until(max_duration: 60, message: 'Wait for suggestion to appear') do page.text.match?(pattern) end send_keys(:tab) diff --git a/qa/qa/service/docker_run/smocker.rb b/qa/qa/service/docker_run/smocker.rb index 1f205440f4b..da01b4a5223 100644 --- a/qa/qa/service/docker_run/smocker.rb +++ b/qa/qa/service/docker_run/smocker.rb @@ -42,6 +42,8 @@ module QA def host_name @host_name ||= if QA::Runtime::Env.running_in_ci? || QA::Runtime::Env.qa_hostname + return host_ip if gdk_network + "#{@name}.#{@network_cache}" else host_ip diff --git a/qa/qa/specs/features/api/9_data_stores/user_inherited_access_spec.rb b/qa/qa/specs/features/api/9_data_stores/user_inherited_access_spec.rb index d961c2b52fe..03a1d4f0c88 100644 --- a/qa/qa/specs/features/api/9_data_stores/user_inherited_access_spec.rb +++ b/qa/qa/specs/features/api/9_data_stores/user_inherited_access_spec.rb @@ -56,12 +56,17 @@ module QA :reliable, testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/363348' ) do - expect do - create(:file, - api_client: parent_group_user_api_client, - project: sub_group_project, - branch: "new_branch_#{SecureRandom.hex(8)}") - end.not_to raise_error + # Retry is needed due to delays with project authorization updates + # Long term solution to accessing the status of a project authorization update + # has been proposed in https://gitlab.com/gitlab-org/gitlab/-/issues/393369 + QA::Support::Retrier.retry_on_exception(max_attempts: 30, sleep_interval: 2) do + expect do + create(:file, + api_client: parent_group_user_api_client, + project: sub_group_project, + branch: "new_branch_#{SecureRandom.hex(8)}") + end.not_to raise_error + end end it( @@ -71,7 +76,7 @@ module QA # Retry is needed due to delays with project authorization updates # Long term solution to accessing the status of a project authorization update # has been proposed in https://gitlab.com/gitlab-org/gitlab/-/issues/393369 - QA::Support::Retrier.retry_on_exception(max_attempts: 5, sleep_interval: 2) do + QA::Support::Retrier.retry_on_exception(max_attempts: 30, sleep_interval: 2) do expect do create(:commit, api_client: parent_group_user_api_client, diff --git a/qa/qa/specs/features/browser_ui/8_monitor/alert_management/recovery_alert_resolves_correct_alert_spec.rb b/qa/qa/specs/features/browser_ui/8_monitor/alert_management/recovery_alert_resolves_correct_alert_spec.rb index 373d6be4407..ca695768d56 100644 --- a/qa/qa/specs/features/browser_ui/8_monitor/alert_management/recovery_alert_resolves_correct_alert_spec.rb +++ b/qa/qa/specs/features/browser_ui/8_monitor/alert_management/recovery_alert_resolves_correct_alert_spec.rb @@ -39,8 +39,12 @@ module QA end context( - 'when using Prometheus integration', :reliable, - testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/393590' + 'when using Prometheus integration', + testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/393590', + quarantine: { + type: :flaky, + issue: 'https://gitlab.com/gitlab-org/gitlab/-/issues/413220' + } ) do include_context 'sends and resolves test alerts' |