Loading
Fix flaky protected branches code owner spec
What does this MR do?
Fixes a flaky failure in ee/spec/features/protected_branches_spec.rb.
The two "create new protected branch with code owner" tests query the
database with find_by_name right after clicking Protect, using only
wait_for_requests. When the create request has not committed yet,
find_by_name returns nil and the test fails with:
undefined method 'code_owner_approval_required' for nilThe CE shared examples avoid this by asserting the new branch row renders
before reading the database. The EE submit_form helper skipped that step.
This change waits for the .ref-name row to show the branch name, so
Capybara blocks until the create lands before the DB read.
Related
Incident: gitlab-org/quality/analytics/ci-health-incidents#1206 (closed)
Edited by Stan Hu