2021-11-23 06:30:01 +00:00
|
|
|
import { PlaywrightTestConfig } from '@playwright/test'
|
|
|
|
|
|
|
|
const config: PlaywrightTestConfig = {
|
2023-06-14 02:20:44 +00:00
|
|
|
// The directory where the tests are located
|
|
|
|
// The order of the tests is determined by the file names alphabetically.
|
2021-11-23 06:30:01 +00:00
|
|
|
testDir: './e2e-tests',
|
2023-06-14 02:20:44 +00:00
|
|
|
|
|
|
|
// The number of retries before marking a test as failed.
|
2021-11-23 06:30:01 +00:00
|
|
|
maxFailures: 1,
|
2023-06-14 02:20:44 +00:00
|
|
|
|
|
|
|
// The number of Logseq instances to run in parallel.
|
|
|
|
// NOTE: must be 1 for now, otherwise tests will fail.
|
|
|
|
workers: 1,
|
|
|
|
|
|
|
|
// 'github' for GitHub Actions CI to generate annotations, plus a concise 'dot'.
|
|
|
|
// default 'list' when running locally.
|
|
|
|
reporter: process.env.CI ? 'github' : 'list',
|
|
|
|
|
|
|
|
// Fail the build on CI if test.only is present.
|
|
|
|
forbidOnly: !!process.env.CI,
|
|
|
|
|
2021-11-23 06:30:01 +00:00
|
|
|
use: {
|
2023-06-14 02:20:44 +00:00
|
|
|
// SCapture screenshot after each test failure.
|
2021-11-23 06:30:01 +00:00
|
|
|
screenshot: 'only-on-failure',
|
2023-06-14 02:20:44 +00:00
|
|
|
},
|
2021-11-23 06:30:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
export default config
|