Commit a1297233 authored by Andrejs Cunskis's avatar Andrejs Cunskis

Merge branch 'g340878-retry-pipeline-widget' into 'master'

Adds retry attempts to give pipeline status widget time to update

See merge request gitlab-org/gitlab!70727
parents 42e1042c 2b337353
......@@ -201,7 +201,7 @@ module QA
def has_pipeline_status?(text)
# Pipelines can be slow, so we wait a bit longer than the usual 10 seconds
wait_until(sleep_interval: 5, reload: false) do
wait_until(max_duration: 120, sleep_interval: 5, reload: true) do
has_element?(:merge_request_pipeline_info_content, text: text, wait: 15 )
end
end
......
......@@ -63,30 +63,26 @@ module QA
it 'creates a pipeline with merged results', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1517' do
merge_request.visit!
Support::Retrier.retry_until(max_attempts: 3, sleep_interval: 3) do
Page::MergeRequest::Show.perform do |show|
expect(show).to have_pipeline_status('passed'), 'Expected the merge request pipeline to pass.'
Page::MergeRequest::Show.perform do |show|
expect(show).to have_pipeline_status('passed'), 'Expected the merge request pipeline to pass.'
# The default option is to merge via merge train,
# but that is covered by the 'merges via a merge train' test
show.skip_merge_train_and_merge_immediately
# The default option is to merge via merge train,
# but that is covered by the 'merges via a merge train' test
show.skip_merge_train_and_merge_immediately
expect(show).to be_merged, "Expected content 'The changes were merged' but it did not appear."
end
expect(show).to be_merged, "Expected content 'The changes were merged' but it did not appear."
end
end
it 'merges via a merge train', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1518' do
merge_request.visit!
Support::Retrier.retry_until(max_attempts: 3, sleep_interval: 3) do
Page::MergeRequest::Show.perform do |show|
expect(show).to have_pipeline_status('passed'), 'Expected the merge request pipeline to pass.'
Page::MergeRequest::Show.perform do |show|
expect(show).to have_pipeline_status('passed'), 'Expected the merge request pipeline to pass.'
show.merge_via_merge_train
show.merge_via_merge_train
expect(show).to be_merged, "Expected content 'The changes were merged' but it did not appear."
end
expect(show).to be_merged, "Expected content 'The changes were merged' but it did not appear."
end
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment