Advertisement
Guest User

Untitled

a guest
Nov 29th, 2022
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import type { PlaywrightTestConfig } from "@playwright/test";
  2. import { devices } from "@playwright/test";
  3.  
  4. const config: PlaywrightTestConfig = {
  5.   testDir: "./e2e",
  6.   timeout: 30 * 1000,
  7.   expect: {
  8.     timeout: 5000,
  9.   },
  10.   forbidOnly: !!process.env.CI,
  11.   retries: process.env.CI ? 2 : 0,
  12.   workers: process.env.CI ? 1 : undefined,
  13.   reporter: "html",
  14.   use: {
  15.     actionTimeout: 0,
  16.     baseURL: "http://localhost:5173",
  17.     trace: "on-first-retry",
  18.     headless: !!process.env.CI,
  19.   },
  20.   projects: [
  21.     {
  22.       name: "chromium",
  23.       use: {
  24.         ...devices["Desktop Chrome"],
  25.       },
  26.     },
  27.     {
  28.       name: "firefox",
  29.       use: {
  30.         ...devices["Desktop Firefox"],
  31.       },
  32.     },
  33.   ],
  34.   webServer: {
  35.     command: process.env.CI ? "vite preview --port 5173" : "vite dev",
  36.     port: 5173,
  37.     reuseExistingServer: !process.env.CI,
  38.   },
  39. };
  40.  
  41. export default config;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement