chore: create new tests for the UI, namely normnode, and one for all nodes

This commit is contained in:
Björn Otgaar
2025-11-27 17:14:19 +01:00
parent f87c7fed03
commit c5d9b8342d
7 changed files with 999 additions and 11 deletions

View File

@@ -127,10 +127,10 @@ describe("Logging component", () => {
render(<Logging/>);
expect(screen.getByText("Logs")).toBeInTheDocument();
expect(screen.getByText("WARNING")).toBeInTheDocument();
expect(screen.getByText("logging")).toBeInTheDocument();
expect(screen.getByText("Ping")).toBeInTheDocument();
expect(screen.getByText("Logs")).toBeDefined();
expect(screen.getByText("WARNING")).toBeDefined();
expect(screen.getByText("logging")).toBeDefined();
expect(screen.getByText("Ping")).toBeDefined();
let timestamp = screen.queryByText("ABS TIME");
if (!timestamp) {
@@ -141,7 +141,7 @@ describe("Logging component", () => {
}
await user.click(timestamp);
expect(screen.getByText("00:00:12.345")).toBeInTheDocument();
expect(screen.getByText("00:00:12.345")).toBeDefined();
});
it("shows the scroll-to-bottom button after a manual scroll and scrolls when clicked", async () => {
@@ -188,7 +188,7 @@ describe("Logging component", () => {
logCell.set({...current, message: "Updated"});
});
expect(screen.getByText("Updated")).toBeInTheDocument();
expect(screen.getByText("Updated")).toBeDefined();
await waitFor(() => {
expect(scrollSpy).toHaveBeenCalledTimes(1);
});