Commit 903d6dc0 authored by Stan Hu's avatar Stan Hu

Potential fix for flaky user_assigns_themselves_spec.rb

Introduced in
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/41030, this spec
may fail if CI is slow, and the database hasn't had a chance to update.
We now wait for the request to return before checking whether the
`updated_at` column has been updated.
parent 3aefe1d1
......@@ -22,7 +22,12 @@ RSpec.describe 'Merge request > User assigns themselves' do
end
it 'updates updated_by', :js do
expect { click_button 'assign yourself' }.to change { merge_request.reload.updated_at }
expect do
click_button 'assign yourself'
expect(find('.assignee')).to have_content(user.name)
wait_for_all_requests
end.to change { merge_request.reload.updated_at }
end
it 'returns user to the merge request', :js do
......
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