@m4l/testing 1.0.2-beta-feat-sidebar-minimal-navigation-20261105.0 → 1.1.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
@@ -10,6 +10,15 @@ Private workspace-only libraries remain under `libs/*`; use their own convention
10
10
 
11
11
  ## Build, release and adoption
12
12
 
13
+ `createHostToolsFixture` includes empty `getCookie(containerId, cookieId)` and
14
+ `setCookie(containerId, cookieId, value)` methods, with optional overrides for
15
+ cookie-specific tests. These neutral fixture types avoid importing core at
16
+ runtime. The empty getter always returns a Promise resolving undefined; overrides
17
+ must preserve the async host contract. Production host cookie tests should
18
+ cover demand-only reads, shared pending requests, cached absence, synchronous memory updates,
19
+ independent background writes, empty unauthenticated operations, and session
20
+ invalidation rather than assuming these defaults implement persistence.
21
+
13
22
  - `NX_NO_CLOUD=true NX_CLOUD_DISTRIBUTED_EXECUTION=false yarn nx run @m4l/testing:typecheck`
14
23
  - `NX_NO_CLOUD=true NX_CLOUD_DISTRIBUTED_EXECUTION=false yarn nx run @m4l/testing:test`
15
24
  - `NX_NO_CLOUD=true NX_CLOUD_DISTRIBUTED_EXECUTION=false yarn nx run @m4l/testing:test-coverage`
@@ -172,22 +181,11 @@ guide and update it alongside the helper docs.
172
181
  gate and let the shared helper re-attempt the sidebar click once if that
173
182
  gate never materializes.
174
183
  - `openHostSidebarModule(...)`
175
- Opens one host-shell sidebar module by its native button's accessible name inside
176
- the navigation landmark and expands the sidebar when needed. Favorites precede
177
- the tree, so the last matching destination is the original tree entry even when
178
- a saved shortcut exists. Desktop and mobile share this locator; neither relies
179
- on the legacy `menuitem` role or unscoped visible text.
184
+ Opens one host-shell sidebar module by visible title and expands the sidebar first when the menu item is not yet visible. The helper retries with a non-exact accessible-name match when icon text or other leading accessible content makes the exact `menuitem` name longer than the visible label alone.
180
185
  It can also accept one caller-owned `waitForModuleOpen(...)` gate plus a
181
186
  small `maxClickAttempts` budget so host-owned window emergence is verified
182
187
  immediately after the sidebar click instead of being deferred to a later
183
188
  app-specific ready wait.
184
- - `openHostMobileSidebarModule(...)`
185
- Opens the app-bar navigation drawer and selects the same tree destination button
186
- used on desktop.
187
- - `getListDetailAccordionRegions(...)` / `getListDetailFieldLabels(...)`
188
- Count open regions and collect field labels only inside shared Accordion
189
- containers with headings. Other page regions, including sidebar navigation and
190
- favorites, must not affect detail completeness or collapse/expand assertions.
191
189
  - `installMicrofrontendRenderStub(...)`
192
190
  Installs a deterministic browser-side `render_v2_*` / `unmount_*` MF contract stub that matches the current host runtime shape used by `MFLoader`, so host-shell E2E suites can validate MF opening behavior without downloading a real remote bundle. The stub records render calls immediately, then waits on a deadline for the host-created container before mounting the visible DOM so CI does not depend on one exact animation-frame budget.
193
191
  - MF-owned authenticated preview helper files should keep window lookup logic
@@ -1,7 +1,7 @@
1
1
  import { isDeepStrictEqual as g, inspect as $ } from "node:util";
2
2
  import { jsx as u, jsxs as q } from "react/jsx-runtime";
3
3
  import { vi as t } from "vitest";
4
- import { q as Q, l as x, r as B, w as ee, v as te, u as re } from "./userPreferences-BmOgRaIX.js";
4
+ import { q as Q, l as x, r as B, w as ee, v as te, u as re } from "./userPreferences-CoM3U5-X.js";
5
5
  import "date-fns";
6
6
  import "history";
7
7
  import y from "react";
@@ -1,29 +1,29 @@
1
- import { createMemoryHistory as k } from "history";
1
+ import { createMemoryHistory as S } from "history";
2
2
  import { format as I } from "date-fns";
