From 0f7f928ef1dbefd2a0a0eb65c45a7e26f217bbde Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 26 Oct 2026 16:13:25 +0000 Subject: [PATCH] test(app-shell): warm @objectstack/lint at module scope in the DraftChangesPanel security-link suite The "inside Studio" case failed when its file ran alone: the panel's security block renders only after securityPostureLint's dynamic import('@objectstack/lint') resolves, and that first transform was paid inside findByTestId's 1000 ms window (the block arrived at ~1 s). The sibling securityProblems suite already warms the same specifier at module scope; this file now does too. Assertion and timeout unchanged. Claude-Session: https://claude.ai/code/session_014sjSLK4TBwwZM9jfTM2nEN Co-authored-by: Claude --- .../__tests__/DraftChangesPanel.securityLink.test.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ui/packages/app-shell/src/preview/__tests__/DraftChangesPanel.securityLink.test.tsx b/ui/packages/app-shell/src/preview/__tests__/DraftChangesPanel.securityLink.test.tsx index 768d38b8c82..bccbf78d8c2 100644 --- a/ui/packages/app-shell/src/preview/__tests__/DraftChangesPanel.securityLink.test.tsx +++ b/ui/packages/app-shell/src/preview/__tests__/DraftChangesPanel.securityLink.test.tsx @@ -40,6 +40,12 @@ vi.mock('@object-ui/i18n', async (importOriginal) => { import { DraftChangesPanel } from '../DraftChangesPanel'; import { SurfaceDeepLinkProvider } from '../../views/studio-design/surfaceDeepLinkChannel'; +// Warm the lint package at module scope, as the sibling security suite does: +// `securityPostureLint` loads it with a function-body `import('@objectstack/lint')`, +// and run alone, that first transform lands inside the first case's 1000 ms +// `findBy` window (the block arrived at ~1 s). Same specifier, so the +// component's own dynamic import resolves from the cache. +import '@objectstack/lint'; afterEach(() => { cleanup();