Skip to content

Commit bcde26a

Browse files
committed
test(studio): the surface pins pay the palette's detail entry at collection (#36905)
Since #37108 the surface mounts the command palette, whose record preview reaches a dynamic `import('@object-ui/plugin-detail')`. The fifteen surface tests this PR edits now pay that load at module top, as #37108's own pins do (`check:test-source-alias`). Claude-Session: https://claude.ai/code/session_01QSeKYocL4fDtJqdSgFrR6h Co-authored-by: Claude <noreply@anthropic.com>
1 parent 80bd343 commit bcde26a

15 files changed

Lines changed: 45 additions & 0 deletions

‎ui/packages/app-shell/src/views/studio-design/StudioDesignSurface.accessPairCopy-29674.test.tsx‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@
3434
import '@testing-library/jest-dom/vitest';
3535
// The source under test reaches these through dynamic imports: their first load is paid at collection.
3636
import '@objectstack/lint';
37+
// objectstack#36900 — the surface mounts the command palette, which reaches the
38+
// record preview's `lazy()` detail entry: its first load is paid at collection too.
39+
import '@object-ui/plugin-detail';
3740
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
3841
import { cleanup, fireEvent, render, screen, waitFor, within } from '@testing-library/react';
3942
import { MemoryRouter, Route, Routes } from 'react-router-dom';

‎ui/packages/app-shell/src/views/studio-design/StudioDesignSurface.accessSegment-12452.test.tsx‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,9 @@ import { translateMetadataDomain } from '../metadata-admin/i18n';
132132
// The source under test reaches dynamic imports of `@objectstack/lint`; their first
133133
// load is paid here, at collection, never inside a case's clock (`check:test-source-alias`).
134134
import '@objectstack/lint';
135+
// objectstack#36900 — the surface mounts the command palette, which reaches the
136+
// record preview's `lazy()` detail entry: its first load is paid at collection too.
137+
import '@object-ui/plugin-detail';
135138

