Skip to content

Commit 24baa84

Browse files
committed
test(e2e): remove skipped Playwright matrix cases
1 parent 1707617 commit 24baa84

2 files changed

Lines changed: 16 additions & 10 deletions

File tree

playwright.config.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,12 @@ export default defineConfig({
2424
projects: [
2525
{
2626
name: "chromium-desktop",
27+
grep: /@desktop/,
2728
use: { ...devices["Desktop Chrome"], viewport: { width: 1440, height: 900 } },
2829
},
2930
{
3031
name: "chromium-tv",
32+
grep: /@tv/,
3133
use: { ...devices["Desktop Chrome"], viewport: { width: 1920, height: 1080 } },
3234
},
3335
],

tests/e2e/design-system.spec.ts

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,15 @@ const axePages = [
3030
"/preview/web-shell.html",
3131
];
3232

33-
const tvSmokePages = new Set([
33+
const tvSmokePages = [
3434
"/preview/mobile-shell.html",
3535
"/preview/tv-action-menus.html",
3636
"/preview/tv-focus.html",
3737
"/preview/tv-foundations.html",
3838
"/preview/tv-navigation.html",
3939
"/preview/tv-player.html",
4040
"/preview/web-shell.html",
41-
]);
41+
];
4242

4343
const apcaContrastContractSelector = '[data-contrast-contract="apca"]';
4444

@@ -63,24 +63,29 @@ async function resolvedCssColor(page: Page, variableName: string): Promise<strin
6363

6464
test.describe("design.put.io static guide", () => {
6565
for (const pagePath of htmlPages) {
66-
test(`${pagePath} renders non-empty local content`, async ({ page }, testInfo) => {
67-
test.skip(testInfo.project.name === "chromium-tv" && !tvSmokePages.has(pagePath), "Desktop smoke covers generic pages; TV project covers shell/TV framing.");
66+
test(`${pagePath} renders non-empty local content @desktop`, async ({ page }) => {
67+
const response = await page.goto(pagePath, { waitUntil: "domcontentloaded" });
68+
expect(response?.ok(), `${pagePath} should return HTTP 2xx`).toBe(true);
69+
await expect(page.locator("body")).toContainText(/\S{3,}/);
70+
});
71+
}
72+
73+
for (const pagePath of tvSmokePages) {
74+
test(`${pagePath} renders non-empty TV content @tv`, async ({ page }) => {
6875
const response = await page.goto(pagePath, { waitUntil: "domcontentloaded" });
6976
expect(response?.ok(), `${pagePath} should return HTTP 2xx`).toBe(true);
7077
await expect(page.locator("body")).toContainText(/\S{3,}/);
7178
});
7279
}
7380

74-
test("generated tokens are available to the browser", async ({ page }, testInfo) => {
75-
test.skip(testInfo.project.name !== "chromium-desktop", "Token availability is viewport-independent.");
81+
test("generated tokens are available to the browser @desktop", async ({ page }) => {
7682
await page.goto("/design-system.html");
7783
await expect.poll(async () => {
7884
return page.evaluate(() => getComputedStyle(document.documentElement).getPropertyValue("--yellow-solid").trim());
7985
}).toBe("hsl(44.7, 97.9%, 63.1%)");
8086
});
8187

82-
test("button variants consume hover aliases", async ({ page }, testInfo) => {
83-
test.skip(testInfo.project.name !== "chromium-desktop", "Hover contract is browser behavior; render smoke covers TV framing.");
88+
test("button variants consume hover aliases @desktop", async ({ page }) => {
8489
await page.goto("/preview/components-buttons.html?theme=light", { waitUntil: "domcontentloaded" });
8590

8691
for (const [selector, variableName] of buttonHoverAliases) {
@@ -91,8 +96,7 @@ test.describe("design.put.io static guide", () => {
9196
});
9297

9398
for (const pagePath of axePages) {
94-
test(`${pagePath} has no serious automated accessibility violations`, async ({ page }, testInfo) => {
95-
test.skip(testInfo.project.name !== "chromium-desktop", "Axe coverage runs once; render smoke covers TV framing.");
99+
test(`${pagePath} has no serious automated accessibility violations @desktop`, async ({ page }) => {
96100
await page.goto(pagePath, { waitUntil: "domcontentloaded" });
97101
const builder = new AxeBuilder({ page });
98102
if (pagePath.startsWith("/design-system")) {

0 commit comments

Comments
 (0)