diff options
author | Eric Eastwood <contact@ericeastwood.com> | 2018-06-13 14:18:08 -0500 |
---|---|---|
committer | Eric Eastwood <contact@ericeastwood.com> | 2018-06-14 03:47:41 -0500 |
commit | 946a982748f93bc09f2f3c8092f9e8c757e8115f (patch) | |
tree | dcd9e43d3c88ce66f0807e8ef134e3f74314e596 | |
parent | 69966fcb8d19f0ce219a498efb2855902a2895b1 (diff) | |
download | gitlab-ce-946a982748f93bc09f2f3c8092f9e8c757e8115f.tar.gz |
Fix flakey user comment on issue test race condition
-rw-r--r-- | spec/features/projects/issues/user_comments_on_issue_spec.rb | 7 |
1 files 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..353f487485d 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.find('pre code').text).to eq code_block_content end end |