test: high coverage for all UI tests

This commit is contained in:
JobvAlewijk
2025-12-07 15:32:20 +00:00
committed by Gerla, J. (Justin)
parent c639a37dfc
commit 086caea737
18 changed files with 1641 additions and 83 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);
});