Skip to content

Commit 7d86018

Browse files
committed
test(console): pay the CEL helpers' first load at import in the edited Packages and connector page tests
check:test-source-alias judges the test files a change edits; these four reach the lazily loaded formula and lint packages from a case, so each loads them at module top, as the other Packages page tests do. Claude-Session: https://claude.ai/code/session_01WGufziG2t1d9cfRQJDrHkB Co-authored-by: Claude <noreply@anthropic.com>
1 parent 8d5bf76 commit 7d86018

4 files changed

Lines changed: 11 additions & 0 deletions

File tree

‎ui/packages/app-shell/src/views/metadata-admin/PackagesPage.adoptLooseItems-13339.test.tsx‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ import { act, cleanup, fireEvent, render, screen, waitFor, within } from '@testi
2929
import { MemoryRouter } from 'react-router-dom';
3030

3131
import { PackageDetailSheet, type InstalledPackageRow } from './PackagesPage';
32+
// Loaded at import so their first load is not paid inside a test's clocked window.
33+
import '@objectstack/formula';
34+
import '@objectstack/lint';
3235

3336
const PKG_ID = 'com.acme.crm';
3437
const PKG_NAME = 'Acme CRM';

‎ui/packages/app-shell/src/views/metadata-admin/PackagesPage.envelopeUserMessage.test.tsx‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ import { cleanup, render, screen, waitFor } from '@testing-library/react';
3131
import { MemoryRouter } from 'react-router-dom';
3232

3333
import { PackagesPage } from './PackagesPage';
34+
// Loaded at import so their first load is not paid inside a test's clocked window.
35+
import '@objectstack/formula';
36+
import '@objectstack/lint';
3437

3538
/** The generic sentence the 5xx prose withhold substitutes (`INTERNAL_ERROR_MESSAGE`). */
3639
const GENERIC = 'Internal server error';

‎ui/packages/app-shell/src/views/metadata-admin/PackagesPage.pendingHeaderMarkup-11804.test.tsx‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ import { act, cleanup, render, screen } from '@testing-library/react';
2222
import { MemoryRouter } from 'react-router-dom';
2323

2424
import { PackageDetailSheet, type InstalledPackageRow } from './PackagesPage';
25+
// Loaded at import so their first load is not paid inside a test's clocked window.
26+
import '@objectstack/formula';
27+
import '@objectstack/lint';
2528

2629
const PKG: InstalledPackageRow = {
2730
manifest: { id: 'com.acme.crm', name: 'Acme CRM', version: '1.0.0', type: 'app' },

‎ui/packages/app-shell/src/views/setup/ConnectorCredentialsPage.navContribution.test.tsx‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ import {
2929
} from '../../services/componentRegistry.js';
3030
import { ComponentNavView } from '../ComponentNavView.js';
3131
import { CONNECTOR_CREDENTIALS_REF, connectorCredentialsPagePath } from './connectorCredentials.js';
32+
// Loaded at import so its first load is not paid inside a test's clocked window.
33+
import '@objectstack/lint';
3234

3335
beforeEach(() => {
3436
vi.stubGlobal(

0 commit comments

Comments
 (0)