summaryrefslogtreecommitdiff
path: root/spec/frontend/notes/components/notes_app_spec.js
diff options
context:
space:
mode:
Diffstat (limited to 'spec/frontend/notes/components/notes_app_spec.js')
-rw-r--r--spec/frontend/notes/components/notes_app_spec.js7
1 files changed, 2 insertions, 5 deletions
diff --git a/spec/frontend/notes/components/notes_app_spec.js b/spec/frontend/notes/components/notes_app_spec.js
index 36a68118fa7..d4cb07d97dc 100644
--- a/spec/frontend/notes/components/notes_app_spec.js
+++ b/spec/frontend/notes/components/notes_app_spec.js
@@ -4,7 +4,6 @@ import $ from 'jquery';
import { nextTick } from 'vue';
import { setHTMLFixture, resetHTMLFixture } from 'helpers/fixtures';
import setWindowLocation from 'helpers/set_window_location_helper';
-import { setTestTimeout } from 'helpers/timeout';
import waitForPromises from 'helpers/wait_for_promises';
import DraftNote from '~/batch_comments/components/draft_note.vue';
import batchComments from '~/batch_comments/stores/modules/batch_comments';
@@ -19,8 +18,6 @@ import '~/behaviors/markdown/render_gfm';
import OrderedLayout from '~/vue_shared/components/ordered_layout.vue';
import * as mockData from '../mock_data';
-setTestTimeout(1000);
-
const TYPE_COMMENT_FORM = 'comment-form';
const TYPE_NOTES_LIST = 'notes-list';
@@ -359,7 +356,7 @@ describe('note_app', () => {
});
it('should listen hashchange event', () => {
- const notesApp = wrapper.find(NotesApp);
+ const notesApp = wrapper.findComponent(NotesApp);
const hash = 'some dummy hash';
jest.spyOn(urlUtility, 'getLocationHash').mockReturnValueOnce(hash);
const setTargetNoteHash = jest.spyOn(notesApp.vm, 'setTargetNoteHash');
@@ -439,7 +436,7 @@ describe('note_app', () => {
});
it('correctly finds only draft comments', () => {
- const drafts = wrapper.findAll(DraftNote).wrappers;
+ const drafts = wrapper.findAllComponents(DraftNote).wrappers;
expect(drafts.map((x) => x.props('draft'))).toEqual(
mockData.draftComments.map(({ note }) => expect.objectContaining({ note })),