Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: test warnings #345

Merged
merged 12 commits into from
Nov 2, 2023
18 changes: 10 additions & 8 deletions resources/js/Components/Report.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import NftFactory from "@/Tests/Factories/Nfts/NftFactory";
import UserDataFactory from "@/Tests/Factories/UserDataFactory";
import WalletFactory from "@/Tests/Factories/Wallet/WalletFactory";
import { getSampleMetaMaskState } from "@/Tests/SampleData/SampleMetaMaskState";
import { mockAuthContext, render, screen, userEvent } from "@/Tests/testing-library";
import { act, mockAuthContext, render, screen, userEvent } from "@/Tests/testing-library";

let routerSpy: SpyInstance;
let useAuthorizedActionSpy: SpyInstance;
Expand Down Expand Up @@ -129,15 +129,17 @@ describe("Report", () => {
expect(screen.queryByTestId("ReportModal")).not.toBeInTheDocument();
});

it("show report modal on load", () => {
it("show report modal on load", async () => {
const collection = new CollectionDetailDataFactory().create();

render(
<Report
model={collection}
modelType={"collection"}
show={true}
/>,
await act(() =>
render(
<Report
model={collection}
modelType={"collection"}
show={true}
/>,
),
);

expect(screen.getByTestId("ReportModal")).toBeInTheDocument();
Expand Down
Loading