Skip to content

Commit cff1b9d

Browse files
committed
test(app-shell): the four edited StudioDesignSurface suites pay the palette's plugin-detail load at collection (check:test-source-alias)
Claude-Session: https://claude.ai/code/session_01QSeKYnV6DdKeTL414FFGnp Co-authored-by: Claude <noreply@anthropic.com>
1 parent 3db4a10 commit cff1b9d

4 files changed

Lines changed: 12 additions & 0 deletions

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

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

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

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,9 @@ vi.mock('../../preview/DraftChangesPanel', () => ({
106106
// The console's preview and authoring code loads `@objectstack/lint` lazily;
107107
// warmed here so its first load is paid at import, not inside a test's clock.
108108
import '@objectstack/lint';
109+
// The surface mounts the command palette, whose record preview reaches the
110+
// `lazy()` detail entry: its first load is paid here too, not in a test's clock.
111+
import '@object-ui/plugin-detail';
109112
import { StudioDesignSurface } from './StudioDesignSurface';
110113
import { t, tFormat } from '../metadata-admin/i18n';
111114
import { emitMetadataRefresh } from '../../assistant/assistantBus';

‎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+
// The surface mounts the command palette, whose record preview reaches the
27+
// `lazy()` detail entry: its first load is paid here too, not in a test's clock.
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.readOnlyPosture-12453.test.tsx‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ import '@testing-library/jest-dom/vitest';
1818
// The surface's reach loads `@objectstack/lint` lazily; pay that load during
1919
// collection, not inside a case's clocked window (`check:test-source-alias`).
2020
import '@objectstack/lint';
21+
// The surface mounts the command palette, whose record preview reaches the
22+
// `lazy()` detail entry: its first load is paid here too, not in a test's clock.
23+
import '@object-ui/plugin-detail';
2124
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
2225
import { act, cleanup, render, screen, waitFor } from '@testing-library/react';
2326
import { MemoryRouter, Route, Routes } from 'react-router-dom';

0 commit comments

Comments
 (0)