From bc57766925bfee4c449d61a91ebe3544b85bdc4d Mon Sep 17 00:00:00 2001 From: Bad3r Date: Wed, 14 Jun 2023 02:20:44 +0000 Subject: [PATCH] enhance(e2e): update playwright config (#9623) --- playwright.config.ts | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/playwright.config.ts b/playwright.config.ts index 53a869e1e32..0040571be05 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -1,12 +1,28 @@ import { PlaywrightTestConfig } from '@playwright/test' const config: PlaywrightTestConfig = { + // The directory where the tests are located + // The order of the tests is determined by the file names alphabetically. testDir: './e2e-tests', + + // The number of retries before marking a test as failed. maxFailures: 1, - workers: 1, // NOTE: must be 1 for now, otherwise tests will fail. + + // 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, + use: { + // SCapture screenshot after each test failure. screenshot: 'only-on-failure', - } + }, } export default config