From 248b744c112c9895b17c33807fe16e0fe913a70e Mon Sep 17 00:00:00 2001 From: Eric Eastwood Date: Wed, 13 Jun 2018 14:18:08 -0500 Subject: Fix flakey user comment on issue test race condition --- spec/features/projects/issues/user_comments_on_issue_spec.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/spec/features/projects/issues/user_comments_on_issue_spec.rb b/spec/features/projects/issues/user_comments_on_issue_spec.rb index c45fdc7642f..d222fe20b10 100644 --- a/spec/features/projects/issues/user_comments_on_issue_spec.rb +++ b/spec/features/projects/issues/user_comments_on_issue_spec.rb @@ -31,11 +31,14 @@ describe "User comments on issue", :js do end it "adds comment with code block" do - comment = "```\nCommand [1]: /usr/local/bin/git , see [text](doc/text)\n```" + code_block_content = "Command [1]: /usr/local/bin/git , see [text](doc/text)" + comment = "```\n#{code_block_content}\n```" add_note(comment) - expect(page).to have_content(comment) + wait_for_requests + + expect(page).to have_content(code_block_content) end end -- cgit v1.2.1