Commit 47bd607e authored by Fatih Acet's avatar Fatih Acet

IssueNotesRefactor: Fix specs.

parent 44306f26
...@@ -169,6 +169,7 @@ export default { ...@@ -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 { ...@@ -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 { ...@@ -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 ...@@ -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
......
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