| Sean McCullough | b29f891 | 2025-04-20 15:39:11 -0700 | [diff] [blame] | 1 | import { test, expect } from "@sand4rt/experimental-ct-web"; |
| 2 | import { SketchNetworkStatus } from "./sketch-network-status"; |
| Sean McCullough | 86b5686 | 2025-04-18 13:04:03 -0700 | [diff] [blame] | 3 | |
| Philip Zeyliger | 5e35702 | 2025-05-16 04:50:34 +0000 | [diff] [blame^] | 4 | // Test that the network status component doesn't display visible content |
| 5 | // since we've removed the green dot indicator |
| 6 | test("network status component is not visible", async ({ mount }) => { |
| Sean McCullough | b29f891 | 2025-04-20 15:39:11 -0700 | [diff] [blame] | 7 | const component = await mount(SketchNetworkStatus, { |
| 8 | props: { |
| 9 | connection: "connected", |
| Sean McCullough | b29f891 | 2025-04-20 15:39:11 -0700 | [diff] [blame] | 10 | }, |
| Sean McCullough | 86b5686 | 2025-04-18 13:04:03 -0700 | [diff] [blame] | 11 | }); |
| 12 | |
| Philip Zeyliger | 5e35702 | 2025-05-16 04:50:34 +0000 | [diff] [blame^] | 13 | // The status container should exist but be hidden with display: none |
| 14 | await expect(component.locator(".status-container")).toHaveCSS("display", "none"); |
| Sean McCullough | b29f891 | 2025-04-20 15:39:11 -0700 | [diff] [blame] | 15 | }); |
| Sean McCullough | 86b5686 | 2025-04-18 13:04:03 -0700 | [diff] [blame] | 16 | |
| Philip Zeyliger | 5e35702 | 2025-05-16 04:50:34 +0000 | [diff] [blame^] | 17 | // Test that the network status component remains invisible regardless of connection state |
| 18 | test("network status component is not visible when disconnected", async ({ mount }) => { |
| Sean McCullough | b29f891 | 2025-04-20 15:39:11 -0700 | [diff] [blame] | 19 | const component = await mount(SketchNetworkStatus, { |
| 20 | props: { |
| 21 | connection: "disconnected", |
| Philip Zeyliger | 5e35702 | 2025-05-16 04:50:34 +0000 | [diff] [blame^] | 22 | error: "Connection error", |
| Sean McCullough | b29f891 | 2025-04-20 15:39:11 -0700 | [diff] [blame] | 23 | }, |
| Sean McCullough | 86b5686 | 2025-04-18 13:04:03 -0700 | [diff] [blame] | 24 | }); |
| Sean McCullough | b29f891 | 2025-04-20 15:39:11 -0700 | [diff] [blame] | 25 | |
| Philip Zeyliger | 5e35702 | 2025-05-16 04:50:34 +0000 | [diff] [blame^] | 26 | // The status container should exist but be hidden with display: none |
| 27 | await expect(component.locator(".status-container")).toHaveCSS("display", "none"); |
| Sean McCullough | 86b5686 | 2025-04-18 13:04:03 -0700 | [diff] [blame] | 28 | }); |