diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml index 6744a84..3321a9c 100644 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/playwright.yml @@ -28,7 +28,7 @@ jobs: - name: compile and test! run: | export XDG_CONFIG_HOME=$HOME/.config - yarn workspace obsidian-testing-framework run tsc + yarn workspace obsidian-testing-library run tsc yarn workspace obsidian-sample-plugin run test - uses: actions/upload-artifact@v4 if: ${{ !cancelled() }} diff --git a/.yarn/install-state.gz b/.yarn/install-state.gz index 8e38623..edc8e0a 100644 Binary files a/.yarn/install-state.gz and b/.yarn/install-state.gz differ diff --git a/package.json b/package.json index dd020ad..eaa37ad 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "obsidian-testing-framework-parent", + "name": "obsidian-testing-library-parent", "private": true, "packageManager": "yarn@4.5.1", "workspaces": [ diff --git a/packages/obsidian-testing-framework/.npmignore b/packages/obsidian-testing-framework/.npmignore new file mode 100644 index 0000000..38e918b --- /dev/null +++ b/packages/obsidian-testing-framework/.npmignore @@ -0,0 +1,3 @@ +tsconfig.json +src/**/* +typings/**/* diff --git a/packages/obsidian-testing-framework/package.json b/packages/obsidian-testing-framework/package.json index a51ca7e..0527850 100644 --- a/packages/obsidian-testing-framework/package.json +++ b/packages/obsidian-testing-framework/package.json @@ -1,5 +1,5 @@ { - "name": "obsidian-testing-framework", + "name": "obsidian-testing-library", "packageManager": "yarn@4.5.1", "dependencies": { "@codemirror/language": "https://github.com/lishid/cm-language", diff --git a/packages/test-project/e2e/example.spec.ts b/packages/test-project/e2e/example.spec.ts index 25890d8..53733e0 100644 --- a/packages/test-project/e2e/example.spec.ts +++ b/packages/test-project/e2e/example.spec.ts @@ -1,7 +1,7 @@ import { expect } from '@playwright/test'; -import {test} from "obsidian-testing-framework" +import {test} from "obsidian-testing-library" import {TFile} from "obsidian"; -import {assertLineEquals, doWithApp, readFile} from "obsidian-testing-framework/utils"; +import {assertLineEquals, doWithApp, readFile} from "obsidian-testing-library/utils"; test('something', async ({ page }) => { console.log(page.url()); expect(/obsidian\.md/i.test(page.url())).toBeTruthy() diff --git a/packages/test-project/package.json b/packages/test-project/package.json index 4bf5bf6..eca4df6 100644 --- a/packages/test-project/package.json +++ b/packages/test-project/package.json @@ -14,7 +14,7 @@ "author": "", "license": "MIT", "dependencies": { - "obsidian-testing-framework": "workspace:^" + "obsidian-testing-library": "workspace:^" }, "devDependencies": { "@playwright/test": "^1.48.1", diff --git a/packages/test-project/playwright.config.ts b/packages/test-project/playwright.config.ts index 0c223fa..d8be950 100644 --- a/packages/test-project/playwright.config.ts +++ b/packages/test-project/playwright.config.ts @@ -1,5 +1,5 @@ import { defineConfig, devices } from '@playwright/test'; -import {ObsidianTestFixtures} from "obsidian-testing-framework/fixture"; +import {ObsidianTestFixtures} from "obsidian-testing-library/fixture"; import os from "os" import path from 'path'; diff --git a/yarn.lock b/yarn.lock index 0e73173..48d7852 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1833,6 +1833,22 @@ __metadata: languageName: node linkType: hard +"glob@npm:^11.0.0": + version: 11.0.0 + resolution: "glob@npm:11.0.0" + dependencies: + foreground-child: "npm:^3.1.0" + jackspeak: "npm:^4.0.1" + minimatch: "npm:^10.0.0" + minipass: "npm:^7.1.2" + package-json-from-dist: "npm:^1.0.0" + path-scurry: "npm:^2.0.0" + bin: + glob: dist/esm/bin.mjs + checksum: 10c0/419866015d8795258a8ac51de5b9d1a99c72634fc3ead93338e4da388e89773ab21681e494eac0fbc4250b003451ca3110bb4f1c9393d15d14466270094fdb4e + languageName: node + linkType: hard + "glob@npm:^7.1.6": version: 7.2.3 resolution: "glob@npm:7.2.3" @@ -2110,6 +2126,15 @@ __metadata: languageName: node linkType: hard +"jackspeak@npm:^4.0.1": + version: 4.0.2 + resolution: "jackspeak@npm:4.0.2" + dependencies: + "@isaacs/cliui": "npm:^8.0.2" + checksum: 10c0/b26039d11c0163a95b1e58851b9ac453cce64ad6d1eb98a00b303ad5eeb761b29d33c9419d1e16c016d3f7151c8edf7df223e6cf93a1907655fd95d6ce85c0de + languageName: node + linkType: hard + "jsbn@npm:1.1.0": version: 1.1.0 resolution: "jsbn@npm:1.1.0" @@ -2173,6 +2198,13 @@ __metadata: languageName: node linkType: hard +"lru-cache@npm:^11.0.0": + version: 11.0.1 + resolution: "lru-cache@npm:11.0.1" + checksum: 10c0/8bad6603dc67eb5b03520fba05bce5df6473dbba58ac4c6067ed088d29225a0a04416bb1462acd8c1f819d1fbf37920446a1c36bafd9c384bcc54cee0d3b697a + languageName: node + linkType: hard + "magic-string@npm:^0.30.11": version: 0.30.12 resolution: "magic-string@npm:0.30.12" @@ -2242,6 +2274,15 @@ __metadata: languageName: node linkType: hard +"minimatch@npm:^10.0.0": + version: 10.0.1 + resolution: "minimatch@npm:10.0.1" + dependencies: + brace-expansion: "npm:^2.0.1" + checksum: 10c0/e6c29a81fe83e1877ad51348306be2e8aeca18c88fdee7a99df44322314279e15799e41d7cb274e4e8bb0b451a3bc622d6182e157dfa1717d6cda75e9cd8cd5d + languageName: node + linkType: hard + "minimatch@npm:^3.0.4, minimatch@npm:^3.1.1": version: 3.1.2 resolution: "minimatch@npm:3.1.2" @@ -2446,7 +2487,7 @@ __metadata: builtin-modules: "npm:3.3.0" esbuild: "npm:0.17.3" obsidian: "npm:latest" - obsidian-testing-framework: "workspace:^" + obsidian-testing-library: "workspace:^" playwright: "npm:^1.48.1" tslib: "npm:2.4.0" typescript: "npm:4.7.4" @@ -2455,15 +2496,15 @@ __metadata: languageName: unknown linkType: soft -"obsidian-testing-framework-parent@workspace:.": +"obsidian-testing-library-parent@workspace:.": version: 0.0.0-use.local - resolution: "obsidian-testing-framework-parent@workspace:." + resolution: "obsidian-testing-library-parent@workspace:." languageName: unknown linkType: soft -"obsidian-testing-framework@workspace:^, obsidian-testing-framework@workspace:packages/obsidian-testing-framework": +"obsidian-testing-library@workspace:^, obsidian-testing-library@workspace:packages/obsidian-testing-framework": version: 0.0.0-use.local - resolution: "obsidian-testing-framework@workspace:packages/obsidian-testing-framework" + resolution: "obsidian-testing-library@workspace:packages/obsidian-testing-framework" dependencies: "@codemirror/language": "https://github.com/lishid/cm-language" "@codemirror/state": "npm:^6.0.1" @@ -2474,6 +2515,7 @@ __metadata: electron: "npm:^33.0.2" obsidian: "npm:latest" playwright: "npm:^1.48.1" + rimraf: "npm:^6.0.1" tmp: "npm:^0.2.3" typescript: "npm:^5.6.3" vitest: "npm:^2.1.3" @@ -2550,6 +2592,16 @@ __metadata: languageName: node linkType: hard +"path-scurry@npm:^2.0.0": + version: 2.0.0 + resolution: "path-scurry@npm:2.0.0" + dependencies: + lru-cache: "npm:^11.0.0" + minipass: "npm:^7.1.2" + checksum: 10c0/3da4adedaa8e7ef8d6dc4f35a0ff8f05a9b4d8365f2b28047752b62d4c1ad73eec21e37b1579ef2d075920157856a3b52ae8309c480a6f1a8bbe06ff8e52b33c + languageName: node + linkType: hard + "path-type@npm:^4.0.0": version: 4.0.0 resolution: "path-type@npm:4.0.0" @@ -2712,6 +2764,18 @@ __metadata: languageName: node linkType: hard +"rimraf@npm:^6.0.1": + version: 6.0.1 + resolution: "rimraf@npm:6.0.1" + dependencies: + glob: "npm:^11.0.0" + package-json-from-dist: "npm:^1.0.0" + bin: + rimraf: dist/esm/bin.mjs + checksum: 10c0/b30b6b072771f0d1e73b4ca5f37bb2944ee09375be9db5f558fcd3310000d29dfcfa93cf7734d75295ad5a7486dc8e40f63089ced1722a664539ffc0c3ece8c6 + languageName: node + linkType: hard + "roarr@npm:^2.15.3": version: 2.15.4 resolution: "roarr@npm:2.15.4"