Files
meshcore-hub/e2e/tests/empty-states.spec.ts
T
Louis King ec199e4e2b test(e2e): expand Playwright coverage for UI regression protection
Grow the suite from 41 to 77 specs covering previously untested UI
surfaces: channels admin CRUD with QR codes and keyboard nav, node
detail adoption/tag editing with the role permission matrix, SPA 404
page, sortable tables with URL-synced sort state, pagination with
filter-preserving links, mobile viewport (hamburger nav, mobile cards,
sort select), anonymous/member auth gating, raw packet detail, and
empty states. Route cards now assert history chart, recent-match links
and owner profile links.

Supporting changes: purposeful data-testids on channels/node-detail/
pagination/sort headers (plus aria-sort) and mobile nav; seed_data adds
30 trace_data filler groups for pagination, channels at every
visibility tier incl. one disabled, and a pw-operator profile.
2026-08-30 12:27:48 +01:00

34 lines
1.2 KiB
TypeScript

import { expect, test } from "@playwright/test";
test.describe("empty states", () => {
test("nodes search with no matches shows the empty state", async ({ page }) => {
await page.goto("/nodes?search=NoMatchToBeFound");
await expect(page.getByText("No nodes found")).toBeVisible();
await expect(page.getByTestId("list-row")).toHaveCount(0);
});
test("advertisements search with no matches shows the empty state", async ({
page,
}) => {
await page.goto("/advertisements?search=NoMatchToBeFound");
await expect(page.getByText("No adverts found")).toBeVisible();
await expect(page.getByTestId("list-row")).toHaveCount(0);
});
test("messages filtered to an unknown channel show the empty state", async ({
page,
}) => {
await page.goto("/messages?channel_idx=99999");
await expect(page.getByText("No messages found")).toBeVisible();
await expect(page.getByTestId("list-row")).toHaveCount(0);
});
test("packets search with no matches shows the empty state", async ({
page,
}) => {
await page.goto("/packets?search=NoMatchToBeFound");
await expect(page.getByText("No packets found")).toBeVisible();
await expect(page.getByTestId("list-row")).toHaveCount(0);
});
});