Commit ffb75965 authored by Rémy Coutable's avatar Rémy Coutable

Wait for pipeline to have expected status in Ops dashboard E2E test

Since `Support::Waiter.wait_until` would raise a `WaitExceededError`
exception if the pipeline status isn't the one we expect after 60
seconds, we don't need an explicit expectation.
Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent 62c2cb5e
...@@ -57,10 +57,10 @@ module QA ...@@ -57,10 +57,10 @@ module QA
EE::Page::OperationsDashboard.perform do |operation| EE::Page::OperationsDashboard.perform do |operation|
{ {
'project-with-tag' => 'passed', 'project-with-tag' => 'passed',
'project-with-failed-run' => 'failed', 'project-with-failed-run' => 'failed',
'project-without-tag' => 'pending', 'project-without-tag' => 'pending',
'project-without-ci' => nil 'project-without-ci' => nil
}.each do |project_name, status| }.each do |project_name, status|
project = operation.find_project_card_by_name(project_name) project = operation.find_project_card_by_name(project_name)
...@@ -69,7 +69,9 @@ module QA ...@@ -69,7 +69,9 @@ module QA
next next
end end
expect(operation.pipeline_status(project)).to eq(status) # Since `Support::Waiter.wait_until` would raise a `WaitExceededError` exception if the pipeline status
# isn't the one we expect after 60 seconds, we don't need an explicit expectation.
Support::Waiter.wait_until { operation.pipeline_status(project) == status }
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