Commit 3ec53160 authored by Stan Hu's avatar Stan Hu

Fix flaky user_sees_notes_from_forked_project_spec.rb

This test was flaky because if the merge request widget loaded, it would
shift the note outside of the browser view, which would cause the `find`
to fail. To make this more robust, we scroll the browser view to the
note before clicking on the reply button.

Closes https://gitlab.com/gitlab-org/gitlab/-/issues/213228
parent 7096acb4
......@@ -28,6 +28,7 @@ describe 'Merge request > User sees notes from forked project', :js do
page.within('.discussion-notes') do
find('.btn-text-field').click
scroll_to(page.find('#note_note', visible: false))
find('#note_note').send_keys('A reply comment')
find('.js-comment-button').click
end
......
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