diff --git a/packages/obsidian-testing-framework/src/index.ts b/packages/obsidian-testing-framework/src/index.ts index 4fef385..21898a7 100644 --- a/packages/obsidian-testing-framework/src/index.ts +++ b/packages/obsidian-testing-framework/src/index.ts @@ -42,7 +42,7 @@ const obsidianTestFixtures: Fixtures = { timeout: 60000, args: [ getExe(), - !!vault && `obsidian://open?vault=${encodeURI(vault)}`, + !!vault && `obsidian://open?path=${encodeURIComponent(vault)}`, ].filter((a) => !!a) as string[], }); electronApp.on("console", async (msg) => { diff --git a/packages/test-project/playwright.config.ts b/packages/test-project/playwright.config.ts index 64f2411..449eefa 100644 --- a/packages/test-project/playwright.config.ts +++ b/packages/test-project/playwright.config.ts @@ -1,5 +1,7 @@ import { defineConfig, devices } from '@playwright/test'; import {ObsidianTestFixtures} from "obsidian-testing-framework/fixture"; +import os from "os" +import path from 'path'; /** * Read environment variables from file. @@ -33,7 +35,7 @@ export default defineConfig({ /* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */ trace: 'on-first-retry', obsidian: { - vault: "test-framework-tester" + vault: path.join(__dirname, "vault", "test-framework-tester") } },