summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean McGivern <sean@mcgivern.me.uk>2018-06-14 10:13:53 +0000
committerSean McGivern <sean@mcgivern.me.uk>2018-06-14 10:13:53 +0000
commit434efdacd66e974a93cb2e94eee725a4a4d16f9f (patch)
tree3ed4d63a0fcf0a4d32918a78a41aeab6072327fe
parent282b3b52c3d332f6abb000f8e912a08cd9227168 (diff)
parent946a982748f93bc09f2f3c8092f9e8c757e8115f (diff)
downloadgitlab-ce-434efdacd66e974a93cb2e94eee725a4a4d16f9f.tar.gz
Merge branch 'fix-flakey-user-comment-on-issue' into 'master'
Fix flakey time-sensitive user comment on issue test See merge request gitlab-org/gitlab-ce!19786
-rw-r--r--spec/features/projects/issues/user_comments_on_issue_spec.rb7
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