Potential fix for flaky compliance dashboard spec
What does this MR do and why?
This spec might be flaky because the first merge request defaults with
a nil
merged_at
value, but the test runs in this sequence:
visit group_security_compliance_dashboard_path(group)
merge_request.metrics.update!(merged_at: merged_at)
wait_for_requests
If the page is loaded before the metrics are updated, it's possible that a row is missing from the dashboard.
To fix this, visit the page only when the merge request metrics have been updated.
Relates to #381137 (closed)
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Stan Hu