| 
 | 1 | +const { defineConfig, devices } = require('@playwright/experimental-ct-vue')  | 
 | 2 | +const { resolve } = require('path')  | 
 | 3 | + | 
 | 4 | +/**  | 
 | 5 | + * See https://playwright.dev/docs/test-configuration.  | 
 | 6 | + */  | 
 | 7 | +module.exports = defineConfig({  | 
 | 8 | +  testDir: './',  | 
 | 9 | +  /* The base directory, relative to the config file, for snapshot files created with toMatchSnapshot and toHaveScreenshot. */  | 
 | 10 | +  snapshotDir: './__snapshots__',  | 
 | 11 | +  /* Maximum time one test can run for. */  | 
 | 12 | +  timeout: 10 * 1000,  | 
 | 13 | +  /* Run tests in files in parallel */  | 
 | 14 | +  fullyParallel: true,  | 
 | 15 | +  /* Fail the build on CI if you accidentally left test.only in the source code. */  | 
 | 16 | +  forbidOnly: !!process.env.CI,  | 
 | 17 | +  /* Retry on CI only */  | 
 | 18 | +  retries: process.env.CI ? 2 : 0,  | 
 | 19 | +  /* Opt out of parallel tests on CI. */  | 
 | 20 | +  workers: process.env.CI ? 1 : undefined,  | 
 | 21 | +  /* Reporter to use. See https://playwright.dev/docs/test-reporters */  | 
 | 22 | +  reporter: 'html',  | 
 | 23 | +  /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */  | 
 | 24 | +  use: {  | 
 | 25 | +    /* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */  | 
 | 26 | +    trace: 'on-first-retry',  | 
 | 27 | +    /* Port to use for Playwright component endpoint. */  | 
 | 28 | +    ctPort: 3100,  | 
 | 29 | +    /* Vite configuration for Playwright component testing. */  | 
 | 30 | +    ctViteConfig: {  | 
 | 31 | +      resolve: {  | 
 | 32 | +        alias: {  | 
 | 33 | +          '@': resolve(__dirname, './src')  | 
 | 34 | +        }  | 
 | 35 | +      }  | 
 | 36 | +    }  | 
 | 37 | +  },  | 
 | 38 | + | 
 | 39 | +  /* Configure projects for major browsers */  | 
 | 40 | +  projects: [  | 
 | 41 | +    {  | 
 | 42 | +      name: 'chromium',  | 
 | 43 | +      use: { ...devices['Desktop Chrome'] }  | 
 | 44 | +    },  | 
 | 45 | +    {  | 
 | 46 | +      name: 'firefox',  | 
 | 47 | +      use: { ...devices['Desktop Firefox'] }  | 
 | 48 | +    },  | 
 | 49 | +    {  | 
 | 50 | +      name: 'webkit',  | 
 | 51 | +      use: { ...devices['Desktop Safari'] }  | 
 | 52 | +    }  | 
 | 53 | +  ]  | 
 | 54 | +})  | 
0 commit comments