136139
window.matchMedia = ((query: string) => ({
137140
matches: false,

‎ui/packages/app-shell/src/views/studio-design/StudioDesignSurface.aiChipLabel.test.tsx‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,9 @@ vi.mock('../metadata-admin/AccessExplainPanel', () => ({ AccessExplainPanel: ()
110110
// The source loads `@objectstack/lint` lazily; paid here, at collection, not
111111
// inside a case's clock (check:test-source-alias).
112112
import '@objectstack/lint';
113+
// objectstack#36900 — the surface mounts the command palette, which reaches the
114+
// record preview's `lazy()` detail entry: its first load is paid at collection too.
115+
import '@object-ui/plugin-detail';
113116
import { StudioDesignSurface } from './StudioDesignSurface';
114117

115118
window.matchMedia = ((query: string) => ({

‎ui/packages/app-shell/src/views/studio-design/StudioDesignSurface.backToApp-36501.test.tsx‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ import { MemoryRouter, Route, Routes, useLocation } from 'react-router-dom';
3131
// The surface's reach loads `@objectstack/lint` lazily; pay that load during
3232
// collection, not inside a case's clocked window (`check:test-source-alias`).
3333
import '@objectstack/lint';
34+
// objectstack#36900 — the surface mounts the command palette, which reaches the
35+
// record preview's `lazy()` detail entry: its first load is paid at collection too.
36+
import '@object-ui/plugin-detail';
3437

3538
const OWN = 'com.example.sales';
3639
const FLAT_KERNEL = 'sys.env-artifact-cache';

‎ui/packages/app-shell/src/views/studio-design/StudioDesignSurface.changesCount-11787.test.tsx‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ vi.mock('../../preview/DraftChangesPanel', () => ({ DraftChangesPanel: () => nul
6262
// The console's preview and authoring code loads `@objectstack/lint` lazily;
6363
// warmed here so its first load is paid at import, not inside a test's clock.
6464
import '@objectstack/lint';
65+
// objectstack#36900 — the surface mounts the command palette, which reaches the
66+
// record preview's `lazy()` detail entry: its first load is paid at collection too.
67+
import '@object-ui/plugin-detail';
6568
import { StudioDesignSurface } from './StudioDesignSurface';
6669
import { t } from '../metadata-admin/i18n';
6770

‎ui/packages/app-shell/src/views/studio-design/StudioDesignSurface.copilotDraftBadge-12725.test.tsx‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,9 @@ import { uiMessagesToChatMessages } from '@object-ui/plugin-chatbot';
124124
// The console's preview and authoring code loads `@objectstack/lint` lazily;
125125
// warmed here so its first load is paid at import, not inside a test's clock.
126126
import '@objectstack/lint';
127+
// objectstack#36900 — the surface mounts the command palette, which reaches the
128+
// record preview's `lazy()` detail entry: its first load is paid at collection too.
129+
import '@object-ui/plugin-detail';
127130
import { StudioDesignSurface } from './StudioDesignSurface';
128131
import { subscribeMetadataRefresh } from '../../assistant/assistantBus';
129132

‎ui/packages/app-shell/src/views/studio-design/StudioDesignSurface.emptyStates-12514.test.tsx‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ import '@testing-library/jest-dom/vitest';
2121
// The source under test reaches a dynamic `import('@objectstack/lint')`; its first load is paid
2222
// here, at collection, never inside a case's clock (`check:test-source-alias`).
2323
import '@objectstack/lint';
24+
// objectstack#36900 — the surface mounts the command palette, which reaches the
25+
// record preview's `lazy()` detail entry: its first load is paid at collection too.
26+
import '@object-ui/plugin-detail';
2427
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
2528
import { cleanup, fireEvent, render, screen, within } from '@testing-library/react';
2629
import { MemoryRouter } from 'react-router-dom';

‎ui/packages/app-shell/src/views/studio-design/StudioDesignSurface.notFound-26708.test.tsx‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
2323
import '@testing-library/jest-dom/vitest';
2424
// The source under test reaches `import('@objectstack/lint')`: paid here, at collection, never inside a test's clock.
2525
import '@objectstack/lint';
26+
// objectstack#36900 — the surface mounts the command palette, which reaches the
27+
// record preview's `lazy()` detail entry: its first load is paid at collection too.
28+
import '@object-ui/plugin-detail';
2629
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
2730
import { act, cleanup, render, screen, waitFor, within } from '@testing-library/react';
2831
import * as React from 'react';

‎ui/packages/app-shell/src/views/studio-design/StudioDesignSurface.pillarNavGuard.test.tsx‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@
4242
import '@testing-library/jest-dom/vitest';
4343
// The source under test reaches these through dynamic imports: their first load is paid at collection.
4444
import '@objectstack/lint';
45+
// objectstack#36900 — the surface mounts the command palette, which reaches the
46+
// record preview's `lazy()` detail entry: its first load is paid at collection too.
47+
import '@object-ui/plugin-detail';
4548
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
4649
import { cleanup, fireEvent, render, screen, within } from '@testing-library/react';
4750
import { MemoryRouter, Route, Routes, useLocation } from 'react-router-dom';

‎ui/packages/app-shell/src/views/studio-design/StudioDesignSurface.pillarsClaimSlot-12725.test.tsx‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,9 @@ vi.mock('./StudioAiCopilot', () => ({
117117
// The source loads `@objectstack/lint` lazily; paid here, at collection, not
118118
// inside a case's clock (check:test-source-alias).
119119
import '@objectstack/lint';
120+
// objectstack#36900 — the surface mounts the command palette, which reaches the
121+
// record preview's `lazy()` detail entry: its first load is paid at collection too.
122+
import '@object-ui/plugin-detail';
120123
import { StudioDesignSurface } from './StudioDesignSurface';
121124
import { t } from '../metadata-admin/i18n';
122125
import { registerMetadataPreview } from '../metadata-admin/preview-registry';

0 commit comments

Comments
 (0)