Skip to content

Commit 19f0174

Browse files
committed
test(dogfood): name the Console bundle entry the render pin reads, and hold its glob by that test
Claude-Session: https://claude.ai/code/session_01W2XFCTBfK4LabgqovmvSgK Co-authored-by: Claude <noreply@anthropic.com>
1 parent 834de83 commit 19f0174

2 files changed

Lines changed: 12 additions & 3 deletions

File tree

‎packages/qa/dogfood/test/print-service-render.dogfood.test.ts‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ import { spawn, type ChildProcess } from 'node:child_process';
3131
import { accessSync, constants, existsSync, mkdtempSync, rmSync } from 'node:fs';
3232
import { createServer, type Server } from 'node:http';
3333
import { tmpdir } from 'node:os';
34-
import { join } from 'node:path';
34+
import { dirname, join } from 'node:path';
3535
import { fileURLToPath } from 'node:url';
3636
import type { VerifyStack } from '@objectstack/verify';
3737
import { StorageServicePlugin } from '@objectstack/service-storage';
@@ -45,7 +45,9 @@ import type { IPrintService } from '../../../services/service-print/src/print-se
4545
const SYS = { isSystem: true } as const;
4646
const PAGE = 'showcase_invoice_document';
4747
const APP = 'com.example.showcase';
48-
const CONSOLE_DIST = fileURLToPath(new URL('../../../console/dist', import.meta.url));
48+
/** The Console bundle's entry: its presence is what this file runs on. */
49+
const CONSOLE_INDEX = fileURLToPath(new URL('../../../console/dist/index.html', import.meta.url));
50+
const CONSOLE_DIST = dirname(CONSOLE_INDEX);
4951

5052
function chromiumUnderTest(): string | undefined {
5153
const candidates = [
@@ -65,7 +67,7 @@ function chromiumUnderTest(): string | undefined {
6567
}
6668

6769
const CHROMIUM = chromiumUnderTest();
68-
const CONSOLE_BUILT = existsSync(join(CONSOLE_DIST, 'index.html'));
70+
const CONSOLE_BUILT = existsSync(CONSOLE_INDEX);
6971
if (!CHROMIUM || !CONSOLE_BUILT) {
7072
console.warn(
7173
`[dogfood] print-service-render.dogfood.test.ts SKIPPED: ${!CONSOLE_BUILT ? 'no built Console (packages/console/dist; pnpm objectui:build)' : ''}` +

‎scripts/cross-package-test-inputs.mjs‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1209,6 +1209,13 @@ export const CROSS_PACKAGE_TEST_INPUTS = {
12091209
// change that reopens the #9084 blind spot, so it must re-run this test.
12101210
'content/docs/protocol/kernel/realtime-protocol.mdx',
12111211
],
1212+
heldBy: {
1213+
// The render pin runs only where the Console bundle is built, and reads it
1214+
// by its entry file. Where no bundle is built (this suite's CI job) the
1215+
// path names nothing on disk, so the roster cannot hold the glob; this
1216+
// test is what holds it.
1217+
'packages/console/dist/index.html': ['packages/qa/dogfood/test/print-service-render.dogfood.test.ts'],
1218+
},
12121219
},
12131220
'@objectstack/vitest-filter-preflight': {
12141221
// test/config-wiring-sweep.test.ts is the anti-phantom sweep for the ONE

0 commit comments

Comments
 (0)