github.com/minio/console@v1.4.1/web-app/playwright.config.ts (about) 1 import { defineConfig, devices } from "@playwright/test"; 2 3 /** 4 * Read environment variables from file. 5 * https://github.com/motdotla/dotenv 6 */ 7 // require('dotenv').config(); 8 9 /** 10 * See https://playwright.dev/docs/test-configuration. 11 */ 12 export default defineConfig({ 13 testDir: "./e2e", 14 /* Maximum time one test can run for. */ 15 timeout: 30 * 1000, 16 expect: { 17 /** 18 * Maximum time expect() should wait for the condition to be met. 19 * For example in `await expect(locator).toHaveText();` 20 */ 21 timeout: 5000, 22 }, 23 /* Run tests in files in parallel */ 24 fullyParallel: true, 25 /* Fail the build on CI if you accidentally left test.only in the source code. */ 26 forbidOnly: !!process.env.CI, 27 /* Retry on CI only */ 28 retries: process.env.CI ? 2 : 0, 29 /* Opt out of parallel tests on CI. */ 30 workers: process.env.CI ? 3 : undefined, 31 /* Reporter to use. See https://playwright.dev/docs/test-reporters */ 32 reporter: "html", 33 /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */ 34 use: { 35 /* Maximum time each action such as `click()` can take. Defaults to 0 (no limit). */ 36 actionTimeout: 0, 37 /* Base URL to use in actions like `await page.goto('/')`. */ 38 // baseURL: 'http://localhost:3000', 39 40 /* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */ 41 trace: "on-first-retry", 42 }, 43 44 /* Configure projects for major browsers */ 45 projects: [ 46 { name: "setup", testMatch: /.*\.setup\.ts/ }, 47 { 48 name: "chromium", 49 use: { ...devices["Desktop Chrome"] }, 50 dependencies: ["setup"], 51 }, 52 // 53 // { 54 // name: "firefox", 55 // use: { ...devices["Desktop Firefox"] }, 56 // dependencies: ["setup"], 57 // }, 58 // 59 // { 60 // name: "webkit", 61 // use: { ...devices["Desktop Safari"] }, 62 // dependencies: ["setup"], 63 // }, 64 65 /* Test against mobile viewports. */ 66 // { 67 // name: 'Mobile Chrome', 68 // use: { ...devices['Pixel 5'] }, 69 // }, 70 // { 71 // name: 'Mobile Safari', 72 // use: { ...devices['iPhone 12'] }, 73 // }, 74 75 /* Test against branded browsers. */ 76 // { 77 // name: 'Microsoft Edge', 78 // use: { channel: 'msedge' }, 79 // }, 80 // { 81 // name: 'Google Chrome', 82 // use: { channel: 'chrome' }, 83 // }, 84 ], 85 86 /* Folder for test artifacts such as screenshots, videos, traces, etc. */ 87 // outputDir: 'test-results/', 88 89 /* Run your local dev server before starting the tests */ 90 // webServer: { 91 // command: "react-app-rewired start", 92 // port: 5005, 93 // env: { 94 // PORT: "5005", 95 // USE_BABEL_PLUGIN_ISTANBUL: "1", 96 // }, 97 // }, 98 });