Commit 44cd01c7 authored by Heinrich Lee Yu's avatar Heinrich Lee Yu

Merge branch 'vij-edit-note-requests' into 'master'

Wait for requests in `edit_note` spec helper

See merge request gitlab-org/gitlab!54301
parents 4df1aa73 6052f5e9
...@@ -31,6 +31,8 @@ module Spec ...@@ -31,6 +31,8 @@ module Spec
fill_in('note[note]', with: new_note_text) fill_in('note[note]', with: new_note_text)
find('.js-comment-button').click find('.js-comment-button').click
end end
wait_for_requests
end end
def preview_note(text) def preview_note(text)
......
...@@ -148,7 +148,6 @@ RSpec.shared_examples 'clone quick action' do ...@@ -148,7 +148,6 @@ RSpec.shared_examples 'clone quick action' do
expect(issue.reload).not_to be_closed expect(issue.reload).not_to be_closed
edit_note("/cloe #{target_project.full_path}", "test note.\n/clone #{target_project.full_path}") edit_note("/cloe #{target_project.full_path}", "test note.\n/clone #{target_project.full_path}")
wait_for_all_requests
expect(page).to have_content 'test note.' expect(page).to have_content 'test note.'
expect(issue.reload).to be_open expect(issue.reload).to be_open
...@@ -166,7 +165,6 @@ RSpec.shared_examples 'clone quick action' do ...@@ -166,7 +165,6 @@ RSpec.shared_examples 'clone quick action' do
expect(page).not_to have_content 'Commands applied' expect(page).not_to have_content 'Commands applied'
edit_note("/cloe #{target_project.full_path}", "/clone #{target_project.full_path}") edit_note("/cloe #{target_project.full_path}", "/clone #{target_project.full_path}")
wait_for_all_requests
expect(page).not_to have_content "/clone #{target_project.full_path}" expect(page).not_to have_content "/clone #{target_project.full_path}"
expect(issue.reload).to be_open expect(issue.reload).to be_open
......
...@@ -106,7 +106,6 @@ RSpec.shared_examples 'move quick action' do ...@@ -106,7 +106,6 @@ RSpec.shared_examples 'move quick action' do
expect(issue.reload).not_to be_closed expect(issue.reload).not_to be_closed
edit_note("/mvoe #{target_project.full_path}", "test note.\n/move #{target_project.full_path}") edit_note("/mvoe #{target_project.full_path}", "test note.\n/move #{target_project.full_path}")
wait_for_all_requests
expect(page).to have_content 'test note.' expect(page).to have_content 'test note.'
expect(issue.reload).to be_closed expect(issue.reload).to be_closed
...@@ -125,7 +124,6 @@ RSpec.shared_examples 'move quick action' do ...@@ -125,7 +124,6 @@ RSpec.shared_examples 'move quick action' do
expect(issue.reload).not_to be_closed expect(issue.reload).not_to be_closed
edit_note("/mvoe #{target_project.full_path}", "/move #{target_project.full_path}") edit_note("/mvoe #{target_project.full_path}", "/move #{target_project.full_path}")
wait_for_all_requests
expect(page).not_to have_content "/move #{target_project.full_path}" expect(page).not_to have_content "/move #{target_project.full_path}"
expect(issue.reload).to be_closed expect(issue.reload).to be_closed
......
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