corvée(playwright) met à jour la configuration playwright
- créé une tâche justfile pour lancer le mode UI de Playwright.
This commit is contained in:
parent
cefb34caa7
commit
75382aec22
3 changed files with 10 additions and 21 deletions
|
|
@ -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,
|
fullyParallel: true,
|
||||||
projects: [
|
projects: [
|
||||||
{
|
{
|
||||||
name: "desktop-chromium-1920",
|
name: "desktop-chromium-1920",
|
||||||
use: { ...devices["Desktop Chrome"], viewport: { height: 1080, width: 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",
|
name: "desktop-firefox-1920",
|
||||||
use: { ...devices["Desktop Firefox"], viewport: { height: 1080, width: 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",
|
// name: "tablet-chromium-portrait",
|
||||||
// use: { ...devices["Galaxy Tab S9"] },
|
// use: { ...devices["Galaxy Tab S9"] },
|
||||||
// },
|
// },
|
||||||
|
|
@ -49,7 +33,6 @@ export default defineConfig({
|
||||||
testDir: "../tests",
|
testDir: "../tests",
|
||||||
timeout: 10_000,
|
timeout: 10_000,
|
||||||
use: {
|
use: {
|
||||||
/* Base URL to use in actions like `await page.goto('/')`. */
|
|
||||||
baseURL: "https://haikuatelier.gcch.local",
|
baseURL: "https://haikuatelier.gcch.local",
|
||||||
clientCertificates: [
|
clientCertificates: [
|
||||||
{
|
{
|
||||||
|
|
@ -61,5 +44,7 @@ export default defineConfig({
|
||||||
ignoreHTTPSErrors: true,
|
ignoreHTTPSErrors: true,
|
||||||
trace: "retry-with-trace",
|
trace: "retry-with-trace",
|
||||||
},
|
},
|
||||||
workers: "100%",
|
workers: "50%",
|
||||||
});
|
});
|
||||||
|
|
||||||
|
export default playwrightConfig;
|
||||||
|
|
|
||||||
3
justfile
3
justfile
|
|
@ -170,3 +170,6 @@ pull-images:
|
||||||
|
|
||||||
export_production_db:
|
export_production_db:
|
||||||
fish "scripts/déclenche-sauvegarde-bdd-production.fish"
|
fish "scripts/déclenche-sauvegarde-bdd-production.fish"
|
||||||
|
|
||||||
|
ui_tests:
|
||||||
|
aube x playwright test --config cfg/playwright.config.ts --ui
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
/** @effect-diagnostics asyncFunction:skip-file */
|
||||||
import type { APIRequestContext, Locator, Page, Response } from "@playwright/test";
|
import type { APIRequestContext, Locator, Page, Response } from "@playwright/test";
|
||||||
import { expect, test } 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";
|
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<void> => {
|
||||||
await scrollToGridsEnd(page);
|
await scrollToGridsEnd(page);
|
||||||
});
|
});
|
||||||
|
|
||||||
test.skip("can access all Products' pages", async ({ page, request }): Promise<void> => {
|
test("can access all Products' pages", async ({ page, request }): Promise<void> => {
|
||||||
await page["goto"]("https://haikuatelier.gcch.local/shop/");
|
await page["goto"]("https://haikuatelier.gcch.local/shop/");
|
||||||
const links = await getAllProductsLinks(page, request);
|
const links = await getAllProductsLinks(page, request);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue