Commit 74f805e6 authored by Dan Davison's avatar Dan Davison

Merge branch 'ml-update-mwps-test' into 'master'

Update MWPS to get more info on failure

See merge request gitlab-org/gitlab!80249
parents 9c6ff77e 46ff3ebb
......@@ -263,7 +263,8 @@ module QA
# status as unmerged, the test will fail.
# Revisit after merge page re-architect is done https://gitlab.com/groups/gitlab-org/-/epics/5598
# To remove page refresh logic if possible
retry_until(max_attempts: 3, reload: true) do
# We don't raise on failure because this method is used as a predicate matcher
retry_until(max_attempts: 3, reload: true, raise_on_failure: false) do
has_element?(:merged_status_content, text: 'The changes were merged into', wait: 20)
end
end
......
......@@ -88,7 +88,7 @@ module QA
mr.wait_until_ready_to_merge(transient_test: transient_test)
mr.retry_until(reload: true, message: 'Wait until ready to click MWPS') do
merge_request = merge_request.reload!
merge_request.reload!
# Don't try to click MWPS if the MR is merged or the pipeline is complete
break if merge_request.state == 'merged' || mr.wait_until { project.pipelines.last }[:status] == 'success'
......@@ -102,8 +102,10 @@ module QA
end
aggregate_failures do
expect(mr.merged?).to be_truthy, "Expected content 'The changes were merged' but it did not appear."
expect { mr.merged? }.to eventually_be_truthy.within(max_duration: 60), "Expected content 'The changes were merged' but it did not appear."
expect(merge_request.reload!.merge_when_pipeline_succeeds).to be_truthy
expect(merge_request.state).to eq('merged')
expect(project.pipelines.last[:status]).to eq('success')
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