mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2026-05-20 06:21:25 +00:00
WIP: feat(test): Add framework of real-Obsidian based e2e test
This commit is contained in:
25
test_e2e/playwright.config.ts
Normal file
25
test_e2e/playwright.config.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import { defineConfig } from "playwright/test";
|
||||
import path from "node:path";
|
||||
|
||||
export default defineConfig({
|
||||
testDir: path.join(__dirname, "tests"),
|
||||
outputDir: path.join(__dirname, "test-results"),
|
||||
|
||||
// Each test may need to cold-start Obsidian and wait for the vault to load.
|
||||
timeout: 120_000,
|
||||
expect: { timeout: 20_000 },
|
||||
|
||||
// Tests are stateful (one Obsidian process per test file), so no parallelism.
|
||||
fullyParallel: false,
|
||||
workers: 1,
|
||||
retries: 0,
|
||||
|
||||
reporter: [["list"], ["html", { open: "never", outputFolder: path.join(__dirname, "playwright-report") }]],
|
||||
|
||||
use: {
|
||||
// Artefacts are kept only when a test fails.
|
||||
screenshot: "only-on-failure",
|
||||
video: "retain-on-failure",
|
||||
trace: "retain-on-failure",
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user