Skip to content

Commit

Permalink
Fix AccountsList unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
asiia-trilitech committed Mar 13, 2024
1 parent e16872c commit 9b9fefa
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/views/home/AccountsList.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
mockPk,
mockSocialAccount,
} from "../../mocks/factories";
import { act, render, screen, userEvent, within } from "../../mocks/testUtils";
import { act, render, screen, userEvent, waitFor, within } from "../../mocks/testUtils";
import { MnemonicAccount } from "../../types/Account";
import { getDefaultDerivationPath } from "../../utils/account/derivationPathUtils";
import * as cryptoFunctionsToMock from "../../utils/crypto/AES";
Expand Down Expand Up @@ -64,8 +64,7 @@ describe("<AccountsList />", () => {
const { getByTestId, getByRole } = within(seedPhrase1);
const cta = getByTestId(/^popover-cta$/i);
await act(() => user.click(cta));

expect(getByRole("dialog")).toHaveTextContent("Remove");
await waitFor(() => expect(getByRole("dialog")).toHaveTextContent("Remove"));

const removeBtn = getByRole("button", { name: /^remove$/i });

Expand Down

0 comments on commit 9b9fefa

Please sign in to comment.