3
3
  const z = "testing", P = "label_for_module_name", X = {
4
4
  data: { module_name: P, label1: "testGetLabel1" },
5
5
  comp1: { key1: "testcomp1label" }
6
- }, Z = ["priv1"], N = {
6
+ }, Z = ["priv1"], C = {
7
7
  data: { priv1: !0 }
8
- }, R = {
8
+ }, N = {
9
9
  data: {
10
10
  name: "a",
11
11
  company_logo_small_url: "b",
12
12
  company_logo_normal_url: "c"
13
13
  }
14
- }, T = {
14
+ }, R = {
15
15
  id: 1,
16
16
  currency: "$",
17
17
  currency_decimal_digits: 0,
18
18
  decimal_symbol: ".",
19
19
  thousands_symbol: ","
20
- }, w = {
20
+ }, T = {
21
21
  id: 2,
22
22
  currency: "USD",
23
23
  currency_decimal_digits: 2,
24
24
  decimal_symbol: ",",
25
25
  thousands_symbol: "."
26
- }, f = {
26
+ }, g = {
27
27
  decimalSymbol: ".",
28
28
  thousandsSymbol: ",",
29
29
  dateFormat: "yyyy-MM-dd",
@@ -151,7 +151,7 @@ const z = "testing", P = "label_for_module_name", X = {
151
151
  thousands_symbol: ",",
152
152
  currency: "USD",
153
153
  currency_decimal_digits: 2
154
- }, C = {
154
+ }, w = {
155
155
  data: { a: 1, b: "testing" }
156
156
  }, O = {
157
157
  method: "GET",
@@ -213,24 +213,27 @@ function q(e = {}) {
213
213
  ...e
214
214
  };
215
215
  }
216
- function d(e) {
216
+ function _(e) {
217
217
  return () => e;
218
218
  }
219
219
  function V() {
220
- const e = d(0);
221
- return e.info = d(1), e.success = d(2), e.warning = d(3), e.error = d(4), e;
220
+ const e = _(0);
221
+ return e.info = _(1), e.success = _(2), e.warning = _(3), e.error = _(4), e;
222
222
  }
223
- const _ = () => {
223
+ const l = () => {
224
224
  };
225
225
  function G(e = {}) {
226
226
  return {
227
- history: k(),
227
+ history: S(),
228
228
  toast: V(),
229
- startProgress: _,
230
- stopProgress: _,
231
- events_add_listener: _,
232
- events_remove_listener: _,
233
- events_emit: _,
229
+ startProgress: l,
230
+ stopProgress: l,
231
+ events_add_listener: l,
232
+ events_remove_listener: l,
233
+ events_emit: l,
234
+ getCookie: async () => {
235
+ },
236
+ setCookie: l,
234
237
  ...e
235
238
  };
236
239
  }
@@ -242,49 +245,49 @@ function b(e, t) {
242
245
  };
243
246
  }
244
247
  function y(e, t) {
245
- const o = e.startsWith("-") ? "-" : "", a = o === "-" ? e.slice(1) : e;
246
- return `${o}${a.replace(/\B(?=(\d{3})+(?!\d))/g, t)}`;
248
+ const s = e.startsWith("-") ? "-" : "", a = s === "-" ? e.slice(1) : e;
249
+ return `${s}${a.replace(/\B(?=(\d{3})+(?!\d))/g, t)}`;
247
250
  }
248
251
  function B(e, t) {
249
252
  const {
250
- fallbackValue: o,
253
+ fallbackValue: s,
251
254
  formatValue: a,
252
- fractionDigits: s,
255
+ fractionDigits: o,
253
256
  value: i
254
257
  } = t;
255
258
  if (typeof i != "number" || !Number.isFinite(i))
256
- return o;
259
+ return s;
257
260
  if (a)
258
261
  return a(i);
259
- if (typeof s == "number" && Number.isInteger(s) && s >= 0) {
260
- const [m, c = ""] = i.toFixed(s).split("."), u = y(
262
+ if (typeof o == "number" && Number.isInteger(o) && o >= 0) {
263
+ const [m, c = ""] = i.toFixed(o).split("."), u = y(
261
264
  m,
262
265
  e.thousandsSymbol
263
266
  );
264
267
  return c === "" ? u : `${u}${e.decimalSymbol}${c}`;
265
268
  }
266
- const [g, r] = String(i).split("."), p = y(
267
- g,
269
+ const [f, r] = String(i).split("."), p = y(
270
+ f,
268
271
  e.thousandsSymbol
269
272
  );
270
273
  return r === void 0 ? p : `${p}${e.decimalSymbol}${r}`;
271
274
  }
272
275
  function h(e, t) {
273
- const o = typeof t.propertyId == "string" ? t.propertyId.trim() : "", a = typeof t.baseMagnitudeId == "string" ? t.baseMagnitudeId.trim() : "";
274
- if (o !== "") {
275
- const s = e.properties.find(
276
- (i) => i.id === o
276
+ const s = typeof t.propertyId == "string" ? t.propertyId.trim() : "", a = typeof t.baseMagnitudeId == "string" ? t.baseMagnitudeId.trim() : "";
277
+ if (s !== "") {
278
+ const o = e.properties.find(
279
+ (i) => i.id === s
277
280
  );
278
- if (s)
279
- return s;
281
+ if (o)
282
+ return o;
280
283
  }
281
284
  if (a !== "")
282
285
  return e.properties.find(
283
- (s) => s.baseMagnitudeId === a
286
+ (o) => o.baseMagnitudeId === a
284
287
  );
285
288
  }
286
289
  function F(e = {}) {
287
- const t = f.properties[0];
290
+ const t = g.properties[0];
288
291
  return {
289
292
  ...t,
290
293
  ...e,
@@ -304,10 +307,10 @@ function F(e = {}) {
304
307
  }
305
308
  function Q(e = {}) {
306
309
  let t = x(e);
307
- const o = (r) => {
310
+ const s = (r) => {
308
311
  t = x(r);
309
- }, a = (r) => h(t, r), s = (r) => B(t, r), g = {
310
- changeUserPreferences: o,
312
+ }, a = (r) => h(t, r), o = (r) => B(t, r), f = {
313
+ changeUserPreferences: s,
311
314
  convertMagnitude: (r) => {
312
315
  const {
313
316
  baseMagnitudeId: p,
@@ -321,21 +324,21 @@ function Q(e = {}) {
321
324
  if (typeof m != "number" || !Number.isFinite(m))
322
325
  return b(u, c);
323
326
  try {
324
- const l = h(
327
+ const d = h(
325
328
  t,
326
329
  {
327
330
  propertyId: v,
328
331
  baseMagnitudeId: p
329
332
  }
330
333
  );
331
- if (!l)
334
+ if (!d)
332
335
  return b(u, c);
333
- const S = l.factor.factorX0 + l.factor.factorX1 * m + l.factor.factorX2 * m * m;
336
+ const k = d.factor.factorX0 + d.factor.factorX1 * m + d.factor.factorX2 * m * m;
334
337
  return {
335
338
  source: "user-preference",
336
- symbol: l.magnitudeUnitUser.symbol,
337
- value: s({
338
- value: S,
339
+ symbol: d.magnitudeUnitUser.symbol,
340
+ value: o({
341
+ value: k,
339
342
  fallbackValue: u,
340
343
  fractionDigits: M,
341
344
  formatValue: U
@@ -345,10 +348,10 @@ function Q(e = {}) {
345
348
  return b(u, c);
346
349
  }
347
350
  },
348
- formatNumber: s,
351
+ formatNumber: o,
349
352
  getMagnitudeProperty: a
350
353
  };
351
- return Object.defineProperties(g, {
354
+ return Object.defineProperties(f, {
352
355
  decimalSymbol: {
353
356
  enumerable: !0,
354
357
  get: () => t.decimalSymbol
@@ -389,17 +392,17 @@ function Q(e = {}) {
389
392
  enumerable: !0,
390
393
  get: () => t.currencyDecimalDigits
391
394
  }
392
- }), g;
395
+ }), f;
393
396
  }
394
397
  function x(e = {}) {
395
398
  return {
396
- ...f,
399
+ ...g,
397
400
  ...e,
398
401
  timeZone: e.timeZone === null ? null : e.timeZone ? {
399
- ...f.timeZone,
402
+ ...g.timeZone,
400
403
  ...e.timeZone
401
- } : f.timeZone,
402
- properties: e.properties ? e.properties.map((t) => F(t)) : f.properties.map((t) => F(t))
404
+ } : g.timeZone,
405
+ properties: e.properties ? e.properties.map((t) => F(t)) : g.properties.map((t) => F(t))
403
406
  };
404
407
  }
405
408
  function W(e = {}) {
@@ -418,8 +421,8 @@ function W(e = {}) {
418
421
  ...n.magnitudes_system,
419
422
  ...e.magnitudes_system
420
423
  } : n.magnitudes_system,
421
- properties: e.properties ? e.properties.map((t, o) => {
422
- const a = n.properties[o] ?? n.properties[0];
424
+ properties: e.properties ? e.properties.map((t, s) => {
425
+ const a = n.properties[s] ?? n.properties[0];
423
426
  return {
424
427
  ...a,
425
428
  ...t,
@@ -467,12 +470,12 @@ function W(e = {}) {
467
470
  }
468
471
  export {
469
472
  z as a,
470
- N as b,
471
- T as c,
472
- R as d,
473
- w as e,
473
+ C as b,
474
+ R as c,
475
+ N as d,
476
+ T as e,
474
477
  n as f,
475
- C as g,
478
+ w as g,
476
479
  D as h,
477
480
  A as i,
478
481
  E as j,
@@ -486,7 +489,7 @@ export {
486
489
  G as r,
487
490
  F as s,
488
491
  P as t,
489
- f as u,
492
+ g as u,
490
493
  Q as v,
491
494
  x as w,
492
495
  W as x
package/index.js CHANGED
@@ -3,7 +3,7 @@ import { afterAll as r, afterEach as c, beforeAll as s, beforeEach as M, describ
3
3
  import { cleanup as u, fireEvent as m, renderHook as C, screen as f, waitFor as g, within as A } from "@testing-library/react";
4
4
  import { default as E } from "@testing-library/user-event";
5
5
  import { c as S } from "./chunks/render-CsuV8xqo.js";
6
- import { D as x, a as L, M as R, f as D, v as _, y as G, s as h, k as b, h as B, u as H, z as I, p as O, l as T, o as w, P as y, G as N, H as W, J as K, I as U, N as V, K as z, L as Y, O as Z, Q as j, R as q, S as J, T as Q, U as X, V as $, W as ee, m as ae, q as oe, j as te, n as re, Y as ce, X as se, Z as Me, i as le, t as ne, r as ie, d as ke, b as pe, c as de, e as ue, g as me, B as Ce, A as fe, C as ge, w as Ae, E as Fe, F as Ee, x as Pe } from "./chunks/reactLeaflet-Cffkauof.js";
6
+ import { D as x, a as L, M as R, f as D, v as _, y as G, s as h, k as b, h as B, u as H, z as I, p as O, l as T, o as w, P as y, G as N, H as W, J as K, I as U, N as V, K as z, L as Y, O as Z, Q as j, R as q, S as J, T as Q, U as X, V as $, W as ee, m as ae, q as oe, j as te, n as re, Y as ce, X as se, Z as Me, i as le, t as ne, r as ie, d as ke, b as pe, c as de, e as ue, g as me, B as Ce, A as fe, C as ge, w as Ae, E as Fe, F as Ee, x as Pe } from "./chunks/reactLeaflet-DvbdKAVA.js";
7
7
  export {
8
8
  x as DEFAULT_RHF_SUBMIT_REF_GLOBAL_KEY,
9
9
  L as M4L_APP_DATAGRID_SEMANTIC_WIDTHS,
package/mocks/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { t as o } from "../chunks/userPreferences-BmOgRaIX.js";
2
- import { g as l, j as m, l as d, r as f, q as p, o as v, x as P, v as g, w as D, s as U, c as M, e as V, d as b, h as y, k as w, m as C, n as E, p as L, b as R, a as T, i as q, f as A, u as N } from "../chunks/userPreferences-BmOgRaIX.js";
1
+ import { t as o } from "../chunks/userPreferences-CoM3U5-X.js";
2
+ import { g as l, j as m, l as d, r as f, q as p, o as v, x as P, v as g, w as D, s as U, c as M, e as V, d as b, h as y, k as w, m as C, n as E, p as L, b as R, a as T, i as q, f as A, u as N } from "../chunks/userPreferences-CoM3U5-X.js";
3
3
  function x({
4
4
  fallbackToKey: t = !0,
5
5
  getLabel: a,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@m4l/testing",
3
- "version": "1.0.2-beta-feat-sidebar-minimal-navigation-20261105.0",
3
+ "version": "1.1.0",
4
4
  "description": "Shared M4L testing contracts for React, Vitest and Playwright",
5
5
  "license": "UNLICENSED",
6
6
  "engines": {
@@ -1,15 +1,15 @@
1
1
  import { expect as T } from "@playwright/test";
2
- const re = {
2
+ const ie = {
3
3
  id: "area_testing_1",
4
4
  name: "Workspace 1"
5
5
  };
6
6
  function K(e = {}) {
7
7
  return {
8
- ...re,
8
+ ...ie,
9
9
  ...e
10
10
  };
11
11
  }
12
- function se(e) {
12
+ function re(e) {
13
13
  const { data: t, pagerPage: o = 0, total: a = t.length } = e;
14
14
  return {
15
15
  data: t,
@@ -33,11 +33,11 @@ function C(e = {}) {
33
33
  }
34
34
  };
35
35
  }
36
- const ne = "Deterministic authenticated host-preview module dictionary.";
37
- function ce(e) {
36
+ const se = "Deterministic authenticated host-preview module dictionary.";
37
+ function ne(e) {
38
38
  const {
39
39
  moduleName: t,
40
- moduleDescription: o = ne,
40
+ moduleDescription: o = se,
41
41
  data: a = {},
42
42
  sections: i = {}
43
43
  } = e;
@@ -50,15 +50,15 @@ function ce(e) {
50
50
  sections: i
51
51
  });
52
52
  }
53
- const le = "Operations";
54
- function de(e) {
53
+ const ce = "Operations";
54
+ function le(e) {
55
55
  const {
56
56
  moduleId: t,
57
57
  title: o,
58
58
  debugPort: a,
59
59
  iconUrl: i,
60
60
  dynamicParams: r,
61
- sectionTitle: s = le
61
+ sectionTitle: s = ce
62
62
  } = e;
63
63
  return [
64
64
  {
@@ -93,7 +93,7 @@ const x = {
93
93
  dbType: "dt_operative"
94
94
  }
95
95
  };
96
- function ue(e = {}) {
96
+ function de(e = {}) {
97
97
  return {
98
98
  user: {
99
99
  ...x.user,
@@ -105,14 +105,14 @@ function ue(e = {}) {
105
105
  }
106
106
  };
107
107
  }
108
- const pe = {
108
+ const ue = {
109
109
  id: "admin",
110
110
  container_id: "areas",
111
111
  value: JSON.stringify({ selectedAreaId: K().id })
112
112
  };
113
- function me(e = {}) {
113
+ function pe(e = {}) {
114
114
  return {
115
- ...pe,
115
+ ...ue,
116
116
  ...e
117
117
  };
118
118
  }
@@ -122,7 +122,7 @@ const N = {
122
122
  message: "Unauthorized"
123
123
  }
124
124
  };
125
- function ge(e = {}) {
125
+ function me(e = {}) {
126
126
  return {
127
127
  ...N,
128
128
  ...e,
@@ -132,15 +132,15 @@ function ge(e = {}) {
132
132
  }
133
133
  };
134
134
  }
135
- const ye = {
135
+ const ge = {
136
136
  lang: "en",
137
137
  region: "US",
138
138
  urlIcon: "frontend/commons/assets/icons/langs/lang_en.svg",
139
139
  name: "English US"
140
140
  };
141
- function fe(e = {}) {
141
+ function ye(e = {}) {
142
142
  return {
143
- ...ye,
143
+ ...ge,
144
144
  ...e
145
145
  };
146
146
  }
@@ -158,7 +158,7 @@ function Ut(e = {}) {
158
158
  ...a ? { testCondition: a } : {}
159
159
  };
160
160
  }
161
- const be = {
161
+ const fe = {
162
162
  privacyPolicyLink: "https://example.test/privacy-policy",
163
163
  useTerms: "https://example.test/terms-of-service",
164
164
  assetLogoUrl: "testing/assets/company-logo.svg",
@@ -174,7 +174,7 @@ const be = {
174
174
  };
175
175
  function W(e = {}) {
176
176
  return {
177
- ...be,
177
+ ...fe,
178
178
  ...e
179
179
  };
180
180
  }
@@ -208,7 +208,7 @@ const h = {
208
208
  currency: "USD",
209
209
  currency_decimal_digits: 2
210
210
  };
211
- function we(e = {}) {
211
+ function be(e = {}) {
212
212
  const t = e.locale ? { ...h.locale, ...e.locale } : h.locale, o = e.time_zone ? { ...h.time_zone, ...e.time_zone } : h.time_zone, a = e.date_format ? { ...h.date_format, ...e.date_format } : h.date_format, i = e.time_format ? { ...h.time_format, ...e.time_format } : h.time_format;
213
213
  return {
214
214
  ...h,
@@ -225,13 +225,13 @@ async function xt(e, t, o) {
225
225
  contentType: "application/json"
226
226
  });
227
227
  }
228
- function he(e) {
228
+ function we(e) {
229
229
  return e.getByRole("region", { name: "formContainer" });
230
230
  }
231
231
  function z(e, t) {
232
- return he(e).locator(`[name="${t}"]`);
232
+ return we(e).locator(`[name="${t}"]`);
233
233
  }
234
- function ve(e) {
234
+ function he(e) {
235
235
  return e.getByRole("group", { name: "actionsContainer" });
236
236
  }
237
237
  function Nt(e, t) {
@@ -241,7 +241,7 @@ function Gt(e) {
241
241
  return e.getByRole("dialog");
242
242
  }
243
243
  function jt(e, t) {
244
- return ve(e).getByRole("button", { name: t });
244
+ return he(e).getByRole("button", { name: t });
245
245
  }
246
246
  async function $t(e) {
247
247
  const { page: t, name: o, endpointPattern: a, search: i } = e, r = z(t, o), s = t.waitForRequest(
@@ -340,7 +340,7 @@ function Q(e, t) {
340
340
  `[role="columnheader"]:has([aria-label="header-column-button-${t}"])`
341
341
  );
342
342
  }
343
- async function _e(e, t) {
343
+ async function ve(e, t) {
344
344
  const o = Q(e, t);
345
345
  await o.waitFor({ state: "visible" });
346
346
  const a = await o.boundingBox();
@@ -355,9 +355,9 @@ async function ao(e, t, o) {
355
355
  if (!r)
356
356
  throw new Error(`Column "${t}" has no rendered box to resize.`);
357
357
  const s = r.x + r.width - 3, n = r.y + r.height / 2;
358
- return await a.mouse.move(s, n), await a.mouse.down(), await a.mouse.move(s + o, n, { steps: 12 }), await a.mouse.up(), _e(e, t);
358
+ return await a.mouse.move(s, n), await a.mouse.down(), await a.mouse.move(s + o, n, { steps: 12 }), await a.mouse.up(), ve(e, t);
359
359
  }
360
- async function ke(e) {
360
+ async function _e(e) {
361
361
  const t = X(e);
362
362
  return await t.first().waitFor({ state: "visible" }), (await t.evaluateAll(
363
363
  (a) => a.map((i) => i.getAttribute("aria-label") ?? "")
@@ -404,7 +404,7 @@ async function ro(e) {
404
404
  await t.waitFor({ state: "visible" });
405
405
  const o = [];
406
406
  for (; ; ) {
407
- for (const i of await ke(e))
407
+ for (const i of await _e(e))
408
408
  o.includes(i) || o.push(i);
409
409
  if (await t.evaluate(async (i) => {
410
410
  const r = i.scrollLeft, s = r + Math.max(i.clientWidth - 120, 120);
@@ -430,18 +430,17 @@ function no(e) {
430
430
  function co(e, t) {
431
431
  return e.getByRole("listitem").filter({ hasText: t }).last();
432
432
  }
433
- function Re(e, t) {
433
+ function ke(e, t) {
434
434
  return e.getByRole("heading", { name: t });
435
435
  }
436
436
  async function lo(e, t) {
437
- await Re(e, t).click();
437
+ await ke(e, t).click();
438
438
  }
439
- function Ee(e) {
440
- const t = "mouse" in e ? e : e.page();
441
- return e.getByRole("contentinfo").filter({ has: t.getByRole("heading") }).getByRole("region");
439
+ function Re(e) {
440
+ return e.getByRole("region");
442
441
  }
443
442
  async function uo(e) {
444
- const t = Ee(e);
443
+ const t = Re(e);
445
444
  await t.first().waitFor({ state: "visible" });
446
445
  const o = t.getByRole("listitem");
447
446
  return await o.first().waitFor({ state: "visible" }), (await o.allInnerTexts()).map((a) => a.split(`
@@ -461,7 +460,7 @@ async function G(e, t = 1) {
461
460
  await e.press("ArrowDown");
462
461
  await e.press("Enter");
463
462
  }
464
- async function Se(e, t) {
463
+ async function Ee(e, t) {
465
464
  switch (t.type) {
466
465
  case "string":
467
466
  case "number": {
@@ -494,9 +493,9 @@ async function Se(e, t) {
494
493
  }
495
494
  }
496
495
  }
497
- async function Te(e) {
496
+ async function Se(e) {
498
497
  const { page: t, scenario: o, endpointPattern: a } = e;
499
- await t.getByRole("button", { name: "searchbox" }).first().click(), await t.getByRole("menuitem", { name: o.fieldLabel, exact: !0 }).click(), await Se(t, o);
498
+ await t.getByRole("button", { name: "searchbox" }).first().click(), await t.getByRole("menuitem", { name: o.fieldLabel, exact: !0 }).click(), await Ee(t, o);
500
499
  const i = t.waitForRequest(
501
500
  (r) => a.test(r.url()) && /f\[\d+\]\[n\]=/.test(decodeURIComponent(r.url()))
502
501
  );
@@ -506,7 +505,7 @@ async function mo(e) {
506
505
  const { page: t, scenarios: o, endpointPattern: a } = e;
507
506
  let i;
508
507
  for (const r of o)
509
- i = await Te({
508
+ i = await Se({
510
509
  page: t,
511
510
  scenario: r,
512
511
  endpointPattern: a
@@ -538,7 +537,7 @@ function ho(e) {
538
537
  return [...decodeURIComponent(e.url()).matchAll(/s\[\d+\]\[n\]=([^&]+)/g)].map((o) => o[1]);
539
538
  }
540
539
  const j = "datagrid-view-";
541
- async function Ae(e) {
540
+ async function Te(e) {
542
541
  const t = e.locator(`[aria-label^="${j}"]`);
543
542
  await t.first().waitFor({ state: "attached" });
544
543
  const o = await t.first().getAttribute("aria-label"), a = o?.slice(j.length);
@@ -548,8 +547,8 @@ async function Ae(e) {
548
547
  );
549
548
  return a;
550
549
  }
551
- async function Pe(e, t) {
552
- T(await Ae(e)).toBe(t);
550
+ async function Ae(e, t) {
551
+ T(await Te(e)).toBe(t);
553
552
  }
554
553
  async function Z(e) {
555
554
  await e.getByRole("button", { name: "view-mode" }).click();
@@ -559,18 +558,18 @@ async function vo(e) {
559
558
  const t = "keyboard" in e ? e : e.page(), o = [];
560
559
  for (const a of ["table", "cards", "list"])
561
560
  await t.locator(`[data-testid="toggle-button-${a}"]`).isVisible() && o.push(a);
562
- return await Me(e), o;
561
+ return await Pe(e), o;
563
562
  }
564
- async function Me(e) {
563
+ async function Pe(e) {
565
564
  const t = "keyboard" in e ? e : e.page();
566
565
  await t.keyboard.press("Escape"), await T(
567
566
  t.locator('[data-testid="toggle-button-table"]')
568
567
  ).toBeHidden();
569
568
  }
570
569
  async function _o(e, t) {
571
- await Z(e), await ("keyboard" in e ? e : e.page()).locator(`[data-testid="toggle-button-${t}"]`).click(), await Pe(e, t);
570
+ await Z(e), await ("keyboard" in e ? e : e.page()).locator(`[data-testid="toggle-button-${t}"]`).click(), await Ae(e, t);
572
571
  }
573
- async function De(e) {
572
+ async function Me(e) {
574
573
  const t = "keyboard" in e ? e : e.page();
575
574
  await e.locator('[data-testid="settings-button"]').click(), await T(
576
575
  t.locator('[data-testid="data-grid-settings-intro"]')
@@ -578,7 +577,7 @@ async function De(e) {
578
577
  }
579
578
  async function ko(e) {
580
579
  const t = "keyboard" in e ? e : e.page();
581
- await De(e), await t.getByRole("button", { name: "un check all" }).click(), await t.locator('[data-testid="data-grid-settings-intro"]').click(), await T(
580
+ await Me(e), await t.getByRole("button", { name: "un check all" }).click(), await t.locator('[data-testid="data-grid-settings-intro"]').click(), await T(
582
581
  t.locator('[data-testid="data-grid-settings-intro"]')
583
582
  ).toBeHidden();
584
583
  }
@@ -587,34 +586,36 @@ function Ro(e, t) {
587
586
  t === "cards" ? '[data-testid="data-grid-card"]' : '[data-testid="list-row"]'
588
587
  );
589
588
  }
590
- const Le = "User avatar";
589
+ const De = "User avatar";
591
590
  async function Eo(e) {
592
591
  const {
593
592
  page: t,
594
593
  moduleTitle: o,
595
- accountButtonName: a = Le
594
+ accountButtonName: a = De
596
595
  } = e;
597
596
  await t.getByRole("button", { name: a }).click();
598
597
  const i = t.getByRole("menuitem", { name: o, exact: !0 });
599
598
  await T(i).toBeVisible(), await i.click();
600
599
  }
601
- function ee(e, t, o = !0) {
602
- return e.getByRole("navigation").getByRole("button", { name: t, exact: o }).last();
603
- }
604
- const Oe = "N_D:[appbar.tooltip_toogle_menu]";
600
+ const Le = "N_D:[appbar.tooltip_toogle_menu]";
605
601
  async function So(e, t) {
606
- await e.getByRole("button", { name: Oe }).click(), await ee(e, t).click();
602
+ await e.getByRole("button", { name: Le }).click(), await e.getByRole("menuitem", { name: t, exact: !0 }).click();
603
+ }
604
+ const Oe = '[role="anchored-button"]', Ce = 100, $ = 15e3;
605
+ function Ie(e, t, o) {
606
+ const a = e.getByRole("menuitem", { name: t, exact: o }).first(), i = o ? e.getByRole("menuitem", { name: t }).first() : a, r = e.getByText(t, { exact: o }).first();
607
+ return o ? [a, i, r] : [a, r];
607
608
  }
608
- const Ce = '[role="anchored-button"]', Ie = 100, $ = 15e3;
609
609
  async function V(e, t, o, a) {
610
- const i = Date.now(), r = ee(e, t, o);
610
+ const i = Date.now(), r = Ie(e, t, o);
611
611
  for (; Date.now() - i < a; ) {
612
- try {
613
- if (await r.isVisible())
614
- return r;
615
- } catch {
616
- }
617
- await e.waitForTimeout(Ie);
612
+ for (const s of r)
613
+ try {
614
+ if (await s.isVisible())
615
+ return s;
616
+ } catch {
617
+ }
618
+ await e.waitForTimeout(Ce);
618
619
  }
619
620
  return null;
620
621
  }
@@ -650,7 +651,7 @@ async function He(e) {
650
651
  page: t,
651
652
  moduleTitle: o,
652
653
  exact: a = !0,
653
- toggleSelector: i = Ce,
654
+ toggleSelector: i = Oe,
654
655
  waitForModuleOpen: r,
655
656
  maxClickAttempts: s = r ? 2 : 1
656
657
  } = e, n = performance.now(), l = performance.now(), { moduleMenuItem: p, toggleUsed: y } = await Fe(
@@ -720,7 +721,7 @@ async function xe(e) {
720
721
  });
721
722
  }
722
723
  async function Ne(e) {
723
- const { page: t, session: o, status: a = 200, delayMs: i = 0 } = e, r = ue(o);
724
+ const { page: t, session: o, status: a = 200, delayMs: i = 0 } = e, r = de(o);
724
725
  await t.route("**/api/v1/**/auth/login**", async (s) => {
725
726
  if (s.request().method() !== "GET") {
726
727
  await s.fallback();
@@ -744,7 +745,7 @@ function Ge(e) {
744
745
  return !a || !i ? null : { containerId: a, cookieId: i };
745
746
  }
746
747
  async function je(e) {
747
- const { page: t, cookies: o = [me()] } = e, a = new Map(
748
+ const { page: t, cookies: o = [pe()] } = e, a = new Map(
748
749
  o.map((i) => [q(i), { ...i }])
749
750
  );
750
751
  await t.route("**/api/v1/**/cookies**", async (i) => {
@@ -787,9 +788,9 @@ async function je(e) {
787
788
  await i.fallback();
788
789
  });
789
790
  }
790
- async function te(e) {
791
+ async function ee(e) {
791
792
  const { page: t, locale: o } = e, a = {
792
- data: fe(o)
793
+ data: ye(o)
793
794
  };
794
795
  await t.route("**/api/v1/**/na/locales", async (i) => {
795
796
  if (i.request().method() !== "POST") {
@@ -841,7 +842,7 @@ async function F(e) {
841
842
  }
842
843
  async function qe(e) {
843
844
  const { page: t, userPreferences: o, status: a = 200, delayMs: i = 0 } = e, r = {
844
- data: we(o)
845
+ data: be(o)
845
846
  };
846
847
  await t.route("**/api/v1/**/users/me/preferences**", async (s) => {
847
848
  if (s.request().method() !== "GET") {
@@ -874,7 +875,7 @@ function We(e) {
874
875
  e.assetLogoMobileUrl
875
876
  ].filter(Boolean);
876
877
  }
877
- async function oe(e) {
878
+ async function te(e) {
878
879
  const { page: t, uiConfig: o } = e, a = W(o);
879
880
  await Promise.all(
880
881
  We(a).map(async (i) => {
@@ -889,7 +890,7 @@ async function oe(e) {
889
890
  })
890
891
  );
891
892
  }
892
- async function ae(e) {
893
+ async function oe(e) {
893
894
  const { page: t, uiConfig: o, status: a = 200, delayMs: i = 0, responseGate: r } = e, s = "**/api/v1/main/na/ui-config/**", n = {
894
895
  data: W(o)
895
896
  };
@@ -920,17 +921,17 @@ async function ze(e) {
920
921
  uiConfigRouteOptions: f,
921
922
  userPreferences: m
922
923
  } = e;
923
- await ae({
924
+ await oe({
924
925
  page: t,
925
926
  uiConfig: y,
926
927
  ...f
927
- }), await oe({
928
+ }), await te({
928
929
  page: t,
929
930
  uiConfig: y
930
931
  }), await Ne({
931
932
  page: t,
932
933
  session: p
933
- }), await te({
934
+ }), await ee({
934
935
  page: t,
935
936
  locale: s
936
937
  }), await qe({
@@ -980,7 +981,7 @@ async function Qe(e) {
980
981
  hostModuleId: u = Je,
981
982
  alarmCount: R,
982
983
  menuPosition: A = "sidebar"
983
- } = e, c = de({
984
+ } = e, c = le({
984
985
  moduleId: o,
985
986
  title: a,
986
987
  debugPort: i,
@@ -1142,7 +1143,7 @@ const nt = st({
1142
1143
  property: "__M4L_REALTIME_RUNTIMES__",
1143
1144
  purpose: "Store the shared realtime runtime registry for the current browser session.",
1144
1145
  stability: "internal"
1145
- }), ie = g({
1146
+ }), ae = g({
1146
1147
  active: !0,
1147
1148
  cleanup: "none",
1148
1149
  codeRefs: [
@@ -1400,7 +1401,7 @@ const nt = st({
1400
1401
  }), B = [
1401
1402
  nt,
1402
1403
  ct,
1403
- ie,
1404
+ ae,
1404
1405
  lt,
1405
1406
  dt,
1406
1407
  ut,
@@ -1729,7 +1730,7 @@ const v = "gclick-frontend-diagnostic-policies", _ = [
1729
1730
  Object.fromEntries(
1730
1731
  At.map((e) => [e.key, e])
1731
1732
  );
1732
- const Ao = ie.property;
1733
+ const Ao = ae.property;
1733
1734
  function Po(e) {
1734
1735
  return globalThis[e.realtimePerformanceProperty]?.motionMetrics?.motionAuthority ?? null;
1735
1736
  }
@@ -1759,11 +1760,11 @@ async function Co(e) {
1759
1760
  page: t,
1760
1761
  moduleId: o,
1761
1762
  isAuth: !0,
1762
- moduleDictionary: ce(a)
1763
+ moduleDictionary: ne(a)
1763
1764
  });
1764
1765
  }
1765
1766
  async function Mt(e) {
1766
- const { page: t, responseBody: o, status: a = 401 } = e, i = ge(o);
1767
+ const { page: t, responseBody: o, status: a = 401 } = e, i = me(o);
1767
1768
  await t.route("**/api/v1/**/auth/login**", async (r) => {
1768
1769
  if (r.request().method() !== "GET") {
1769
1770
  await r.fallback();
@@ -1778,16 +1779,16 @@ async function Mt(e) {
1778
1779
  }
1779
1780
  async function Io(e) {
1780
1781
  const { page: t, moduleId: o, moduleDictionary: a, locale: i, uiConfig: r, uiConfigRouteOptions: s } = e;
1781
- await ae({
1782
+ await oe({
1782
1783
  page: t,
1783
1784
  uiConfig: r,
1784
1785
  ...s
1785
- }), await oe({
1786
+ }), await te({
1786
1787
  page: t,
1787
1788
  uiConfig: r
1788
1789
  }), await Mt({
1789
1790
  page: t
1790
- }), await te({
1791
+ }), await ee({
1791
1792
  page: t,
1792
1793
  locale: i
1793
1794
  }), await F({
@@ -1851,7 +1852,7 @@ async function Bo(e) {
1851
1852
  await n.fulfill({
1852
1853
  status: s,
1853
1854
  contentType: "application/json",
1854
- body: JSON.stringify(se({ data: a, pagerPage: i, total: r }))
1855
+ body: JSON.stringify(re({ data: a, pagerPage: i, total: r }))
1855
1856
  });
1856
1857
  });
1857
1858
  }
@@ -1936,31 +1937,31 @@ async function xo(e) {
1936
1937
  );
1937
1938
  }
1938
1939
  export {
1939
- Oe as HOST_MOBILE_NAV_TOGGLE_NAME,
1940
+ Le as HOST_MOBILE_NAV_TOGGLE_NAME,
1940
1941
  yo as LIST_FILTERS_STATE_COOKIE,
1941
1942
  Qt as LIST_HEADER_POPOVER_BASE_ACTIONS,
1942
1943
  fo as LIST_SORTS_STATE_COOKIE,
1943
- Te as applyListFilterAndCaptureRequest,
1944
+ Se as applyListFilterAndCaptureRequest,
1944
1945
  mo as applyListFiltersAndCaptureRequest,
1945
1946
  wo as applyListSortAndCaptureRequest,
1946
1947
  xt as attachJson,
1947
1948
  to as clickListHeaderPopoverAction,
1948
1949
  oo as closeListHeaderPopover,
1949
- Me as closeViewModeSwitcherDataGrid,
1950
+ Pe as closeViewModeSwitcherDataGrid,
1950
1951
  K as createHostAreaFixture,
1951
- de as createHostAuthenticatedMfMenuFixture,
1952
- ce as createHostAuthenticatedMfModuleDictionaryFixture,
1953
- ue as createHostAuthenticatedSessionFixture,
1954
- me as createHostCookieFixture,
1955
- ge as createHostGuestSessionFixture,
1956
- fe as createHostLocaleFixture,
1952
+ le as createHostAuthenticatedMfMenuFixture,
1953
+ ne as createHostAuthenticatedMfModuleDictionaryFixture,
1954
+ de as createHostAuthenticatedSessionFixture,
1955
+ pe as createHostCookieFixture,
1956
+ me as createHostGuestSessionFixture,
1957
+ ye as createHostLocaleFixture,
1957
1958
  Ut as createHostMfPreviewDynamicParamsFixture,
1958
1959
  C as createHostModuleDictionaryFixture,
1959
1960
  W as createHostUiConfigFixture,
1960
- we as createHostUserPreferencesFixture,
1961
- se as createListResponseFixture,
1961
+ be as createHostUserPreferencesFixture,
1962
+ re as createListResponseFixture,
1962
1963
  zt as doubleClickListRow,
1963
- Pe as expectViewModeDataGrid,
1964
+ Ae as expectViewModeDataGrid,
1964
1965
  Yt as formatFailedChecks,
1965
1966
  io as getAllColumnAlignmentsViewTableDataGrid,
1966
1967
  ro as getAllColumnKeysViewTableDataGrid,
@@ -1968,20 +1969,20 @@ export {
1968
1969
  vo as getAvailableViewModesDataGrid,
1969
1970
  Xt as getFocusedCellPositionListDataGrid,
1970
1971
  jt as getFormActionButton,
1971
- ve as getFormActionsContainer,
1972
+ he as getFormActionsContainer,
1972
1973
  Gt as getFormConfirmDialog,
1973
- he as getFormContainer,
1974
+ we as getFormContainer,
1974
1975
  z as getFormField,
1975
1976
  Vt as getFormSelectOptions,
1976
1977
  Kt as getListCell,
1977
1978
  Q as getListColumnHeader,
1978
1979
  X as getListColumnHeaderButtons,
1979
- ke as getListColumnKeys,
1980
- _e as getListColumnWidth,
1980
+ _e as getListColumnKeys,
1981
+ ve as getListColumnWidth,
1981
1982
  k as getListDataGrid,
1982
1983
  J as getListDataRows,
1983
- Re as getListDetailAccordion,
1984
- Ee as getListDetailAccordionRegions,
1984
+ ke as getListDetailAccordion,
1985
+ Re as getListDetailAccordionRegions,
1985
1986
  no as getListDetailEmptyState,
1986
1987
  co as getListDetailField,
1987
1988
  uo as getListDetailFieldLabels,
@@ -1992,7 +1993,7 @@ export {
1992
1993
  ho as getListSortFieldNames,
1993
1994
  Ro as getRenderedRecordsDataGrid,
1994
1995
  Nt as getToast,
1995
- Ae as getViewModeDataGrid,
1996
+ Te as getViewModeDataGrid,
1996
1997
  Mo as hasRealtimeMarkerContexts,
1997
1998
  ko as hideAllColumnsDataGrid,
1998
1999
  Ue as installHostAlarmsCountRoute,
@@ -2004,13 +2005,13 @@ export {
2004
2005
  je as installHostCookiesRoute,
2005
2006
  Io as installHostGuestBootstrapRoutes,
2006
2007
  Mt as installHostGuestSessionRoute,
2007
- te as installHostLocaleRoute,
2008
+ ee as installHostLocaleRoute,
2008
2009
  Ve as installHostMenusRoute,
2009
2010
  F as installHostModuleDictionaryRoute,
2010
2011
  Fo as installHostPasswordNewRoute,
2011
2012
  Ho as installHostPasswordResetRoute,
2012
- oe as installHostUiConfigAssetRoutes,
2013
- ae as installHostUiConfigRoute,
2013
+ te as installHostUiConfigAssetRoutes,
2014
+ oe as installHostUiConfigRoute,
2014
2015
  qe as installHostUserPreferencesRoute,
2015
2016
  Bo as installListEndpointRoute,
2016
2017
  xo as installMicrofrontendRenderStub,
@@ -2018,7 +2019,7 @@ export {
2018
2019
  Lo as isRealtimeDeviceSelected,
2019
2020
  Do as isRealtimeDeviceSelectedOrDebugPanelVisible,
2020
2021
  po as loadListDetailLogsAndCaptureRequest,
2021
- De as openColumnSettingsDataGrid,
2022
+ Me as openColumnSettingsDataGrid,
2022
2023
  $t as openFormSelectAndCaptureRequest,
2023
2024
  Eo as openHostAccountMenuModule,
2024
2025
  To as openHostAuthenticatedMfPreviewModule,
@@ -7,6 +7,8 @@ export type ToasterFixture = TestCallback<number> & {
7
7
  warning: TestCallback<number>;
8
8
  };
9
9
  export interface HostToolsFixture {
10
+ getCookie: <T = unknown>(containerId: string, cookieId: string) => Promise<T | undefined>;
11
+ setCookie: (containerId: string, cookieId: string, value: unknown) => void;
10
12
  events_add_listener: TestCallback;
11
13
  events_emit: TestCallback;
12
14
  events_remove_listener: TestCallback;
@@ -16,6 +18,8 @@ export interface HostToolsFixture {
16
18
  toast: ToasterFixture;
17
19
  }
18
20
  export interface HostToolsFixtureOverrides {
21
+ getCookie?: HostToolsFixture['getCookie'];
22
+ setCookie?: HostToolsFixture['setCookie'];
19
23
  events_add_listener?: TestCallback;
20
24
  events_emit?: TestCallback;
21
25
  events_remove_listener?: TestCallback;
@@ -29,8 +29,6 @@ export declare function toggleListDetailAccordion(scope: ListDatagridScope, name
29
29
  * tree — so the count equals the number of currently-open accordions. Prefer this
30
30
  * over a field's visibility for open/close assertions, because MUI clips collapsed
31
31
  * content (a field can stay "visible" to Playwright while clipped).
32
- * Scope to the shared Accordion's contentinfo container with a heading: the host
33
- * sidebar and favorites also expose regions, but are not record accordions.
34
32
  */
35
33
  export declare function getListDetailAccordionRegions(scope: ListDatagridScope): Locator;
36
34
  /**
@@ -8,7 +8,7 @@ import type { Page } from '@playwright/test';
8
8
  export declare const HOST_MOBILE_NAV_TOGGLE_NAME = "N_D:[appbar.tooltip_toogle_menu]";
9
9
  /**
10
10
  * Open a host-shell module on the MOBILE layout: click the appbar hamburger to
11
- * reveal the nav drawer, then click the module's navigation button. On mobile the host
11
+ * reveal the nav drawer, then click the module's menu item. On mobile the host
12
12
  * replaces the desktop sidebar with this drawer, so the desktop sidebar flow does
13
13
  * not apply.
14
14
  */
package/vitest/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { D as o, a as t, M as c, f as s, v as r, y as M, s as l, k as n, h as i, u as k, z as p, p as d, l as u, o as m, P as C, G as g, H as F, J as A, I as P, N as S, K as E, L, O as R, Q as f, R as D, S as _, T as v, U as G, V as B, W as I, m as O, q as h, j as x, n as H, Y as T, X as y, Z as N, i as b, t as W, r as w, d as K, b as U, c as V, e as z, g as Y, B as Z, A as j, C as q, w as J, E as Q, F as X, x as $ } from "../chunks/reactLeaflet-Cffkauof.js";
1
+ import { D as o, a as t, M as c, f as s, v as r, y as M, s as l, k as n, h as i, u as k, z as p, p as d, l as u, o as m, P as C, G as g, H as F, J as A, I as P, N as S, K as E, L, O as R, Q as f, R as D, S as _, T as v, U as G, V as B, W as I, m as O, q as h, j as x, n as H, Y as T, X as y, Z as N, i as b, t as W, r as w, d as K, b as U, c as V, e as z, g as Y, B as Z, A as j, C as q, w as J, E as Q, F as X, x as $ } from "../chunks/reactLeaflet-DvbdKAVA.js";
2
2
  export {
3
3
  o as DEFAULT_RHF_SUBMIT_REF_GLOBAL_KEY,
4
4
  t as M4L_APP_DATAGRID_SEMANTIC_WIDTHS,
@@ -1,3 +0,0 @@
1
- import type { Locator, Page } from '@playwright/test';
2
- /** Resolve a destination's native button in the host disclosure navigation. */
3
- export declare function getHostSidebarModuleButton(page: Page, moduleTitle: string, exact?: boolean): Locator;