@m4l/testing 1.0.1 → 1.0.2-beta-improvement-804-reports-mfs-enhancements.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
@@ -32,7 +32,8 @@ then TypeScript emits declarations under `types/`; published export maps contain
32
32
  condition. React, Vitest, Playwright and RTL remain consumer-owned peers, marked
33
33
  optional so a mocks-only consumer does not need to install unrelated runners.
34
34
  Consumers must install the peers required by their chosen subpath. The library declares compatible peer ranges from the tested versions; the
35
- workspace and versioned MF consumers keep exact install pins. The dist-manifest
35
+ workspace and external MF repositories keep exact install pins, with common
36
+ consumer versions owned by each repository's root manifest and lockfile. The dist-manifest
36
37
  helper opts into preserving these source peer contracts rather than replacing
37
38
  them with exact workspace versions, so unrelated consumers can resolve their
38
39
  own compatible types and runners.
@@ -56,9 +57,12 @@ existing release machinery. The target version `1.0.1` requires an explicit
56
57
  bootstrap/version review against current registry state and reachable tags;
57
58
  registration alone does not force Nx Release to choose that version. No package
58
59
  or dist-tag is published by the local POC. Verify the packed artifact outside the
59
- workspace before beta/stable release. Non-Golden MFs adopt a stable exact NPM
60
- version; if they need a testing API change, develop against source as Golden in
61
- one MR and return to versioned consumption in another MR after stable publication.
60
+ workspace before beta/stable release. Platform consumers validate testing API
61
+ changes against workspace source. External MF repositories adopt published
62
+ stable versions through their common root manifest and lockfile; they do not
63
+ need to move projects between repositories to change a helper. Candidate-package
64
+ experiments stay local and do not introduce beta dependencies into integrated MF
65
+ manifests or CI.
62
66
 
63
67
  ### One-time 1.0.1 bootstrap without Nx Release
64
68
 
@@ -155,6 +159,14 @@ guide and update it alongside the helper docs.
155
159
  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.
156
160
  - `installHostAuthenticatedMfPreviewBootstrap(...)`
157
161
  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.
162
+ - `installHostAuthenticatedBootstrapRoutes({ page: browserContext, moduleId: 'platform' })`
163
+ Installs the existing auth, locale, branding, preferences and shell routes for every
164
+ page in a browser context. Use this before a real user action opens a host popup;
165
+ opener-only `page.route(...)` handlers do not intercept that popup's requests.
166
+ Route-only bootstrap options accept `Page | BrowserContext`; navigation helpers
167
+ still require `Page`. Keep feature endpoints context-scoped as well, and narrow
168
+ API patterns to `/api/v1/...` so they cannot fulfill `/reports/:uuid` HTML navigation
169
+ with JSON. The Export DataGrid and Tags visible-column E2E flows exercise this seam.
158
170
  - `installHostAuthenticatedMfModuleDictionaryRoute(...)`
159
171
  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.
160
172
  - `openHostAuthenticatedMfPreviewModule(...)`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@m4l/testing",
3
- "version": "1.0.1",
3
+ "version": "1.0.2-beta-improvement-804-reports-mfs-enhancements.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;