diff --git a/.yarn/install-state.gz b/.yarn/install-state.gz index 0d81ba8..369440b 100644 Binary files a/.yarn/install-state.gz and b/.yarn/install-state.gz differ diff --git a/packages/obsidian-testing-framework/src/index.ts b/packages/obsidian-testing-framework/src/index.ts index 2e1a724..9e5e156 100644 --- a/packages/obsidian-testing-framework/src/index.ts +++ b/packages/obsidian-testing-framework/src/index.ts @@ -40,7 +40,7 @@ const obsidianTestFixtures: Fixtures< const page = await electronApp.firstWindow(); await run(page); }, - { auto: true }, + {} ], app: [async ({ page }, run) => { const app: App = await page.evaluate("window.app"); diff --git a/packages/obsidian-testing-framework/tsconfig.json b/packages/obsidian-testing-framework/tsconfig.json index d04bc36..49e9d3d 100644 --- a/packages/obsidian-testing-framework/tsconfig.json +++ b/packages/obsidian-testing-framework/tsconfig.json @@ -1,14 +1,14 @@ { "compilerOptions": { - "target": "ES6", + "target": "ESNext", "module": "ESNext", - "moduleResolution": "node", + "moduleResolution": "bundler", "lib": [ "es2015", "DOM", - "ES2018" + "ESNext.Disposable" ], - "outDir": "packages/obsidian-testing-framework/lib", + "outDir": "lib", "baseUrl": ".", "strict": true, "alwaysStrict": true, diff --git a/packages/test-project/e2e/example.spec.ts b/packages/test-project/e2e/example.spec.ts index 4371b79..9576377 100644 --- a/packages/test-project/e2e/example.spec.ts +++ b/packages/test-project/e2e/example.spec.ts @@ -1,5 +1,5 @@ import { expect } from '@playwright/test'; -import {test} from "../../lib.not" +import {test} from "obsidian-testing-framework" test('something', async ({ page }) => { expect(page).toHaveURL(/obsidian\.md/i); }); diff --git a/packages/test-project/package.json b/packages/test-project/package.json index e4dd55a..1f62e21 100644 --- a/packages/test-project/package.json +++ b/packages/test-project/package.json @@ -1,30 +1,32 @@ { - "name": "obsidian-sample-plugin", - "version": "1.0.0", - "private": true, - "description": "This is a sample plugin for Obsidian (https://obsidian.md)", - "main": "main.js", - "scripts": { - "dev": "node esbuild.config.mjs", - "build": "tsc -noEmit -skipLibCheck && node esbuild.config.mjs production", - "version": "node version-bump.mjs && git add manifest.json versions.json" - }, - "keywords": [], - "author": "", - "license": "MIT", - "dependencies": { - "obsidian-testing-framework": "workspace:*" - }, - "devDependencies": { - "@playwright/test": "^1.48.1", - "@types/node": "^16.11.6", - "@typescript-eslint/eslint-plugin": "5.29.0", - "@typescript-eslint/parser": "5.29.0", - "builtin-modules": "3.3.0", - "esbuild": "0.17.3", - "obsidian": "latest", - "tslib": "2.4.0", - "typescript": "4.7.4" - }, - "type": "module" + "name": "obsidian-sample-plugin", + "version": "1.0.0", + "private": true, + "description": "This is a sample plugin for Obsidian (https://obsidian.md)", + "main": "main.js", + "scripts": { + "dev": "node esbuild.config.mjs", + "build": "tsc -noEmit -skipLibCheck && node esbuild.config.mjs production", + "version": "node version-bump.mjs && git add manifest.json versions.json" + }, + "keywords": [], + "author": "", + "license": "MIT", + "dependencies": { + "obsidian-testing-framework": "workspace:^" + }, + "devDependencies": { + "@playwright/test": "^1.48.1", + "@types/node": "^16.11.6", + "@typescript-eslint/eslint-plugin": "5.29.0", + "@typescript-eslint/parser": "5.29.0", + "builtin-modules": "3.3.0", + "esbuild": "0.17.3", + "obsidian": "latest", + "playwright": "^1.48.1", + "tslib": "2.4.0", + "typescript": "4.7.4", + "vitest": "^2.1.3" + }, + "type": "module" } diff --git a/packages/test-project/playwright.config.ts b/packages/test-project/playwright.config.ts index 4666aef..e2dfa45 100644 --- a/packages/test-project/playwright.config.ts +++ b/packages/test-project/playwright.config.ts @@ -13,7 +13,7 @@ import {ObsidianTestFixtures} from "obsidian-testing-framework/fixture"; * See https://playwright.dev/docs/test-configuration. */ export default defineConfig({ - testDir: './tests', + testDir: './e2e', /* Run tests in files in parallel */ fullyParallel: true, diff --git a/yarn.lock b/yarn.lock index ee15e30..6b93e6d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1830,9 +1830,11 @@ __metadata: builtin-modules: "npm:3.3.0" esbuild: "npm:0.17.3" obsidian: "npm:latest" - obsidian-testing-framework: "workspace:*" + obsidian-testing-framework: "workspace:^" + playwright: "npm:^1.48.1" tslib: "npm:2.4.0" typescript: "npm:4.7.4" + vitest: "npm:^2.1.3" languageName: unknown linkType: soft @@ -1842,7 +1844,7 @@ __metadata: languageName: unknown linkType: soft -"obsidian-testing-framework@workspace:*, obsidian-testing-framework@workspace:packages/obsidian-testing-framework": +"obsidian-testing-framework@workspace:^, obsidian-testing-framework@workspace:packages/obsidian-testing-framework": version: 0.0.0-use.local resolution: "obsidian-testing-framework@workspace:packages/obsidian-testing-framework" dependencies: