Skip to content

Potential fix for flaky compliance dashboard spec

Stan Hu requested to merge sh-compliance-dashboard-flaky-spec-die-die-die into master

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.

Edited by Stan Hu

Merge request reports

Loading