Skip to content

Commit

Permalink
added waitForLoading from test utils.
Browse files Browse the repository at this point in the history
  • Loading branch information
Fernando Cremer authored and Fernando Cremer committed Nov 3, 2023
1 parent eeb3a8c commit a0ef8f0
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions plugins/github-issues/src/components/App.test.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { render, screen, waitFor } from "@testing-library/react";
import App from "./App";
import { waitForLoading } from '../../../testUtils/testUtils';

fetchMock.mockResponse(
JSON.stringify({
Expand All @@ -12,8 +13,6 @@ describe("App", () => {
expect(fetch).toHaveBeenCalledWith(
"https://api.getcortexapp.com/catalog/inventory-planner/openapi"
);
await waitFor(() => {
expect(screen.queryByText("Loading")).not.toBeInTheDocument();
});
await waitForLoading();
});
});

0 comments on commit a0ef8f0

Please sign in to comment.