Skip to content

Commit

Permalink
enhance(e2e): update playwright config
Browse files Browse the repository at this point in the history
  • Loading branch information
Bad3r committed Jun 10, 2023
1 parent 5cb107a commit d43e7eb
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions playwright.config.ts
@@ -1,12 +1,32 @@
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',

// Retry on CI only.
// This will reduce the risk of false negatives when running on CI.
retries: process.env.CI ? 2 : 0,

// Fail the build on CI if you accidentally left test.only in the source code.
forbidOnly: !!process.env.CI,

use: {
// SCapture screenshot after each test failure.
screenshot: 'only-on-failure',
}
},
}

export default config

0 comments on commit d43e7eb

Please sign in to comment.