IssueNotesRefactor: Fix specs.
This commit is contained in:
parent
44306f2662
commit
47bd607e83
4 changed files with 4 additions and 2 deletions
|
@ -169,6 +169,7 @@ export default {
|
||||||
:addSpacingClasses="false">
|
:addSpacingClasses="false">
|
||||||
<textarea
|
<textarea
|
||||||
id="note-body"
|
id="note-body"
|
||||||
|
name="note[note]"
|
||||||
class="note-textarea js-gfm-input js-autosize markdown-area"
|
class="note-textarea js-gfm-input js-autosize markdown-area"
|
||||||
data-supports-slash-commands="true"
|
data-supports-slash-commands="true"
|
||||||
data-supports-quick-actions="true"
|
data-supports-quick-actions="true"
|
||||||
|
|
|
@ -106,6 +106,7 @@ export default {
|
||||||
:addSpacingClasses="false">
|
:addSpacingClasses="false">
|
||||||
<textarea
|
<textarea
|
||||||
id="note-body"
|
id="note-body"
|
||||||
|
name="note[note]"
|
||||||
class="note-textarea js-gfm-input js-autosize markdown-area js-note-text"
|
class="note-textarea js-gfm-input js-autosize markdown-area js-note-text"
|
||||||
data-supports-slash-commands="true"
|
data-supports-slash-commands="true"
|
||||||
data-supports-quick-actions="true"
|
data-supports-quick-actions="true"
|
||||||
|
|
|
@ -8,7 +8,7 @@ export default {
|
||||||
},
|
},
|
||||||
getQuickActionText(note) {
|
getQuickActionText(note) {
|
||||||
let text = 'Applying command';
|
let text = 'Applying command';
|
||||||
const quickActions = AjaxCache.get(gl.GfmAutoComplete.dataSources.commands);
|
const quickActions = AjaxCache.get(gl.GfmAutoComplete.dataSources.commands) || [];
|
||||||
|
|
||||||
const executedCommands = quickActions.filter((command) => {
|
const executedCommands = quickActions.filter((command) => {
|
||||||
const commandRegex = new RegExp(`/${command.name}`);
|
const commandRegex = new RegExp(`/${command.name}`);
|
||||||
|
|
|
@ -2,7 +2,7 @@ module QuickActionsHelpers
|
||||||
def write_note(text)
|
def write_note(text)
|
||||||
Sidekiq::Testing.fake! do
|
Sidekiq::Testing.fake! do
|
||||||
page.within('.js-main-target-form') do
|
page.within('.js-main-target-form') do
|
||||||
fill_in 'note[note]', with: text
|
fill_in 'note-body', with: text
|
||||||
find('.js-comment-submit-button').trigger('click')
|
find('.js-comment-submit-button').trigger('click')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue