Files
pleno-vue/tests/e2e/edge-gateways.visual.spec.js
T
Jeppe Bundgaard bef9eaeb72 Add unit tests and new components for edge gateway workflows:
- Introduced unit tests for edge gateway workflow helpers, including workflow step resolution, incident action mapping, relay health row formatting, and workspace state merging.
- Added new components for advanced operations, configuration panel, context panel, fleet rail, and health summary.
- Enhanced gateway management UI with support for advanced actions, fallback operations, relay health visualization, and device binding features.
2026-04-16 13:44:36 +02:00

42 lines
1.7 KiB
JavaScript

import { expect, test } from "@playwright/test";
import { mockApi, primeMockSession } from "./support/network.js";
async function primeSuperuserSession(page) {
const token = "superuser-edge-gateway-visual-token";
await primeMockSession(page, { token });
}
test.describe("Edge gateway visuals", () => {
test.beforeEach(async ({ page }) => {
await mockApi(page, {
authenticated: true,
permissions: ["superuser", "user"],
});
await primeSuperuserSession(page);
});
test("desktop tabbed hierarchy", async ({ page }, testInfo) => {
test.skip(!testInfo.project.name.includes("desktop"), "Desktop only");
await page.goto("/superuser/gateways");
await expect(page.getByTestId("gateway-step-shell-nav")).toContainText("Kategorier");
await expect(page.getByTestId("gateway-step-assess")).toContainText("Vurder drift");
await expect(page.getByTestId("gateway-step-configure")).toContainText("Konfigurer lokalt");
await expect(page.getByTestId("gateway-step-recover")).toContainText("Gendan og vedligehold");
await expect(page.getByTestId("gateway-detail-header")).toContainText("Situationsbillede");
await expect(page.getByTestId("gateway-fleet-rail")).toContainText("Vælg en gateway");
});
test("mobile tabbed hierarchy", async ({ page }, testInfo) => {
test.skip(!testInfo.project.name.includes("mobile"), "Mobile only");
await page.goto("/superuser/gateways");
await expect(page.getByTestId("gateway-mobile-open-rail")).toBeVisible();
await expect(page.getByTestId("gateway-step-shell-nav")).toContainText("Kategorier");
await page.getByTestId("gateway-mobile-open-rail").click();
await expect(page.getByTestId("gateway-fleet-rail")).toContainText("Vælg en gateway");
});
});