Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-07-15 00:09:55 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-07-15 00:09:55 +0300
commitcde60c9291a22ff0921f703568c4daef4a65ead7 (patch)
tree15d6d3f5cbe339c00a39a60e7f8b7be295c8a739 /spec/frontend/notes/stores
parent6d2fcd332783033432e4de1d8b1de6720e20f557 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/notes/stores')
-rw-r--r--spec/frontend/notes/stores/actions_spec.js7
1 files changed, 2 insertions, 5 deletions
diff --git a/spec/frontend/notes/stores/actions_spec.js b/spec/frontend/notes/stores/actions_spec.js
index bf69d24bcb9..02b27eca196 100644
--- a/spec/frontend/notes/stores/actions_spec.js
+++ b/spec/frontend/notes/stores/actions_spec.js
@@ -15,6 +15,7 @@ import * as utils from '~/notes/stores/utils';
import updateIssueLockMutation from '~/sidebar/components/lock/mutations/update_issue_lock.mutation.graphql';
import updateMergeRequestLockMutation from '~/sidebar/components/lock/mutations/update_merge_request_lock.mutation.graphql';
import mrWidgetEventHub from '~/vue_merge_request_widget/event_hub';
+import waitForPromises from 'helpers/wait_for_promises';
import { resetStore } from '../helpers';
import {
discussionMock,
@@ -254,9 +255,7 @@ describe('Actions Notes Store', () => {
jest.advanceTimersByTime(time);
}
- return new Promise((resolve) => {
- requestAnimationFrame(resolve);
- });
+ return waitForPromises();
};
const advanceXMoreIntervals = async (number) => {
const timeoutLength = pollInterval * number;
@@ -365,7 +364,6 @@ describe('Actions Notes Store', () => {
});
it('hides the error display if it exists on success', async () => {
- jest.mock();
failureMock();
await startPolling();
@@ -668,7 +666,6 @@ describe('Actions Notes Store', () => {
describe('updateOrCreateNotes', () => {
it('Prevents `fetchDiscussions` being called multiple times within time limit', () => {
- jest.useFakeTimers();
const note = { id: 1234, type: notesConstants.DIFF_NOTE };
const getters = { notesById: {} };
state = { discussions: [note], notesData: { discussionsPath: '' } };