summaryrefslogtreecommitdiff
path: root/spec/features/projects/issues
diff options
context:
space:
mode:
authorConstance Okoghenun <cokoghenun@gitlab.com>2018-07-05 11:59:57 +0000
committerPhil Hughes <me@iamphill.com>2018-07-05 11:59:57 +0000
commit45deb92544c84c51f617c38bc1f1454653c23ce0 (patch)
tree2c7af5cbbab701685f59093631888a53ed972871 /spec/features/projects/issues
parentfe695ebd24e59f82d16aba629dd6d117be3ee5bb (diff)
downloadgitlab-ce-45deb92544c84c51f617c38bc1f1454653c23ce0.tar.gz
Resolve "When editing a comment in an issue, the preview mode is toggled in the main textarea"
Diffstat (limited to 'spec/features/projects/issues')
-rw-r--r--spec/features/projects/issues/user_comments_on_issue_spec.rb8
1 files changed, 8 insertions, 0 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 353f487485d..ba5b80ed04b 100644
--- a/spec/features/projects/issues/user_comments_on_issue_spec.rb
+++ b/spec/features/projects/issues/user_comments_on_issue_spec.rb
@@ -63,6 +63,14 @@ describe "User comments on issue", :js do
page.within(".current-note-edit-form") do
fill_in("note[note]", with: comment)
+ find('textarea').send_keys [:control, :shift, 'p']
+ expect(page).to have_selector('.current-note-edit-form .md-preview-holder')
+ expect(page.find('.current-note-edit-form .md-preview-holder p')).to have_content(comment)
+ end
+
+ expect(page).to have_selector('.new-note .note-textarea')
+
+ page.within(".current-note-edit-form") do
click_button("Save comment")
end