2024-10-28 18:30:03 +03:00
|
|
|
// @ts-check
|
|
|
|
const { defineConfig, devices } = require('@playwright/test');
|
2022-08-04 11:50:09 +03:00
|
|
|
|
2023-03-02 13:04:01 +03:00
|
|
|
/**
|
|
|
|
* @see https://playwright.dev/docs/test-configuration
|
|
|
|
*/
|
2024-10-28 18:30:03 +03:00
|
|
|
module.exports = defineConfig({
|
|
|
|
testDir: './test',
|
2023-03-02 13:04:01 +03:00
|
|
|
timeout: 60 * 1000,
|
|
|
|
fullyParallel: true,
|
|
|
|
/* Fail the build on CI if you accidentally left test.only in the source code. */
|
|
|
|
forbidOnly: !!process.env.CI,
|
|
|
|
/* Retry on CI only */
|
|
|
|
retries: process.env.CI ? 1 : 0,
|
|
|
|
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
|
|
|
|
reporter: 'list',
|
|
|
|
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
|
2022-08-04 11:50:09 +03:00
|
|
|
projects: [
|
|
|
|
{
|
2023-03-02 13:04:01 +03:00
|
|
|
name: 'chromium',
|
|
|
|
use: { ...devices['Desktop Chrome'] },
|
2022-08-04 11:50:09 +03:00
|
|
|
},
|
2023-03-02 13:04:01 +03:00
|
|
|
|
2022-08-04 11:50:09 +03:00
|
|
|
{
|
2023-03-02 13:04:01 +03:00
|
|
|
name: 'firefox',
|
|
|
|
use: { ...devices['Desktop Firefox'] },
|
2022-08-04 11:50:09 +03:00
|
|
|
},
|
2023-03-02 13:04:01 +03:00
|
|
|
|
2022-08-04 11:50:09 +03:00
|
|
|
{
|
2023-03-02 13:04:01 +03:00
|
|
|
name: 'webkit',
|
|
|
|
use: { ...devices['Desktop Safari'] },
|
2022-08-04 11:50:09 +03:00
|
|
|
},
|
|
|
|
],
|
2023-03-02 13:04:01 +03:00
|
|
|
webServer: {
|
|
|
|
command: 'npm run start',
|
|
|
|
port: 3000,
|
2024-10-28 18:30:03 +03:00
|
|
|
reuseExistingServer: !process.env.CI
|
2023-03-02 13:04:01 +03:00
|
|
|
},
|
2024-10-28 18:30:03 +03:00
|
|
|
});
|
|
|
|
|