mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
fix unit tests
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
6c6d71941e
commit
5e6952045b
@ -106,12 +106,7 @@ describe("Extensions", () => {
|
||||
});
|
||||
|
||||
fireEvent.click(res.getByText("Install"));
|
||||
|
||||
await waitFor(() => {
|
||||
expect(res.getByText("Install").closest("button")).toBeDisabled();
|
||||
}, {
|
||||
timeout: 10000,
|
||||
});
|
||||
expect(res.getByText("Install").closest("button")).toBeDisabled();
|
||||
});
|
||||
|
||||
it("displays spinner while extensions are loading", async () => {
|
||||
@ -119,13 +114,12 @@ describe("Extensions", () => {
|
||||
const res = render(<Extensions />);
|
||||
|
||||
expect(res.container.querySelector(".Spinner")).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it("does not display the spinner while extensions are not loading", async () => {
|
||||
extensionDiscovery.isLoaded = true;
|
||||
const res = render(<Extensions />);
|
||||
|
||||
await waitFor(() => {
|
||||
expect(res.container.querySelector(".Spinner")).not.toBeInTheDocument();
|
||||
}, {
|
||||
timeout: 30000,
|
||||
});
|
||||
expect(res.container.querySelector(".Spinner")).not.toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user