Fix flaky test: wait for merge completion in pipeline spec
What does this MR do?
Fixes a flaky test in spec/features/merge_request/user_sees_merge_request_pipelines_spec.rb.
The test 'merges the merge request' (line 408) was flaky because it didn't properly wait for the async merge operation to complete after the pipeline succeeded.
Root Cause Analysis
After detached_merge_request_pipeline.reload.succeed!, the auto-merge process runs asynchronously via Sidekiq. The wait_for_requests helper only waits for AJAX requests to complete, not for the actual merge Sidekiq job to finish and the page to update with the merged state.
This is a classic async operations flaky test pattern where the test assertion runs before the background operation completes.
Solution
Added explicit waiting for the 'Merged by' content to appear with an extended timeout (wait: 10). Capybara will retry the assertion until the content appears, giving the async merge operation time to complete.
Related Issues
Closes https://gitlab.com/gitlab-org/quality/test-failure-issues/-/issues/4921