From 5ad9d94d8e3f9222d69fc0e408ae2e37363bed53 Mon Sep 17 00:00:00 2001 From: Mehdi Lahmam Date: Mon, 7 Aug 2017 00:12:13 +0200 Subject: Add `/assign me` alias support for assigning issuables to oneself Currently, when a user wants to assign an issue/MR to himself, he needs to type his full username or select it from the suggested ones in the dropdown list. This commits suggest a faster solution which is typing `/assign me` Closes #35304. --- .../features/issuable_slash_commands_shared_examples.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'spec/support/features') diff --git a/spec/support/features/issuable_slash_commands_shared_examples.rb b/spec/support/features/issuable_slash_commands_shared_examples.rb index 32835e391a8..68f0ce8afb3 100644 --- a/spec/support/features/issuable_slash_commands_shared_examples.rb +++ b/spec/support/features/issuable_slash_commands_shared_examples.rb @@ -279,6 +279,17 @@ shared_examples 'issuable record that supports quick actions in its description expect(issuable.subscribed?(master, project)).to be_falsy end end + + context "with a note assigning the #{issuable_type} to the current user" do + it "assigns the #{issuable_type} to the current user" do + write_note("/assign me") + + expect(page).not_to have_content '/assign me' + expect(page).to have_content 'Commands applied' + + expect(issuable.reload.assignees).to eq [master] + end + end end describe "preview of note on #{issuable_type}" do -- cgit v1.2.3