2024-08-28 00:00:19 +08:00
|
|
|
import { defineConfig } from '@playwright/test';
|
|
|
|
|
2024-05-15 08:06:44 +01:00
|
|
|
// NOTE: Sometimes, tests fail with `TypeError: process.stdout.clearLine is not a function`
|
|
|
|
// for some reason. This comes from Vite, and is conditionally called based on `isTTY`.
|
|
|
|
// We set it to false here to skip this odd behavior.
|
|
|
|
process.stdout.isTTY = false;
|
|
|
|
|
2024-08-28 00:00:19 +08:00
|
|
|
export default defineConfig({
|
2024-05-15 08:06:44 +01:00
|
|
|
// TODO: add more tests like view transitions and audits, and fix them. Some of them are failing.
|
2024-05-21 12:50:32 +02:00
|
|
|
testMatch: ['e2e/css.test.js', 'e2e/prefetch.test.js', 'e2e/view-transitions.test.js'],
|
2024-08-29 06:13:49 -04:00
|
|
|
timeout: 40_000,
|
|
|
|
expect: {
|
|
|
|
timeout: 6_000,
|
|
|
|
},
|
2024-05-15 08:06:44 +01:00
|
|
|
forbidOnly: !!process.env.CI,
|
2024-08-28 00:00:19 +08:00
|
|
|
retries: process.env.CI ? 2 : 0,
|
|
|
|
workers: process.env.CI ? 1 : undefined,
|
2024-05-15 08:06:44 +01:00
|
|
|
projects: [
|
|
|
|
{
|
|
|
|
name: 'Firefox Stable',
|
|
|
|
use: {
|
|
|
|
browserName: 'firefox',
|
|
|
|
channel: 'firefox',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
2024-08-28 00:00:19 +08:00
|
|
|
});
|