Commit ad1d24ea authored by Mark Lapierre's avatar Mark Lapierre Committed by Dan Davison

Skip intermediate merge train test steps

Removes 2 expect statements that might not be seen if the merge train
completes before the test gets to those statements.

Instead we skip to the merge verification, and check that the merge
train pipeline passed.
parent 5a411b6e
...@@ -104,26 +104,24 @@ module QA ...@@ -104,26 +104,24 @@ module QA
end.visit! end.visit!
Page::MergeRequest::Show.perform do |show| Page::MergeRequest::Show.perform do |show|
pipeline_passed = Support::Retrier.retry_until(max_attempts: 5, sleep_interval: 5) do pipeline_passed = show.retry_until(max_attempts: 5, sleep_interval: 5) do
show.has_pipeline_status?(/Merged result pipeline #\d+ passed/) show.has_pipeline_status?(/Merged result pipeline #\d+ passed/)
end end
expect(pipeline_passed).to be_truthy, "Expected the merged result pipeline to pass." expect(pipeline_passed).to be_truthy, "Expected the merged result pipeline to pass."
show.merge_via_merge_train show.merge_via_merge_train
end
expect(page).to have_content('Added to the merge train', wait: 60) # It's faster to refresh the page than to wait for the UI to
expect(page).to have_content('The changes will be merged into master') # automatically refresh, so we reload if the merge status
# doesn't update quickly.
merged = show.retry_until(max_attempts: 5, reload: true, sleep_interval: 5) do
show.merged?
end
# It's faster to refresh the page than to wait for the UI to expect(merged).to be_truthy, "Expected content 'The changes were merged' but it did not appear."
# automatically refresh, so we reload if the merge status expect(show).to have_pipeline_status(/Merge train pipeline #\d+ passed/)
# doesn't update quickly.
merged = Support::Retrier.retry_until(reload_page: page) do
Page::MergeRequest::Show.perform(&:merged?)
end end
expect(merged).to be_truthy, "Expected content 'The changes were merged' but it did not appear."
end end
end 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