summaryrefslogtreecommitdiff
path: root/spec/support
diff options
context:
space:
mode:
authorJacopo <beschi.jacopo@gmail.com>2018-10-14 13:30:12 +0200
committerJacopo <beschi.jacopo@gmail.com>2018-10-15 12:55:27 +0200
commit9d885b343fb674b0909455e1bfbd9dbff1b1e143 (patch)
treea4e3fd7f0fac9ff1723e0ac4e9c802eb0912720d /spec/support
parent4127b357881fedbf903159e089cc0c9d99c37eff (diff)
downloadgitlab-ce-9d885b343fb674b0909455e1bfbd9dbff1b1e143.tar.gz
Fixes close/reopen quick actions preview for issues and merge_requests
Close/reopen quick actions preview wasn't shown properly, now the preview is shown as expected.
Diffstat (limited to 'spec/support')
-rw-r--r--spec/support/features/issuable_quick_actions_shared_examples.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/support/features/issuable_quick_actions_shared_examples.rb b/spec/support/features/issuable_quick_actions_shared_examples.rb
index 846e697eb96..2a883ce1074 100644
--- a/spec/support/features/issuable_quick_actions_shared_examples.rb
+++ b/spec/support/features/issuable_quick_actions_shared_examples.rb
@@ -77,6 +77,15 @@ shared_examples 'issuable record that supports quick actions in its description
expect(issuable.labels).to eq [label_bug]
expect(issuable.milestone).to eq milestone
end
+
+ it 'removes the quick action from note and explains it in the preview' do
+ preview_note("Awesome!\n\n/close")
+
+ expect(page).to have_content 'Awesome!'
+ expect(page).not_to have_content '/close'
+ issuable_name = issuable.is_a?(Issue) ? 'issue' : 'merge request'
+ expect(page).to have_content "Closes this #{issuable_name}."
+ end
end
context 'with a note containing only commands' do