Skip to content

Commit

Permalink
fix test condition
Browse files Browse the repository at this point in the history
  • Loading branch information
arnevogt committed Nov 28, 2024
1 parent 5e76360 commit 011456a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/packages/toc/Tools.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -135,15 +135,15 @@ it("Should collapse all layer items in toc", async () => {

const collapsibles = tocDiv.querySelectorAll(".toc-collapsible-item");
for (const collapsible of collapsibles) {
expect(collapsible.getAttribute("style")?.includes("height: auto;"));
expect(collapsible.getAttribute("style")?.includes("height: auto;")).toBeTruthy();
}

const collapseAllButton = await screen.findByLabelText("tools.collapseAllGroups");
expect(collapseAllButton.tagName).toBe("BUTTON");
await userEvent.click(collapseAllButton);
//collapse sets heigth to 0
for (const collapsible of collapsibles) {
expect(collapsible.getAttribute("style")?.includes("height: 0"));
expect(collapsible.getAttribute("style")?.includes("height: 0")).toBeTruthy();
}
});

Expand Down

0 comments on commit 011456a

Please sign in to comment.