Commit 932b94f9 authored by Phil Hughes's avatar Phil Hughes

Fixed GFM references not being included when update issue inline

Closes https://gitlab.com/gitlab-org/gitlab-ee/issues/2878
parent 1dab6403
......@@ -30,6 +30,7 @@ class GfmAutoComplete {
this.input.each((i, input) => {
const $input = $(input);
$input.off('focus.setupAtWho').on('focus.setupAtWho', this.setupAtWho.bind(this, $input));
$input.on('change.atwho', () => input.dispatchEvent(new Event('input')));
// This triggers at.js again
// Needed for quick actions with suffixes (ex: /label ~)
$input.on('inserted-commands.atwho', $input.trigger.bind($input, 'keyup'));
......
---
title: Fixed GFM references not being included when updating issues inline
merge_request:
author:
......@@ -14,6 +14,18 @@ feature 'GFM autocomplete', feature: true, js: true do
wait_for_requests
end
it 'updates issue descripton with GFM reference' do
find('.issuable-edit').click
find('#issue-description').native.send_keys("@#{user.name[0...3]}")
find('.atwho-view .cur').trigger('click')
click_button 'Save changes'
expect(find('.description')).to have_content(user.to_reference)
end
it 'opens autocomplete menu when field starts with text' do
page.within '.timeline-content-form' do
find('#note_note').native.send_keys('')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment