WIP: feat(test): Add framework of real-Obsidian based e2e test

This commit is contained in:
vorotamoroz
2026-05-11 03:33:11 +01:00
parent 2afe12ad2d
commit edf85184c1
7 changed files with 451 additions and 2 deletions

View 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",
},
});