Skip to content

Commit

Permalink
Fix outdated specs
Browse files Browse the repository at this point in the history
  • Loading branch information
mstrasinskis committed Aug 21, 2024
1 parent 3923923 commit 87f9cd1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ describe("ImportTokenModal", () => {

expect(queryIcrcTokenSpy).not.toHaveBeenCalled();

await formPo.getNextButtonPo().click();
await formPo.getSubmitButtonP().click();

expect(queryIcrcTokenSpy).toBeCalledTimes(1);
});
Expand All @@ -74,7 +74,7 @@ describe("ImportTokenModal", () => {
const { formPo } = renderComponent();

await formPo.getLedgerCanisterInputPo().typeText(ledgerCanisterId.toText());
await formPo.getNextButtonPo().click();
await formPo.getSubmitButtonP().click();

expect(startBusySpy).toHaveBeenCalledTimes(1);
expect(startBusySpy).toHaveBeenCalledWith({
Expand All @@ -92,7 +92,7 @@ describe("ImportTokenModal", () => {
expect(toastsError).not.toBeCalled();

await formPo.getLedgerCanisterInputPo().typeText(ledgerCanisterId.toText());
await formPo.getNextButtonPo().click();
await formPo.getSubmitButtonP().click();

// Wait for toast error to be called.
await runResolvedPromises();
Expand All @@ -112,7 +112,7 @@ describe("ImportTokenModal", () => {

await formPo.getLedgerCanisterInputPo().typeText(ledgerCanisterId.toText());
await formPo.getIndexCanisterInputPo().typeText(indexCanisterId.toText());
await formPo.getNextButtonPo().click();
await formPo.getSubmitButtonP().click();

// Wait for ModalWizard step animation.
await runResolvedPromises();
Expand All @@ -132,7 +132,7 @@ describe("ImportTokenModal", () => {
const { formPo, reviewPo } = renderComponent();

await formPo.getLedgerCanisterInputPo().typeText(ledgerCanisterId.toText());
await formPo.getNextButtonPo().click();
await formPo.getSubmitButtonP().click();

// Wait for ModalWizard step animation.
await runResolvedPromises();
Expand All @@ -155,7 +155,7 @@ describe("ImportTokenModal", () => {
expect(await reviewPo.isPresent()).toEqual(false);

await formPo.getLedgerCanisterInputPo().typeText(ledgerCanisterId.toText());
await formPo.getNextButtonPo().click();
await formPo.getSubmitButtonPo().click();

// Wait for ModalWizard step animation.
await runResolvedPromises();
Expand Down
1 change: 1 addition & 0 deletions frontend/src/tests/lib/utils/tokens-table.utils.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {
ckBTCTokenBase,
createIcpUserToken,
createUserToken,
createUserTokenLoading,
} from "$tests/mocks/tokens-page.mock";
import { TokenAmountV2 } from "@dfinity/utils";

Expand Down

0 comments on commit 87f9cd1

Please sign in to comment.