summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManeschi Romain <rmaneschi@gmail.com>2019-09-02 10:42:11 +0000
committerNick Thomas <nick@gitlab.com>2019-09-02 10:42:11 +0000
commit1eca1928ebacb01d76afd4a461785faa7dbb5a0d (patch)
tree6635e0c47172afeb7442fc8e40604621cfe5fd93
parent146e12a07e6ce5b1c9791311948a86083628c457 (diff)
downloadgitlab-ce-1eca1928ebacb01d76afd4a461785faa7dbb5a0d.tar.gz
quick action label must be first in issue comment
-rw-r--r--app/services/quick_actions/interpret_service.rb2
-rw-r--r--changelogs/unreleased/60561-quick-action-label-first-for-issue.yml5
-rw-r--r--spec/features/issues/user_comments_on_issue_spec.rb17
3 files changed, 23 insertions, 1 deletions
diff --git a/app/services/quick_actions/interpret_service.rb b/app/services/quick_actions/interpret_service.rb
index 7f944e25887..e0924608a6d 100644
--- a/app/services/quick_actions/interpret_service.rb
+++ b/app/services/quick_actions/interpret_service.rb
@@ -5,8 +5,8 @@ module QuickActions
include Gitlab::Utils::StrongMemoize
include Gitlab::QuickActions::Dsl
include Gitlab::QuickActions::IssueActions
- include Gitlab::QuickActions::IssueAndMergeRequestActions
include Gitlab::QuickActions::IssuableActions
+ include Gitlab::QuickActions::IssueAndMergeRequestActions
include Gitlab::QuickActions::MergeRequestActions
include Gitlab::QuickActions::CommitActions
include Gitlab::QuickActions::CommonActions
diff --git a/changelogs/unreleased/60561-quick-action-label-first-for-issue.yml b/changelogs/unreleased/60561-quick-action-label-first-for-issue.yml
new file mode 100644
index 00000000000..c4bcb2b05f3
--- /dev/null
+++ b/changelogs/unreleased/60561-quick-action-label-first-for-issue.yml
@@ -0,0 +1,5 @@
+---
+title: Quick action label must be first in issue comment
+merge_request: 32367
+author: Romain Maneschi
+type: fixed
diff --git a/spec/features/issues/user_comments_on_issue_spec.rb b/spec/features/issues/user_comments_on_issue_spec.rb
index bdaaea5bf7f..829f945c47f 100644
--- a/spec/features/issues/user_comments_on_issue_spec.rb
+++ b/spec/features/issues/user_comments_on_issue_spec.rb
@@ -55,6 +55,23 @@ describe "User comments on issue", :js do
expect(page.find('svg.mermaid')).to have_content escaped_content
end
+
+ it 'opens autocomplete menu for quick actions and have `/label` first choice' do
+ project.add_maintainer(user)
+ create(:label, project: project, title: 'label')
+
+ page.within '.timeline-content-form' do
+ find('#note-body').native.send_keys('/l')
+ end
+
+ wait_for_requests
+
+ expect(page).to have_selector('.atwho-container')
+
+ page.within '.atwho-container #at-view-commands' do
+ expect(find('li', match: :first)).to have_content('/label')
+ end
+ end
end
context "when editing comments" do