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>2021-04-29 12:10:11 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-04-29 12:10:11 +0300
commit38e4bfea582e8c755dd21613bf21658b1771449b (patch)
tree0856b453061d24face108bd980cd5a63b09ead21 /spec/frontend/users_select
parent64d80d99a907c9b5ac0d72b6a958916c496e31b1 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/users_select')
-rw-r--r--spec/frontend/users_select/test_helper.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/spec/frontend/users_select/test_helper.js b/spec/frontend/users_select/test_helper.js
index 89bbbba9913..c5adbe9bb09 100644
--- a/spec/frontend/users_select/test_helper.js
+++ b/spec/frontend/users_select/test_helper.js
@@ -1,7 +1,7 @@
-import { waitFor } from '@testing-library/dom';
import MockAdapter from 'axios-mock-adapter';
import { memoize, cloneDeep } from 'lodash';
import { getFixture, getJSONFixture } from 'helpers/fixtures';
+import waitForPromises from 'helpers/wait_for_promises';
import axios from '~/lib/utils/axios_utils';
import UsersSelect from '~/users_select';
@@ -103,8 +103,10 @@ export const setAssignees = (...users) => {
);
};
export const toggleDropdown = () => findUserSearchButton().click();
-export const waitForDropdownItems = () =>
- waitFor(() => expect(findDropdownItem(getUsersFixtureAt(0))).not.toBeNull());
+export const waitForDropdownItems = async () => {
+ await axios.waitForAll();
+ await waitForPromises();
+};
// assertion helpers ---------------------------------------------------------
export const createUnassignedExpectation = () => {