@cosmicdrift/kumiko-testing 0.304.0 → 0.305.0
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 -0
- package/package.json +4 -4
- package/src/changes.json +6 -0
- package/src/e2e/constants.ts +5 -0
- package/src/e2e/define-app-e2e-config.ts +6 -1
package/README.md
CHANGED
|
@@ -44,6 +44,9 @@ test("member sees the note", async ({ seedTenant, page }) => {
|
|
|
44
44
|
workers (`KUMIKO_E2E_WORKERS` overrides) are fixed by the template; projects cannot set them.
|
|
45
45
|
- The seed routes answer only with `KUMIKO_TEST_SEED=1`, outside `NODE_ENV=production`, and with the
|
|
46
46
|
per-run `KUMIKO_TEST_SEED_TOKEN` in the `x-kumiko-test-seed` header. `defineAppE2eConfig` sets all three.
|
|
47
|
+
- The template also sets `KUMIKO_DEV_STYLESHEET_WATCH=0`, so the dev-server builds the app's CSS once and
|
|
48
|
+
never starts a Tailwind `--watch` process — that watcher would otherwise treat every Playwright artifact
|
|
49
|
+
write under `test-results/` as a rebuild trigger.
|
|
47
50
|
- App roles: `createE2eSeedRoutes({ extraRoles: ["TenantMember"] })` lets `tenant.addUser(["TenantMember"])` seed them;
|
|
48
51
|
`SystemAdmin` is never seedable and makes the route builder throw.
|
|
49
52
|
- A `SeedPart` receives `{ tenant }` and works against the in-process `seedTenant` and the HTTP tenant alike.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cosmicdrift/kumiko-testing",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.305.0",
|
|
4
4
|
"description": "Test template for Kumiko apps: per-flow seedTenant, app test stack, canonical test preloads, bunfig generator and integration runner.",
|
|
5
5
|
"license": "BUSL-1.1",
|
|
6
6
|
"author": "Marc Frost <marc@cosmicdriftgamestudio.com>",
|
|
@@ -63,9 +63,9 @@
|
|
|
63
63
|
"kumiko-testing": "./bin/kumiko-testing.ts"
|
|
64
64
|
},
|
|
65
65
|
"dependencies": {
|
|
66
|
-
"@cosmicdrift/kumiko-bundled-features": "0.
|
|
67
|
-
"@cosmicdrift/kumiko-dev-server": "0.
|
|
68
|
-
"@cosmicdrift/kumiko-framework": "0.
|
|
66
|
+
"@cosmicdrift/kumiko-bundled-features": "0.305.0",
|
|
67
|
+
"@cosmicdrift/kumiko-dev-server": "0.305.0",
|
|
68
|
+
"@cosmicdrift/kumiko-framework": "0.305.0",
|
|
69
69
|
"zod": "^4.4.3"
|
|
70
70
|
},
|
|
71
71
|
"peerDependencies": {
|
package/src/changes.json
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"version": "0.305.0",
|
|
4
|
+
"type": "fix",
|
|
5
|
+
"title": "defineAppE2eConfig starts the E2E web server without a Tailwind --watch process, so Playwright artifact writes no longer trigger hundreds of CSS rebuilds",
|
|
6
|
+
"detail": "`defineAppE2eConfig` sets `KUMIKO_DEV_STYLESHEET_WATCH=0`, so the dev-server it boots builds CSS once and stops instead of keeping a Tailwind `--watch` process alive. Tailwind v4's watcher subscribes to the whole app cwd recursively with no gitignore filter, so every Playwright artifact write under `test-results/` previously counted as a rebuild trigger."
|
|
7
|
+
},
|
|
2
8
|
{
|
|
3
9
|
"version": "0.304.0",
|
|
4
10
|
"type": "improvement",
|
package/src/e2e/constants.ts
CHANGED
|
@@ -18,6 +18,11 @@ export const E2E_WORKERS_ENV = "KUMIKO_E2E_WORKERS";
|
|
|
18
18
|
// Same literal as the framework's requireRealProviders(), which does not export it.
|
|
19
19
|
export const REAL_PROVIDERS_ENV = "KUMIKO_REAL_PROVIDERS";
|
|
20
20
|
|
|
21
|
+
// Same literal as kumiko-dev-server's createKumikoServer (STYLESHEET_WATCH_ENV),
|
|
22
|
+
// duplicated because the Playwright config runs under Node and can't import
|
|
23
|
+
// that Bun-toolchain-adjacent module.
|
|
24
|
+
export const STYLESHEET_WATCH_ENV = "KUMIKO_DEV_STYLESHEET_WATCH";
|
|
25
|
+
|
|
21
26
|
export const SEED_ROUTE_PREFIX = "/__test";
|
|
22
27
|
|
|
23
28
|
export const SEED_ROUTES = {
|
|
@@ -14,6 +14,7 @@ import {
|
|
|
14
14
|
REAL_PROVIDERS_ENV,
|
|
15
15
|
SEED_ENABLE_ENV,
|
|
16
16
|
SEED_TOKEN_ENV,
|
|
17
|
+
STYLESHEET_WATCH_ENV,
|
|
17
18
|
} from "./constants";
|
|
18
19
|
import { screenshotSpecsIgnore } from "./screenshot-dir";
|
|
19
20
|
import { E2E_TIMEOUT_MS } from "./timeouts";
|
|
@@ -27,7 +28,7 @@ const TEMPLATE_OWNED_PROJECT_KEYS = [
|
|
|
27
28
|
] as const;
|
|
28
29
|
const TEMPLATE_OWNED_USE_KEYS = ["actionTimeout", "navigationTimeout"] as const;
|
|
29
30
|
const REAL_SPEC_GLOB = "**/*.real.spec.ts";
|
|
30
|
-
const RESERVED_ENV_KEYS = ["PORT", SEED_ENABLE_ENV, SEED_TOKEN_ENV] as const;
|
|
31
|
+
const RESERVED_ENV_KEYS = ["PORT", SEED_ENABLE_ENV, SEED_TOKEN_ENV, STYLESHEET_WATCH_ENV] as const;
|
|
31
32
|
|
|
32
33
|
type ProjectUse = Partial<PlaywrightTestOptions & PlaywrightWorkerOptions>;
|
|
33
34
|
|
|
@@ -142,6 +143,10 @@ export function defineAppE2eConfig(input: AppE2eConfigInput): PlaywrightTestConf
|
|
|
142
143
|
PORT: String(port),
|
|
143
144
|
[SEED_ENABLE_ENV]: "1",
|
|
144
145
|
[SEED_TOKEN_ENV]: seedTokenForRun(),
|
|
146
|
+
// A Tailwind --watch process subscribes to the whole app cwd
|
|
147
|
+
// recursively (Tailwind v4, no gitignore filter); every Playwright
|
|
148
|
+
// artifact write under test-results/ would then count as a rebuild.
|
|
149
|
+
[STYLESHEET_WATCH_ENV]: "0",
|
|
145
150
|
},
|
|
146
151
|
reuseExistingServer: false,
|
|
147
152
|
timeout: E2E_TIMEOUT_MS.webServer,
|