Skip to content

Commit

Permalink
🧪 test(toasts): async toast closage
Browse files Browse the repository at this point in the history
  • Loading branch information
thrownullexception committed Apr 2, 2024
1 parent 6748475 commit 191cdb5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/__tests__/_/utils/closeAllToasts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { waitFor, screen } from "@testing-library/react";
import userEvent from "@testing-library/user-event";

export const closeAllToasts = async () => {
const toast = screen.getByRole("button", {
const toast = await screen.findByRole("button", {
name: "Close Toast",
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ describe("pages/dashboard/[dashboardId]/widget/[widgetId]/index", () => {
await userEvent.keyboard("{Enter}");

await userEvent.type(
screen.getByLabelText("Entity Tab"),
await screen.findByLabelText("Entity Tab"),
"User Entity View"
);
await userEvent.keyboard("{Enter}");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ describe("pages/dashboard/[dashboardId]/widget/create", () => {
await userEvent.keyboard("{Enter}");

await userEvent.type(
screen.getByLabelText("Entity Tab"),
await screen.findByLabelText("Entity Tab"),
"Verified Entity View"
);

Expand Down

0 comments on commit 191cdb5

Please sign in to comment.