SPB Git

Repository Public

playwright.config.ts 3.0 KB 76 lines typescript

1/**2 * =============================================================================3 *                  SP BOUCHER | SOFTWARE & RESEARCH4 *             ARTIFICIAL INTELLIGENCE • FINANCE • ENGINEERING5 * =============================================================================6 *7 * Project          : agentilab-web8 * File             : playwright.config.ts9 * Module           : Configuration10 * Repository       : https://git.spboucher.ai/agentilab-web11 * Project Website  : Not specified12 * Created          : 2026-12-0513 * Last Modified    : 2026-12-0514 *15 * Author           : Simon-Pierre Boucher16 * Position         : Professor of Finance17 * Institution      : Université du Québec en Outaouais (UQO)18 * Organization     : SP Boucher19 * Website          : https://spboucher.ai20 * Git              : https://git.spboucher.ai21 *22 * Preferred Contact: contact@spboucher.ai23 * Development      : dev@spboucher.ai24 * Support          : support@spboucher.ai25 * Security/Admin   : admin@spboucher.ai26 *27 * Copyright (c) 202628 * Simon-Pierre Boucher29 * All rights reserved where applicable. This file is governed by the30 * applicable project license, copyright notices and relevant law.31 * Existing third-party rights and notices remain unaffected.32 *33 * License          : Proprietary34 *35 * Do not embed credentials, private keys, access tokens,36 * certificates or confidential personal information.37 *38 * =============================================================================39 * END OF SP BOUCHER SOURCE HEADER40 * =============================================================================41 */4243import { defineConfig, devices } from '@playwright/test';4445const PORT = 8191;46const STAGING_PORT = 8192;4748/**49 * Les tests tournent contre le build de production (`pnpm build` au préalable).50 * Deux serveurs : le site tel qu’en production, et le même artefact en mode staging.51 */52export default defineConfig({53  testDir: 'tests/e2e',54  fullyParallel: true,55  forbidOnly: !!process.env.CI,56  retries: process.env.CI ? 1 : 0,57  reporter: [['list'], ['html', { open: 'never' }]],58  use: { baseURL: `http://localhost:${PORT}`, trace: 'retain-on-failure' },59  projects: [60    { name: 'chromium', use: { ...devices['Desktop Chrome'] } },61    { name: 'firefox', use: { ...devices['Desktop Firefox'] }, testIgnore: /staging|responsive/ },62    { name: 'webkit', use: { ...devices['Desktop Safari'] }, testIgnore: /staging|responsive/ },63    // WebKit avec le profil d’un iPhone : une simulation, pas un appareil réel.64    { name: 'mobile-safari', use: { ...devices['iPhone 14'] }, testIgnore: /staging|responsive/ },65  ],66  webServer: [67    { command: `pnpm exec next start -p ${PORT}`, url: `http://localhost:${PORT}/healthz`, reuseExistingServer: !process.env.CI },68    {69      command: `pnpm exec next start -p ${STAGING_PORT}`,70      url: `http://localhost:${STAGING_PORT}/healthz`,71      reuseExistingServer: !process.env.CI,72      env: { SITE_ENV: 'staging', STAGING_USER: 'essai', STAGING_PASSWORD: 'essai-local-seulement', HSTS_MAX_AGE: '300' },73    },74  ],75});76
Files main
Menu

Theme