blob: 6930910310353891aaf82eb61d435ba30ce8925e [file] [log] [blame]
Sean McCulloughb29f8912025-04-20 15:39:11 -07001import { test, expect } from "@sand4rt/experimental-ct-web";
2import { SketchNetworkStatus } from "./sketch-network-status";
Sean McCullough86b56862025-04-18 13:04:03 -07003
Philip Zeyliger5e357022025-05-16 04:50:34 +00004// Test that the network status component doesn't display visible content
5// since we've removed the green dot indicator
6test("network status component is not visible", async ({ mount }) => {
Sean McCulloughb29f8912025-04-20 15:39:11 -07007 const component = await mount(SketchNetworkStatus, {
8 props: {
9 connection: "connected",
Sean McCulloughb29f8912025-04-20 15:39:11 -070010 },
Sean McCullough86b56862025-04-18 13:04:03 -070011 });
12
Philip Zeyliger5e357022025-05-16 04:50:34 +000013 // The status container should exist but be hidden with display: none
14 await expect(component.locator(".status-container")).toHaveCSS("display", "none");
Sean McCulloughb29f8912025-04-20 15:39:11 -070015});
Sean McCullough86b56862025-04-18 13:04:03 -070016
Philip Zeyliger5e357022025-05-16 04:50:34 +000017// Test that the network status component remains invisible regardless of connection state
18test("network status component is not visible when disconnected", async ({ mount }) => {
Sean McCulloughb29f8912025-04-20 15:39:11 -070019 const component = await mount(SketchNetworkStatus, {
20 props: {
21 connection: "disconnected",
Philip Zeyliger5e357022025-05-16 04:50:34 +000022 error: "Connection error",
Sean McCulloughb29f8912025-04-20 15:39:11 -070023 },
Sean McCullough86b56862025-04-18 13:04:03 -070024 });
Sean McCulloughb29f8912025-04-20 15:39:11 -070025
Philip Zeyliger5e357022025-05-16 04:50:34 +000026 // The status container should exist but be hidden with display: none
27 await expect(component.locator(".status-container")).toHaveCSS("display", "none");
Sean McCullough86b56862025-04-18 13:04:03 -070028});