mirror of
https://gitlab.nic.cz/turris/reforis/foris-js.git
synced 2024-11-14 17:35:35 +01:00
Fix tests
This commit is contained in:
parent
87c81a2a2d
commit
0099759279
|
@ -43,14 +43,17 @@ describe("AlertContext", () => {
|
|||
expect(componentContainer).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it("should dismiss alert with alert button", () => {
|
||||
it("should dismiss alert with alert button", async () => {
|
||||
fireEvent.click(getByText(componentContainer, "Set alert"));
|
||||
// Alert is present
|
||||
expect(getByText(componentContainer, "Alert content")).toBeDefined();
|
||||
|
||||
fireEvent.click(componentContainer.querySelector(".btn-close"));
|
||||
// Alert is gone
|
||||
expect(queryByText(componentContainer, "Alert content")).toBeNull();
|
||||
await (() =>
|
||||
expect(
|
||||
queryByText(componentContainer, "Alert content")
|
||||
).toBeNull());
|
||||
});
|
||||
|
||||
it("should dismiss alert with external button", () => {
|
||||
|
|
Loading…
Reference in New Issue
Block a user