diff --git a/cfg/playwright.config.ts b/cfg/playwright.config.ts index 5ea6eced..1087f3a3 100644 --- a/cfg/playwright.config.ts +++ b/cfg/playwright.config.ts @@ -1,33 +1,17 @@ -import { defineConfig, devices } from "@playwright/test"; +import { defineConfig, devices, PlaywrightTestConfig } from "@playwright/test"; -export default defineConfig({ +const playwrightConfig: PlaywrightTestConfig = defineConfig({ fullyParallel: true, projects: [ { name: "desktop-chromium-1920", use: { ...devices["Desktop Chrome"], viewport: { height: 1080, width: 1920 } }, }, - // { - // name: "desktop-chromium-1536", - // use: { ...devices["Desktop Chrome"], viewport: { width: 1536, height: 864 } }, - // }, - // { - // name: "desktop-chromium-1366", - // use: { ...devices["Desktop Chrome"], viewport: { width: 1366, height: 768 } }, - // }, { name: "desktop-firefox-1920", use: { ...devices["Desktop Firefox"], viewport: { height: 1080, width: 1920 } }, }, // { - // name: "desktop-firefox-1536", - // use: { ...devices["Desktop Firefox"], viewport: { width: 1536, height: 864 } }, - // }, - // { - // name: "desktop-firefox-1366", - // use: { ...devices["Desktop Firefox"], viewport: { width: 1366, height: 768 } }, - // }, - // { // name: "tablet-chromium-portrait", // use: { ...devices["Galaxy Tab S9"] }, // }, @@ -49,7 +33,6 @@ export default defineConfig({ testDir: "../tests", timeout: 10_000, use: { - /* Base URL to use in actions like `await page.goto('/')`. */ baseURL: "https://haikuatelier.gcch.local", clientCertificates: [ { @@ -61,5 +44,7 @@ export default defineConfig({ ignoreHTTPSErrors: true, trace: "retry-with-trace", }, - workers: "100%", + workers: "50%", }); + +export default playwrightConfig; diff --git a/justfile b/justfile index 5ee66b34..8d2c9d6c 100755 --- a/justfile +++ b/justfile @@ -170,3 +170,6 @@ pull-images: export_production_db: fish "scripts/déclenche-sauvegarde-bdd-production.fish" + +ui_tests: + aube x playwright test --config cfg/playwright.config.ts --ui diff --git a/tests/playwright/shop.spec.ts b/tests/playwright/shop.spec.ts index ec8a092c..465f4816 100644 --- a/tests/playwright/shop.spec.ts +++ b/tests/playwright/shop.spec.ts @@ -1,3 +1,4 @@ +/** @effect-diagnostics asyncFunction:skip-file */ import type { APIRequestContext, Locator, Page, Response } from "@playwright/test"; import { expect, test } from "@playwright/test"; import type { WCV3Products } from "../../web/app/themes/haiku-atelier-2024/src/scripts/lib/types/api/v3/products"; @@ -10,7 +11,7 @@ test("can scroll to the end of the grid", async ({ page }): Promise => { await scrollToGridsEnd(page); }); -test.skip("can access all Products' pages", async ({ page, request }): Promise => { +test("can access all Products' pages", async ({ page, request }): Promise => { await page["goto"]("https://haikuatelier.gcch.local/shop/"); const links = await getAllProductsLinks(page, request);