mirror of
https://github.com/fleetdm/fleet
synced 2026-05-23 00:49:03 +00:00
Fix flaky UI test for custom variables list (#32114)
# Details Fixes a flaky UI test introduced with the Secrets page. The failure was due to some bugs in the test code (see comments).
This commit is contained in:
parent
d4be9f6569
commit
ba9b204875
1 changed files with 3 additions and 2 deletions
|
|
@ -60,7 +60,7 @@ describe("Custom variables", () => {
|
|||
},
|
||||
{
|
||||
name: "SECRET_DOS",
|
||||
id: 1,
|
||||
id: 2,
|
||||
created_at: new Date().toISOString(),
|
||||
updated_at: new Date().toISOString(),
|
||||
},
|
||||
|
|
@ -255,13 +255,14 @@ describe("Custom variables", () => {
|
|||
})
|
||||
).toBeInTheDocument();
|
||||
});
|
||||
await new Promise((resolve) => setTimeout(resolve, 250));
|
||||
await user.click(screen.getByRole("button", { name: "Delete" }));
|
||||
await waitFor(() => {
|
||||
expect(
|
||||
screen.queryByText(/Delete custom variable\?/)
|
||||
).not.toBeInTheDocument();
|
||||
expect(screen.queryByText("SECRET_UNO")).not.toBeInTheDocument();
|
||||
expect(screen.queryByText("SECRET_DOS")).not.toBeInTheDocument();
|
||||
expect(screen.queryByText("SECRET_DOS")).toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue