IssueNotesRefactor: Fix specs.

This commit is contained in:
Fatih Acet 2017-07-18 10:25:20 +03:00
parent 44306f2662
commit 47bd607e83
4 changed files with 4 additions and 2 deletions

View file

@ -169,6 +169,7 @@ export default {
:addSpacingClasses="false">
<textarea
id="note-body"
name="note[note]"
class="note-textarea js-gfm-input js-autosize markdown-area"
data-supports-slash-commands="true"
data-supports-quick-actions="true"

View file

@ -106,6 +106,7 @@ export default {
:addSpacingClasses="false">
<textarea
id="note-body"
name="note[note]"
class="note-textarea js-gfm-input js-autosize markdown-area js-note-text"
data-supports-slash-commands="true"
data-supports-quick-actions="true"

View file

@ -8,7 +8,7 @@ export default {
},
getQuickActionText(note) {
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 commandRegex = new RegExp(`/${command.name}`);

View file

@ -2,7 +2,7 @@ module QuickActionsHelpers
def write_note(text)
Sidekiq::Testing.fake! 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')
end
end