@owlmeans/test-ui 0.1.15 → 0.1.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -4
- package/agent-meta/manifest.json +4 -11
- package/package.json +8 -8
- package/agent-meta/instructions/testing-ui.instructions.md +0 -21
- package/build/config.d.ts +0 -15
- package/build/config.d.ts.map +0 -1
- package/build/config.js +0 -30
- package/build/config.js.map +0 -1
package/README.md
CHANGED
|
@@ -53,10 +53,9 @@ This downloads the Chromium binary used by the `playwright` library. CI installs
|
|
|
53
53
|
<!-- owlmeans:agent-guidance:start -->
|
|
54
54
|
## Agent guidance
|
|
55
55
|
|
|
56
|
-
This package ships embedded
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
(`.claude/skills/` and `.github/instructions/`):
|
|
56
|
+
This package ships embedded agent skills under `agent-meta/`. After installing your
|
|
57
|
+
`@owlmeans/*` packages, run the OwlMeans agent-skills installer to place them into
|
|
58
|
+
your project's skill store (`.agents/skills/`):
|
|
60
59
|
|
|
61
60
|
```sh
|
|
62
61
|
npx @owlmeans/agent-skills
|
package/agent-meta/manifest.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
|
-
"schemaVersion":
|
|
2
|
+
"schemaVersion": 2,
|
|
3
3
|
"package": "@owlmeans/test-ui",
|
|
4
|
-
"version": "0.1.
|
|
5
|
-
"generatedAt": "2026-08-
|
|
4
|
+
"version": "0.1.16",
|
|
5
|
+
"generatedAt": "2026-08-14T10:14:48.847Z",
|
|
6
6
|
"canonicalRepo": "https://github.com/owlmeans/common",
|
|
7
7
|
"entries": [
|
|
8
8
|
{
|
|
@@ -10,14 +10,7 @@
|
|
|
10
10
|
"name": "testing-ui",
|
|
11
11
|
"category": "package-specific",
|
|
12
12
|
"file": "skills/testing-ui/SKILL.md",
|
|
13
|
-
"canonicalPath": ".
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
"kind": "instruction",
|
|
17
|
-
"name": "testing-ui",
|
|
18
|
-
"category": "package-specific",
|
|
19
|
-
"file": "instructions/testing-ui.instructions.md",
|
|
20
|
-
"canonicalPath": ".github/instructions/testing-ui.instructions.md"
|
|
13
|
+
"canonicalPath": ".agents/skills/testing-ui/SKILL.md"
|
|
21
14
|
}
|
|
22
15
|
]
|
|
23
16
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@owlmeans/test-ui",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.16",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -22,12 +22,12 @@
|
|
|
22
22
|
"./harness": "./harness/index.html"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@owlmeans/auth": "^0.1.
|
|
26
|
-
"@owlmeans/basic-envelope": "^0.1.
|
|
27
|
-
"@owlmeans/basic-ids": "^0.1.
|
|
28
|
-
"@owlmeans/basic-keys": "^0.1.
|
|
29
|
-
"@owlmeans/test": "^0.1.
|
|
30
|
-
"@owlmeans/test-auth": "^0.1.
|
|
25
|
+
"@owlmeans/auth": "^0.1.16",
|
|
26
|
+
"@owlmeans/basic-envelope": "^0.1.16",
|
|
27
|
+
"@owlmeans/basic-ids": "^0.1.16",
|
|
28
|
+
"@owlmeans/basic-keys": "^0.1.16",
|
|
29
|
+
"@owlmeans/test": "^0.1.16",
|
|
30
|
+
"@owlmeans/test-auth": "^0.1.16",
|
|
31
31
|
"playwright": "^1.49.0"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
}
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@owlmeans/dep-config": "^0.1.
|
|
46
|
+
"@owlmeans/dep-config": "^0.1.16",
|
|
47
47
|
"@types/bun": "^1.3.14",
|
|
48
48
|
"@types/react": "^19.2.17",
|
|
49
49
|
"nodemon": "^3.1.14",
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
applyTo: "**/*.test.ts, **/*.spec.ts, **/*.ts"
|
|
3
|
-
---
|
|
4
|
-
<!-- AUTO-GENERATED — do not edit. Regenerate via sync-agent-meta. -->
|
|
5
|
-
|
|
6
|
-
# Category D — Component Acceptance Tests (bun test + Playwright as a library)
|
|
7
|
-
|
|
8
|
-
- Tests in `<your-package>/tests/*.spec.ts`. Use `bun:test` (`describe`, `test`, `expect`) — same as categories A/B/C.
|
|
9
|
-
- Playwright is consumed as a **library**: `import { launchBrowser, closeBrowser, mountComponent } from '@owlmeans/test-ui'`. Never `import` from `@playwright/test`.
|
|
10
|
-
- Mount one component at a time via `mountComponent({ url, component?, props? })`. Tests are component-level acceptance — not end-to-end.
|
|
11
|
-
- Always `await close()` the returned context and call `closeBrowser()` from `afterAll` — leaked contexts hang `bun test`.
|
|
12
|
-
- Use `bun:test`'s `expect` against awaited Playwright DOM queries: `expect(await page.locator('h1').textContent()).toBe('Sign in')`.
|
|
13
|
-
- Per-package harness (`tests/harness/index.html` + `mount.tsx`) is served by a Vite dev server booted once in `tests/context.ts`. For smoke-only specs a `data:text/html,...` URL is fine.
|
|
14
|
-
- **shadcn + Tailwind packages**: add `@tailwindcss/vite` plugin and `resolve.alias: { '@': resolve(here, '../src/@') }` to the Vite config so mounted components resolve primitives; import `src/@/globals.css` in `mount.tsx`. Assert via `getByRole`/text as usual; check computed styles via `page.evaluate` for visual assertions.
|
|
15
|
-
- One-time per machine: `bunx playwright install chromium`.
|
|
16
|
-
- No mocks. Render the real component with real client-context wiring. For network calls use `page.route(...)` to a static fixture — never a live backend.
|
|
17
|
-
- Cover `.github/instructions/<pkg>.instructions.md` and `README.md` cases first.
|
|
18
|
-
- Max 3-4 tests per component: render, primary interaction, one edge case.
|
|
19
|
-
- Per-package `package.json` script: `"test": "bun test ./tests"` — same line as categories A/B/C.
|
|
20
|
-
|
|
21
|
-
See `.claude/skills/testing-ui/SKILL.md` for the full pattern.
|
package/build/config.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { PlaywrightTestConfig } from '@playwright/test';
|
|
2
|
-
/**
|
|
3
|
-
* Wrap `defineConfig` from `@playwright/test` with OwlMeans-wide defaults
|
|
4
|
-
* for category-D acceptance tests:
|
|
5
|
-
*
|
|
6
|
-
* - `testDir: './tests'`
|
|
7
|
-
* - chromium-only (override `projects` to add WebKit/Firefox)
|
|
8
|
-
* - retries `0` locally, `1` in CI
|
|
9
|
-
* - 10s navigation timeout
|
|
10
|
-
*
|
|
11
|
-
* Pass overrides such as `webServer`, `baseURL`, or additional `projects`
|
|
12
|
-
* directly through. Anything you set wins over the defaults.
|
|
13
|
-
*/
|
|
14
|
-
export declare const defineUiConfig: (overrides?: PlaywrightTestConfig) => PlaywrightTestConfig;
|
|
15
|
-
//# sourceMappingURL=config.d.ts.map
|
package/build/config.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAA;AAI5D;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,cAAc,GAAI,YAAW,oBAAyB,KAAG,oBAelE,CAAA"}
|
package/build/config.js
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { defineConfig, devices } from '@playwright/test';
|
|
2
|
-
const isCi = process.env.CI === 'true' || process.env.CI === '1';
|
|
3
|
-
/**
|
|
4
|
-
* Wrap `defineConfig` from `@playwright/test` with OwlMeans-wide defaults
|
|
5
|
-
* for category-D acceptance tests:
|
|
6
|
-
*
|
|
7
|
-
* - `testDir: './tests'`
|
|
8
|
-
* - chromium-only (override `projects` to add WebKit/Firefox)
|
|
9
|
-
* - retries `0` locally, `1` in CI
|
|
10
|
-
* - 10s navigation timeout
|
|
11
|
-
*
|
|
12
|
-
* Pass overrides such as `webServer`, `baseURL`, or additional `projects`
|
|
13
|
-
* directly through. Anything you set wins over the defaults.
|
|
14
|
-
*/
|
|
15
|
-
export const defineUiConfig = (overrides = {}) => defineConfig({
|
|
16
|
-
testDir: './tests',
|
|
17
|
-
fullyParallel: true,
|
|
18
|
-
forbidOnly: isCi,
|
|
19
|
-
retries: isCi ? 1 : 0,
|
|
20
|
-
reporter: isCi ? [['github'], ['list']] : 'list',
|
|
21
|
-
use: {
|
|
22
|
-
trace: 'on-first-retry',
|
|
23
|
-
...overrides.use,
|
|
24
|
-
},
|
|
25
|
-
projects: overrides.projects ?? [
|
|
26
|
-
{ name: 'chromium', use: { ...devices['Desktop Chrome'] } },
|
|
27
|
-
],
|
|
28
|
-
...overrides,
|
|
29
|
-
});
|
|
30
|
-
//# sourceMappingURL=config.js.map
|
package/build/config.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAGxD,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,EAAE,KAAK,MAAM,IAAI,OAAO,CAAC,GAAG,CAAC,EAAE,KAAK,GAAG,CAAA;AAEhE;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,YAAkC,EAAE,EAAwB,EAAE,CAC3F,YAAY,CAAC;IACX,OAAO,EAAE,SAAS;IAClB,aAAa,EAAE,IAAI;IACnB,UAAU,EAAE,IAAI;IAChB,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACrB,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM;IAChD,GAAG,EAAE;QACH,KAAK,EAAE,gBAAgB;QACvB,GAAG,SAAS,CAAC,GAAG;KACjB;IACD,QAAQ,EAAE,SAAS,CAAC,QAAQ,IAAI;QAC9B,EAAE,IAAI,EAAE,UAAU,EAAE,GAAG,EAAE,EAAE,GAAG,OAAO,CAAC,gBAAgB,CAAC,EAAE,EAAE;KAC5D;IACD,GAAG,SAAS;CACb,CAAC,CAAA"}
|