SPB Git

Repository Public

playwright.config.ts 2.9 KB 63 lines typescript

1/**2 * =============================================================================3 *                  SP BOUCHER | SOFTWARE & RESEARCH4 *             ARTIFICIAL INTELLIGENCE • FINANCE • ENGINEERING5 * =============================================================================6 *7 * Project          : ORIX App Universe8 * File             : playwright.config.ts9 * Repository       : https://git.spboucher.ai/orix-spboucher-ai10 * Project Website  : https://www.orixlab.dev11 * Created          : 2026-11-2112 * Last Modified    : 2026-11-2113 *14 * Author           : Simon-Pierre Boucher15 * Position         : Professor of Finance16 * Institution      : Université du Québec en Outaouais (UQO)17 * Organization     : SP Boucher18 * Website          : https://spboucher.ai19 * Git              : https://git.spboucher.ai20 *21 * Preferred Contact: support@spboucher.ai22 * Development      : dev@spboucher.ai23 * Support          : support@spboucher.ai24 * Security/Admin   : admin@spboucher.ai25 *26 * Copyright (c) 202627 * Simon-Pierre Boucher28 * All rights reserved where applicable. This file is governed by the29 * applicable project license, copyright notices and relevant law.30 * Existing third-party rights and notices remain unaffected.31 *32 * License          : None specified (no license file in this repository)33 *34 * Do not embed credentials, private keys, access tokens,35 * certificates or confidential personal information.36 *37 * =============================================================================38 * END OF SP BOUCHER SOURCE HEADER39 * =============================================================================40 */4142import { defineConfig, devices } from "@playwright/test";43import { resolve } from "node:path";4445const PORT = 8841, DATA = resolve("e2e/.tmp/data");46export const E2E = { port: PORT, data: DATA, base: `http://localhost:${PORT}` };4748export default defineConfig({49  testDir: "e2e", timeout: 45_000, fullyParallel: false, workers: 1, reporter: [["list"]],50  globalSetup: "./e2e/global-setup.ts",51  use: { baseURL: E2E.base, trace: "retain-on-failure" },52  projects: [53    { name: "desktop", use: { ...devices["Desktop Chrome"], viewport: { width: 1440, height: 900 } }, testIgnore: /mobile\.spec/ },54    { name: "mobile", use: { ...devices["iPhone 14"], browserName: "chromium", defaultBrowserType: "chromium" }, testMatch: /mobile\.spec/ },55    { name: "tablet", use: { browserName: "chromium", viewport: { width: 834, height: 1194 }, hasTouch: true }, testMatch: /mobile\.spec/ },56  ],57  webServer: {58    command: `node_modules/.bin/next start -p ${PORT}`, url: `${E2E.base}/robots.txt`, reuseExistingServer: false, timeout: 60_000,59    // A production server on a throw-away database. The forge URL points nowhere: no test touches the network.60    env: { NODE_ENV: "production", ORIX_DATA_DIR: DATA, APP_URL: E2E.base, RP_ID: "localhost", SPBGIT_URL: "http://127.0.0.1:9", SYNC_INTERVAL_MIN: "0", WEBHOOK_SECRET: "e2e-webhook-secret-0123456789abcdef" },61  },62});63
Files main
Menu

Theme