@m4l/testing 1.2.0 → 1.2.1-beta-fix-reports-viewer-chart-tab-resize.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -168,6 +168,14 @@ guide and update it alongside the helper docs.
168
168
  Builds a typed preview-scenario `dynamicParams` payload for authenticated MF launches. It documents the shared `dummyPresetId` and `testCondition` keys while still allowing MF-specific extension keys when a scenario needs more than the common baseline.
169
169
  - `installHostAuthenticatedMfPreviewBootstrap(...)`
170
170
  Composes the authenticated host-shell bootstrap baseline with one deterministic MF sidebar entry. The high-level installer accepts the MF identity fields directly (`moduleId`, `title`, `debugPort`, optional `iconUrl`, and optional `dynamicParams`) instead of exposing the lower-level menu-fixture shape. The shared baseline now also stubs `GET /users/me/preferences`, so authenticated host-preview suites inherit the same preferences bootstrap seam that the host runtime now requires without re-registering that endpoint in every MF-owned E2E project.
171
+ - `installHostAuthenticatedBootstrapRoutes({ page: browserContext, moduleId: 'platform' })`
172
+ Installs the existing auth, locale, branding, preferences and shell routes for every
173
+ page in a browser context. Use this before a real user action opens a host popup;
174
+ opener-only `page.route(...)` handlers do not intercept that popup's requests.
175
+ Route-only bootstrap options accept `Page | BrowserContext`; navigation helpers
176
+ still require `Page`. Keep feature endpoints context-scoped as well, and narrow
177
+ API patterns to `/api/v1/...` so they cannot fulfill `/reports/:uuid` HTML navigation
178
+ with JSON. The Export DataGrid and Tags visible-column E2E flows exercise this seam.
171
179
  - `installHostAuthenticatedMfModuleDictionaryRoute(...)`
172
180
  Installs the common authenticated MF module-dictionary route used after host-side launch so each MF pilot does not need its own one-line `isAuth: true` wrapper around the lower-level module-dictionary installer.
173
181
  - `openHostAuthenticatedMfPreviewModule(...)`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@m4l/testing",
3
- "version": "1.2.0",
3
+ "version": "1.2.1-beta-fix-reports-viewer-chart-tab-resize.0",
4
4
  "description": "Shared M4L testing contracts for React, Vitest and Playwright",
5
5
  "license": "UNLICENSED",
6
6
  "engines": {
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Stable module id used by shared testing fixtures that need a deterministic
2
+ * Stable module id used by shared testing fixtures that need a deterministic.
3
3
  * module identity without coupling the fixture back to one package.
4
4
  */
5
5
  export declare const testModuleId = "testing";
@@ -4,6 +4,6 @@ import type { HostUIConfigFixture } from '../types';
4
4
  * no-auth shell can render deterministically without hitting remote storage.
5
5
  */
6
6
  export declare function installHostUiConfigAssetRoutes(options: {
7
- page: import('@playwright/test').Page;
7
+ page: import('@playwright/test').Page | import('@playwright/test').BrowserContext;
8
8
  uiConfig?: Partial<HostUIConfigFixture>;
9
9
  }): Promise<void>;
@@ -1,4 +1,4 @@
1
- import type { Page } from '@playwright/test';
1
+ import type { BrowserContext, Page } from '@playwright/test';
2
2
  /**
3
3
  * Shared UI-config payload shape used by host-style Playwright mocks.
4
4
  * Keep this contract local to the testing library so app E2E projects can
@@ -206,7 +206,7 @@ export type HostMutationFixture = HostMutationSuccessFixture | HostMutationError
206
206
  * Installs the shared UI-config bootstrap route.
207
207
  */
208
208
  export interface InstallHostUIConfigRouteOptions {
209
- page: Page;
209
+ page: Page | BrowserContext;
210
210
  uiConfig?: Partial<HostUIConfigFixture>;
211
211
  status?: number;
212
212
  delayMs?: number;
@@ -230,7 +230,7 @@ export interface InstallHostGuestSessionRouteOptions {
230
230
  * Installs the shared authenticated session bootstrap route.
231
231
  */
232
232
  export interface InstallHostAuthenticatedSessionRouteOptions {
233
- page: Page;
233
+ page: Page | BrowserContext;
234
234
  session?: Partial<HostAuthenticatedSessionUserFixture>;
235
235
  status?: number;
236
236
  delayMs?: number;
@@ -239,14 +239,14 @@ export interface InstallHostAuthenticatedSessionRouteOptions {
239
239
  * Installs the shared locale bootstrap route.
240
240
  */
241
241
  export interface InstallHostLocaleRouteOptions {
242
- page: Page;
242
+ page: Page | BrowserContext;
243
243
  locale?: Partial<HostLocaleFixture>;
244
244
  }
245
245
  /**
246
246
  * Installs the shared authenticated user-preferences bootstrap route.
247
247
  */
248
248
  export interface InstallHostUserPreferencesRouteOptions {
249
- page: Page;
249
+ page: Page | BrowserContext;
250
250
  userPreferences?: Partial<HostUserPreferencesFixture>;
251
251
  status?: number;
252
252
  delayMs?: number;
@@ -255,7 +255,7 @@ export interface InstallHostUserPreferencesRouteOptions {
255
255
  * Installs the shared no-auth dictionary bootstrap route.
256
256
  */
257
257
  export interface InstallHostModuleDictionaryRouteOptions {
258
- page: Page;
258
+ page: Page | BrowserContext;
259
259
  moduleId: string;
260
260
  moduleDictionary?: HostModuleDictionaryFixture;
261
261
  isAuth?: boolean;
@@ -272,21 +272,21 @@ export interface InstallHostAuthenticatedMfModuleDictionaryRouteOptions extends
272
272
  * Installs the shared authenticated areas route.
273
273
  */
274
274
  export interface InstallHostAreasRouteOptions {
275
- page: Page;
275
+ page: Page | BrowserContext;
276
276
  areas?: HostAreaFixture[];
277
277
  }
278
278
  /**
279
279
  * Installs the shared cookies route used by the platform shell.
280
280
  */
281
281
  export interface InstallHostCookiesRouteOptions {
282
- page: Page;
282
+ page: Page | BrowserContext;
283
283
  cookies?: HostCookieFixture[];
284
284
  }
285
285
  /**
286
286
  * Installs the shared menus route used by the platform shell.
287
287
  */
288
288
  export interface InstallHostMenusRouteOptions {
289
- page: Page;
289
+ page: Page | BrowserContext;
290
290
  menuData?: HostMenuItemFixture[];
291
291
  /**
292
292
  * Rows served to the **account popover** (`menus?position=1`), the door the host
@@ -321,7 +321,7 @@ export interface InstallHostGuestBootstrapRoutesOptions {
321
321
  * Installs a complete authenticated bootstrap baseline for host-style apps.
322
322
  */
323
323
  export interface InstallHostAuthenticatedBootstrapRoutesOptions {
324
- page: Page;
324
+ page: Page | BrowserContext;
325
325
  moduleId: string;
326
326
  uiConfig?: Partial<HostUIConfigFixture>;
327
327
  uiConfigRouteOptions?: HostUiConfigRouteControlOptions;