2023-01-09 06:18:47 +03:00
|
|
|
/**
|
|
|
|
* For unit tests.
|
|
|
|
*/
|
2022-12-30 16:40:15 +03:00
|
|
|
import type { PlaywrightTestConfig } from '@playwright/test';
|
|
|
|
|
|
|
|
const config: PlaywrightTestConfig = {
|
2023-01-09 06:18:47 +03:00
|
|
|
testDir: './packages/',
|
2022-12-30 16:40:15 +03:00
|
|
|
timeout: 30 * 1000,
|
|
|
|
expect: {
|
|
|
|
/**
|
|
|
|
* Maximum time expect() should wait for the condition to be met.
|
|
|
|
* For example in `await expect(locator).toHaveText();`
|
|
|
|
*/
|
|
|
|
timeout: 5000,
|
|
|
|
},
|
|
|
|
fullyParallel: true,
|
|
|
|
forbidOnly: !!process.env.CI,
|
|
|
|
retries: process.env.CI ? 2 : 0,
|
|
|
|
workers: process.env.CI ? 1 : undefined,
|
|
|
|
use: {
|
|
|
|
actionTimeout: 0,
|
|
|
|
|
|
|
|
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
|
|
|
|
trace: 'on-first-retry',
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
export default config;
|