@m4l/testing 0.0.23 → 1.0.1

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.
Files changed (211) hide show
  1. package/README.md +679 -0
  2. package/chunks/reactLeaflet-Cffkauof.js +1846 -0
  3. package/chunks/render-CsuV8xqo.js +17 -0
  4. package/chunks/userPreferences-BmOgRaIX.js +493 -0
  5. package/index.js +76 -25
  6. package/mocks/index.js +41 -0
  7. package/package.json +85 -102
  8. package/playwright/index.js +2041 -0
  9. package/rtl/index.js +180 -0
  10. package/types/libs/observability/mf/src/browserRuntimeHandles.d.ts +112 -0
  11. package/types/libs/observability/mf/src/diagnosticLogging.d.ts +2 -0
  12. package/types/libs/observability/mf/src/diagnosticPolicies/catalog.d.ts +267 -0
  13. package/types/libs/observability/mf/src/diagnosticPolicies/contracts.d.ts +64 -0
  14. package/types/libs/observability/mf/src/diagnosticPolicies/host.d.ts +139 -0
  15. package/types/libs/observability/mf/src/diagnosticPolicies/index.d.ts +6 -0
  16. package/types/libs/observability/mf/src/diagnosticPolicies/operativeMyGpsDevices.d.ts +104 -0
  17. package/types/libs/observability/mf/src/diagnosticPolicies/sharedReportsList.d.ts +44 -0
  18. package/types/libs/observability/mf/src/diagnosticPolicyKeys.d.ts +34 -0
  19. package/types/libs/observability/mf/src/index.d.ts +14 -0
  20. package/types/libs/observability/mf/src/runtimeSmoke.d.ts +13 -0
  21. package/types/libs/observability/mf/src/telemetry.d.ts +2 -0
  22. package/types/libs/observability/shared/src/diagnosticLogging.d.ts +97 -0
  23. package/types/libs/observability/shared/src/index.d.ts +6 -0
  24. package/types/libs/observability/shared/src/runtimeHandles.d.ts +27 -0
  25. package/types/libs/observability/shared/src/telemetry.d.ts +179 -0
  26. package/types/packages/testing/mocks/src/constants.d.ts +10 -0
  27. package/types/packages/testing/mocks/src/fixtures.d.ts +258 -0
  28. package/types/packages/testing/mocks/src/helpers/environment.d.ts +44 -0
  29. package/types/packages/testing/mocks/src/helpers/hostTools.d.ts +10 -0
  30. package/types/packages/testing/mocks/src/helpers/index.d.ts +5 -0
  31. package/types/packages/testing/mocks/src/helpers/moduleDictionary.d.ts +9 -0
  32. package/types/packages/testing/mocks/src/helpers/toaster.d.ts +9 -0
  33. package/types/packages/testing/mocks/src/helpers/userPreferences.d.ts +17 -0
  34. package/types/packages/testing/mocks/src/index.d.ts +4 -0
  35. package/types/packages/testing/mocks/src/types.d.ts +233 -0
  36. package/types/packages/testing/playwright/src/fixtures/createHostAreaFixture.d.ts +5 -0
  37. package/types/packages/testing/playwright/src/fixtures/createHostAuthenticatedMfMenuFixture.d.ts +5 -0
  38. package/types/packages/testing/playwright/src/fixtures/createHostAuthenticatedMfModuleDictionaryFixture.d.ts +5 -0
  39. package/types/packages/testing/playwright/src/fixtures/createHostAuthenticatedSessionFixture.d.ts +6 -0
  40. package/types/packages/testing/playwright/src/fixtures/createHostCookieFixture.d.ts +5 -0
  41. package/types/packages/testing/playwright/src/fixtures/createHostGuestSessionFixture.d.ts +5 -0
  42. package/types/packages/testing/playwright/src/fixtures/createHostLocaleFixture.d.ts +5 -0
  43. package/types/packages/testing/playwright/src/fixtures/createHostMfPreviewDynamicParamsFixture.d.ts +5 -0
  44. package/types/packages/testing/playwright/src/fixtures/createHostModuleDictionaryFixture.d.ts +11 -0
  45. package/types/packages/testing/playwright/src/fixtures/createHostUiConfigFixture.d.ts +7 -0
  46. package/types/packages/testing/playwright/src/fixtures/createHostUserPreferencesFixture.d.ts +6 -0
  47. package/types/packages/testing/playwright/src/fixtures/createListResponseFixture.d.ts +6 -0
  48. package/types/packages/testing/playwright/src/fixtures/index.d.ts +12 -0
  49. package/types/packages/testing/playwright/src/helpers/attachJson.d.ts +9 -0
  50. package/types/packages/testing/playwright/src/helpers/formAccess.d.ts +53 -0
  51. package/types/packages/testing/playwright/src/helpers/formSelect.d.ts +51 -0
  52. package/types/packages/testing/playwright/src/helpers/formatFailedChecks.d.ts +18 -0
  53. package/types/packages/testing/playwright/src/helpers/index.d.ts +16 -0
  54. package/types/packages/testing/playwright/src/helpers/listDatagrid.d.ts +219 -0
  55. package/types/packages/testing/playwright/src/helpers/listDetail.d.ts +65 -0
  56. package/types/packages/testing/playwright/src/helpers/listFilter.d.ts +27 -0
  57. package/types/packages/testing/playwright/src/helpers/listSort.d.ts +19 -0
  58. package/types/packages/testing/playwright/src/helpers/listStatePersistence.d.ts +15 -0
  59. package/types/packages/testing/playwright/src/helpers/openHostAccountMenuModule.d.ts +10 -0
  60. package/types/packages/testing/playwright/src/helpers/openHostAuthenticatedMfPreviewModule.d.ts +5 -0
  61. package/types/packages/testing/playwright/src/helpers/openHostMobileSidebarModule.d.ts +15 -0
  62. package/types/packages/testing/playwright/src/helpers/openHostSidebarModule.d.ts +5 -0
  63. package/types/packages/testing/playwright/src/helpers/realtimePerformanceBrowser.d.ts +144 -0
  64. package/types/packages/testing/playwright/src/helpers/viewModeDataGrid.d.ts +67 -0
  65. package/types/packages/testing/playwright/src/helpers/waitForBrowserCondition.d.ts +38 -0
  66. package/types/packages/testing/playwright/src/index.d.ts +11 -0
  67. package/types/packages/testing/playwright/src/installers/index.d.ts +20 -0
  68. package/types/packages/testing/playwright/src/installers/installHostAlarmsCountRoute.d.ts +5 -0
  69. package/types/packages/testing/playwright/src/installers/installHostAreasRoute.d.ts +5 -0
  70. package/types/packages/testing/playwright/src/installers/installHostAuthenticatedBootstrapRoutes.d.ts +6 -0
  71. package/types/packages/testing/playwright/src/installers/installHostAuthenticatedMfModuleDictionaryRoute.d.ts +5 -0
  72. package/types/packages/testing/playwright/src/installers/installHostAuthenticatedMfPreviewBootstrap.d.ts +11 -0
  73. package/types/packages/testing/playwright/src/installers/installHostAuthenticatedSessionRoute.d.ts +6 -0
  74. package/types/packages/testing/playwright/src/installers/installHostCookiesRoute.d.ts +8 -0
  75. package/types/packages/testing/playwright/src/installers/installHostGuestBootstrapRoutes.d.ts +7 -0
  76. package/types/packages/testing/playwright/src/installers/installHostGuestSessionRoute.d.ts +7 -0
  77. package/types/packages/testing/playwright/src/installers/installHostLocaleRoute.d.ts +5 -0
  78. package/types/packages/testing/playwright/src/installers/installHostMenusRoute.d.ts +11 -0
  79. package/types/packages/testing/playwright/src/installers/installHostModuleDictionaryRoute.d.ts +6 -0
  80. package/types/packages/testing/playwright/src/installers/installHostPasswordNewRoute.d.ts +6 -0
  81. package/types/packages/testing/playwright/src/installers/installHostPasswordResetRoute.d.ts +6 -0
  82. package/types/packages/testing/playwright/src/installers/installHostUiConfigAssetRoutes.d.ts +9 -0
  83. package/types/packages/testing/playwright/src/installers/installHostUiConfigRoute.d.ts +7 -0
  84. package/types/packages/testing/playwright/src/installers/installHostUserPreferencesRoute.d.ts +6 -0
  85. package/types/packages/testing/playwright/src/installers/installListEndpointRoute.d.ts +7 -0
  86. package/types/packages/testing/playwright/src/installers/installMicrofrontendRenderStub.d.ts +9 -0
  87. package/types/packages/testing/playwright/src/installers/installModulePrivilegesRoute.d.ts +11 -0
  88. package/types/packages/testing/playwright/src/types.d.ts +598 -0
  89. package/types/packages/testing/rtl/src/index.d.ts +4 -0
  90. package/types/packages/testing/rtl/src/matchMedia.d.ts +10 -0
  91. package/types/packages/testing/rtl/src/render.d.ts +17 -0
  92. package/types/packages/testing/rtl/src/resizeObserver.d.ts +33 -0
  93. package/types/packages/testing/rtl/src/storage.d.ts +10 -0
  94. package/types/packages/testing/src/index.d.ts +6 -0
  95. package/types/packages/testing/vitest/src/constants.d.ts +24 -0
  96. package/types/packages/testing/vitest/src/factories/app/index.d.ts +5 -0
  97. package/types/packages/testing/vitest/src/factories/app/m4lAppBase.d.ts +9 -0
  98. package/types/packages/testing/vitest/src/factories/app/m4lAppComponents.d.ts +20 -0
  99. package/types/packages/testing/vitest/src/factories/app/m4lAppCore.d.ts +12 -0
  100. package/types/packages/testing/vitest/src/factories/app/m4lAppGraphics.d.ts +10 -0
  101. package/types/packages/testing/vitest/src/factories/app/m4lAppLayouts.d.ts +18 -0
  102. package/types/packages/testing/vitest/src/factories/base/index.d.ts +1 -0
  103. package/types/packages/testing/vitest/src/factories/base/m4lBaseComponents.d.ts +13 -0
  104. package/types/packages/testing/vitest/src/factories/index.d.ts +7 -0
  105. package/types/packages/testing/vitest/src/factories/leaflet.d.ts +10 -0
  106. package/types/packages/testing/vitest/src/factories/packages/index.d.ts +7 -0
  107. package/types/packages/testing/vitest/src/factories/packages/m4lPackageBase.d.ts +11 -0
  108. package/types/packages/testing/vitest/src/factories/packages/m4lPackageComponents.d.ts +11 -0
  109. package/types/packages/testing/vitest/src/factories/packages/m4lPackageCore.d.ts +11 -0
  110. package/types/packages/testing/vitest/src/factories/packages/m4lPackageGclick.d.ts +10 -0
  111. package/types/packages/testing/vitest/src/factories/packages/m4lPackageGclickRealtime.d.ts +6 -0
  112. package/types/packages/testing/vitest/src/factories/packages/m4lPackageGraphics.d.ts +9 -0
  113. package/types/packages/testing/vitest/src/factories/packages/m4lPackageLayouts.d.ts +10 -0
  114. package/types/packages/testing/vitest/src/factories/reResizable.d.ts +6 -0
  115. package/types/packages/testing/vitest/src/factories/reactHookForm.d.ts +10 -0
  116. package/types/packages/testing/vitest/src/factories/reactLeaflet.d.ts +10 -0
  117. package/types/packages/testing/vitest/src/fixtures.d.ts +71 -0
  118. package/types/packages/testing/vitest/src/helpers/columnConfigs.d.ts +184 -0
  119. package/types/packages/testing/vitest/src/helpers/elementMocks.d.ts +166 -0
  120. package/types/packages/testing/vitest/src/helpers/filterFields.d.ts +37 -0
  121. package/types/packages/testing/vitest/src/helpers/index.d.ts +9 -0
  122. package/types/packages/testing/vitest/src/helpers/mapStore.d.ts +9 -0
  123. package/types/packages/testing/vitest/src/helpers/moduleContract.d.ts +15 -0
  124. package/types/packages/testing/vitest/src/helpers/rhf.d.ts +8 -0
  125. package/types/packages/testing/vitest/src/helpers/serialization.d.ts +7 -0
  126. package/types/packages/testing/vitest/src/helpers/sortFields.d.ts +28 -0
  127. package/types/packages/testing/vitest/src/helpers/windowSizes.d.ts +1 -0
  128. package/types/packages/testing/vitest/src/index.d.ts +6 -0
  129. package/types/packages/testing/vitest/src/installers/consoleError.d.ts +9 -0
  130. package/types/packages/testing/vitest/src/installers/index.d.ts +2 -0
  131. package/types/packages/testing/vitest/src/installers/rhfSubmit.d.ts +9 -0
  132. package/types/packages/testing/vitest/src/types.d.ts +116 -0
  133. package/vitest/index.js +55 -0
  134. package/e2e/commands/components/Accordions/commands.d.ts +0 -4
  135. package/e2e/commands/components/Accordions/commands.js +0 -19
  136. package/e2e/commands/components/Accordions/types.d.ts +0 -63
  137. package/e2e/commands/components/CommonActions/commands.d.ts +0 -4
  138. package/e2e/commands/components/CommonActions/commands.js +0 -11
  139. package/e2e/commands/components/CommonActions/types.d.ts +0 -20
  140. package/e2e/commands/components/DataGrid/commands.d.ts +0 -4
  141. package/e2e/commands/components/DataGrid/commands.js +0 -42
  142. package/e2e/commands/components/DataGrid/types.d.ts +0 -140
  143. package/e2e/commands/components/DynamicFilter/commands.d.ts +0 -4
  144. package/e2e/commands/components/DynamicFilter/commands.js +0 -12
  145. package/e2e/commands/components/DynamicFilter/types.d.ts +0 -27
  146. package/e2e/commands/components/DynamicSort/commands.d.ts +0 -4
  147. package/e2e/commands/components/DynamicSort/commands.js +0 -10
  148. package/e2e/commands/components/DynamicSort/types.d.ts +0 -26
  149. package/e2e/commands/components/Filters/commands.d.ts +0 -4
  150. package/e2e/commands/components/Filters/commands.js +0 -24
  151. package/e2e/commands/components/Filters/types.d.ts +0 -91
  152. package/e2e/commands/components/MenuActions/commands.d.ts +0 -4
  153. package/e2e/commands/components/MenuActions/commands.js +0 -8
  154. package/e2e/commands/components/MenuActions/types.d.ts +0 -24
  155. package/e2e/commands/components/Popover/commands.d.ts +0 -4
  156. package/e2e/commands/components/Popover/commands.js +0 -8
  157. package/e2e/commands/components/Popover/types.d.ts +0 -15
  158. package/e2e/commands/components/PropertyValue/commands.d.ts +0 -4
  159. package/e2e/commands/components/PropertyValue/commands.js +0 -8
  160. package/e2e/commands/components/PropertyValue/types.d.ts +0 -19
  161. package/e2e/commands/components/Tab/commands.d.ts +0 -4
  162. package/e2e/commands/components/Tab/commands.js +0 -9
  163. package/e2e/commands/components/Tab/types.d.ts +0 -29
  164. package/e2e/commands/components/WindowBase/commands.d.ts +0 -4
  165. package/e2e/commands/components/WindowBase/commands.js +0 -20
  166. package/e2e/commands/components/WindowBase/types.d.ts +0 -84
  167. package/e2e/commands/components/index.d.ts +0 -11
  168. package/e2e/commands/components/index.js +0 -1
  169. package/e2e/commands/index.d.ts +0 -4
  170. package/e2e/commands/index.js +0 -1
  171. package/e2e/commands/intercepts/index.d.ts +0 -2
  172. package/e2e/commands/intercepts/index.js +0 -1
  173. package/e2e/commands/intercepts/noPrivileges/interceptCommands.d.ts +0 -5
  174. package/e2e/commands/intercepts/noPrivileges/interceptCommands.js +0 -15
  175. package/e2e/commands/intercepts/noPrivileges/types.d.ts +0 -8
  176. package/e2e/commands/intercepts/noPrivileges/types.js +0 -1
  177. package/e2e/commands/register.d.ts +0 -4
  178. package/e2e/commands/register.js +0 -18
  179. package/e2e/cypress.d.js +0 -1
  180. package/e2e/cypress.d.ts +0 -23
  181. package/e2e/index.d.ts +0 -1
  182. package/e2e/types.d.ts +0 -4
  183. package/index.d.ts +0 -4
  184. package/index.test.d.ts +0 -1
  185. package/testComponents/DataGrid/helpers.d.ts +0 -5
  186. package/testComponents/DataGrid/helpers.js +0 -95
  187. package/testComponents/DataGrid/index.d.ts +0 -2
  188. package/testComponents/DataGrid/index.js +0 -1
  189. package/testComponents/DataGrid/types.d.ts +0 -54
  190. package/testComponents/DataGrid/types.js +0 -1
  191. package/testComponents/DynamicFilter/helpers.d.ts +0 -5
  192. package/testComponents/DynamicFilter/helpers.js +0 -18
  193. package/testComponents/DynamicFilter/index.d.ts +0 -1
  194. package/testComponents/DynamicFilter/index.js +0 -1
  195. package/testComponents/DynamicFilter/types.d.ts +0 -0
  196. package/testComponents/DynamicSort/helpers.d.ts +0 -5
  197. package/testComponents/DynamicSort/helpers.js +0 -16
  198. package/testComponents/DynamicSort/index.d.ts +0 -1
  199. package/testComponents/DynamicSort/index.js +0 -1
  200. package/testComponents/index.d.ts +0 -3
  201. package/testComponents/index.js +0 -1
  202. package/testTools/constants.d.ts +0 -0
  203. package/testTools/index.d.ts +0 -1
  204. package/testTools/index.js +0 -1
  205. package/testTools/mocks.d.ts +0 -0
  206. package/testTools/setup.d.ts +0 -0
  207. package/testTools/setup.js +0 -1
  208. package/testTools/types.d.ts +0 -0
  209. package/testTools/utils.d.ts +0 -11
  210. package/testTools/utils.js +0 -23
  211. package/vite-env.d.ts +0 -5
@@ -0,0 +1,179 @@
1
+ /**
2
+ * Supported product surfaces that can emit shared telemetry.
3
+ */
4
+ export type TelemetrySurface = 'host' | 'isolation' | 'mobile';
5
+ /**
6
+ * Supported runtime kinds used by the shared telemetry contract.
7
+ */
8
+ export type TelemetryRuntimeKind = 'web' | 'react-native';
9
+ /**
10
+ * Supported web-only product surfaces.
11
+ */
12
+ export type WebTelemetrySurface = Extract<TelemetrySurface, 'host' | 'isolation'>;
13
+ /**
14
+ * Supported mobile-only product surfaces.
15
+ */
16
+ export type MobileTelemetrySurface = Extract<TelemetrySurface, 'mobile'>;
17
+ /**
18
+ * Supported module load sources across web and mobile runtimes.
19
+ */
20
+ export type ModuleLoadSource = 'federation' | 'script-injection' | 'embedded-bundle' | 'native-registry';
21
+ /**
22
+ * Low-cardinality failure reasons emitted by shared telemetry.
23
+ */
24
+ export type ModuleLoadFailureReason = 'manifest_fetch_timeout' | 'manifest_fetch_error' | 'script_load_error' | 'bundle_resolve_error' | 'render_function_missing' | 'render_exception' | 'navigation_blocked' | 'swap_race' | 'component_unmounted' | 'unknown';
25
+ /**
26
+ * Known reasons why one runtime disposed the current module tree.
27
+ */
28
+ export type ModuleUnmountReason = 'navigation' | 'cleanup' | 'screen-exit' | 'host-dispose';
29
+ /**
30
+ * Shared context carried by telemetry events across web and mobile.
31
+ */
32
+ export interface TelemetryContext {
33
+ /**
34
+ * Runtime surface that emitted the event.
35
+ */
36
+ surface: TelemetrySurface;
37
+ /**
38
+ * Runtime technology that emitted the event.
39
+ */
40
+ runtimeKind: TelemetryRuntimeKind;
41
+ /**
42
+ * Product-specific module identifier when the event is module-scoped.
43
+ */
44
+ moduleId?: string;
45
+ /**
46
+ * Product-specific deployed module version.
47
+ */
48
+ moduleVersion?: string;
49
+ /**
50
+ * Stable namespace used by the current runtime to separate module globals.
51
+ */
52
+ moduleNamespace?: string;
53
+ /**
54
+ * Route name when the runtime owns browser-style routing.
55
+ */
56
+ routeName?: string;
57
+ /**
58
+ * Screen name when the runtime owns mobile-style navigation.
59
+ */
60
+ screenName?: string;
61
+ }
62
+ /**
63
+ * Web runtime context carried by telemetry emitted from host and isolation surfaces.
64
+ */
65
+ export interface WebTelemetryContext extends TelemetryContext {
66
+ /**
67
+ * Browser-owned surface that emitted the event.
68
+ */
69
+ surface: WebTelemetrySurface;
70
+ /**
71
+ * Browser runtime technology.
72
+ */
73
+ runtimeKind: 'web';
74
+ }
75
+ /**
76
+ * Mobile runtime context carried by telemetry emitted from React Native surfaces.
77
+ */
78
+ export interface MobileTelemetryContext extends TelemetryContext {
79
+ /**
80
+ * Mobile-owned surface that emitted the event.
81
+ */
82
+ surface: MobileTelemetrySurface;
83
+ /**
84
+ * React Native runtime technology.
85
+ */
86
+ runtimeKind: 'react-native';
87
+ }
88
+ /**
89
+ * Shared semantic attribute keys used by platform adapters.
90
+ */
91
+ export declare const telemetryAttributeKeys: {
92
+ readonly surface: "surface";
93
+ readonly runtimeKind: "runtime.kind";
94
+ readonly moduleId: "module.id";
95
+ readonly moduleVersion: "module.version";
96
+ readonly moduleNamespace: "module.namespace";
97
+ readonly loadSource: "load.source";
98
+ readonly loadAttempt: "load.attempt";
99
+ readonly loadFailureReason: "load.failure.reason";
100
+ readonly routeName: "route.name";
101
+ readonly screenName: "screen.name";
102
+ readonly fromModuleId: "swap.from_module.id";
103
+ readonly toModuleId: "swap.to_module.id";
104
+ readonly unmountReason: "module.unmount.reason";
105
+ };
106
+ type ModuleTelemetryContext<TContext extends TelemetryContext> = TContext & {
107
+ moduleId: string;
108
+ };
109
+ type VersionedModuleTelemetryContext<TContext extends TelemetryContext> = ModuleTelemetryContext<TContext> & {
110
+ moduleVersion: string;
111
+ };
112
+ /**
113
+ * Shared telemetry event family emitted across module load and swap lifecycles.
114
+ */
115
+ export type TelemetryEventFor<TContext extends TelemetryContext> = {
116
+ type: 'module_load_started';
117
+ context: ModuleTelemetryContext<TContext>;
118
+ loadSource: ModuleLoadSource;
119
+ attempt: number;
120
+ } | {
121
+ type: 'module_load_succeeded';
122
+ context: VersionedModuleTelemetryContext<TContext>;
123
+ loadSource: ModuleLoadSource;
124
+ attempt: number;
125
+ totalDurationMs: number;
126
+ resolveDurationMs: number;
127
+ loadDurationMs: number;
128
+ mountDurationMs: number;
129
+ } | {
130
+ type: 'module_load_failed';
131
+ context: ModuleTelemetryContext<TContext>;
132
+ loadSource: ModuleLoadSource;
133
+ attempt: number;
134
+ totalDurationMs: number;
135
+ failureReason: ModuleLoadFailureReason;
136
+ failureDetail?: string;
137
+ } | {
138
+ type: 'module_load_fallback_activated';
139
+ context: ModuleTelemetryContext<TContext>;
140
+ fromLoadSource: ModuleLoadSource;
141
+ toLoadSource: ModuleLoadSource;
142
+ reason: string;
143
+ } | {
144
+ type: 'module_swap_started';
145
+ context: TContext;
146
+ fromModuleId: string;
147
+ toModuleId: string;
148
+ } | {
149
+ type: 'module_swap_succeeded';
150
+ context: TContext;
151
+ fromModuleId: string;
152
+ toModuleId: string;
153
+ totalDurationMs: number;
154
+ } | {
155
+ type: 'module_swap_failed';
156
+ context: TContext;
157
+ fromModuleId: string;
158
+ toModuleId: string;
159
+ totalDurationMs: number;
160
+ failureReason: ModuleLoadFailureReason;
161
+ failureDetail?: string;
162
+ } | {
163
+ type: 'module_unmounted';
164
+ context: ModuleTelemetryContext<TContext>;
165
+ reason?: ModuleUnmountReason;
166
+ };
167
+ /**
168
+ * Platform-neutral telemetry events accepted by shared adapters.
169
+ */
170
+ export type TelemetryEvent = TelemetryEventFor<TelemetryContext>;
171
+ /**
172
+ * Web-only telemetry events accepted by browser adapters.
173
+ */
174
+ export type WebTelemetryEvent = TelemetryEventFor<WebTelemetryContext>;
175
+ /**
176
+ * Mobile-only telemetry events accepted by React Native adapters.
177
+ */
178
+ export type MobileTelemetryEvent = TelemetryEventFor<MobileTelemetryContext>;
179
+ export {};
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Stable module id used by shared testing fixtures that need a deterministic
3
+ * module identity without coupling the fixture back to one package.
4
+ */
5
+ export declare const testModuleId = "testing";
6
+ /**
7
+ * Shared module-name label used by dictionary fixtures when the test only
8
+ * needs a predictable `module_name` value.
9
+ */
10
+ export declare const testModuleName = "label_for_module_name";
@@ -0,0 +1,258 @@
1
+ import { format } from 'date-fns';
2
+ /**
3
+ * Baseline module dictionary fixture for tests that only need one predictable
4
+ * label plus the standard `module_name` field.
5
+ *
6
+ * Extend it locally when the feature under test needs more dictionary keys,
7
+ * but prefer keeping the repeated baseline here instead of rebuilding the
8
+ * same minimal dictionary shape in many packages.
9
+ */
10
+ export declare const moduleDictionaryFixture: {
11
+ data: {
12
+ module_name: string;
13
+ label1: string;
14
+ };
15
+ comp1: {
16
+ key1: string;
17
+ };
18
+ };
19
+ /**
20
+ * Default privileges query fixture for tests that only need one privilege id.
21
+ */
22
+ export declare const privilegesQueryFixture: string[];
23
+ /**
24
+ * Matching privileges response fixture for `privilegesQueryFixture`.
25
+ *
26
+ * Use this pair when the test needs deterministic privilege loading data but
27
+ * the exact privilege names are not the focus of the scenario.
28
+ */
29
+ export declare const privilegesResponseFixture: {
30
+ data: {
31
+ priv1: true;
32
+ };
33
+ };
34
+ /**
35
+ * Minimal domain payload for tests that need deterministic company branding
36
+ * fields without depending on a real backend response.
37
+ */
38
+ export declare const domainFixture: {
39
+ data: {
40
+ name: string;
41
+ company_logo_small_url: string;
42
+ company_logo_normal_url: string;
43
+ };
44
+ };
45
+ /**
46
+ * Domain-country fixture for zero-decimal currencies.
47
+ *
48
+ * Use it when the formatter or business rule under test only needs to know
49
+ * that the currency rounds to whole numbers.
50
+ */
51
+ export declare const domainCountryNoDecimalsFixture: {
52
+ id: number;
53
+ currency: string;
54
+ currency_decimal_digits: number;
55
+ decimal_symbol: string;
56
+ thousands_symbol: string;
57
+ };
58
+ /**
59
+ * Domain-country fixture for currencies that keep two decimal places.
60
+ */
61
+ export declare const domainCountryTwoDecimalsFixture: {
62
+ id: number;
63
+ currency: string;
64
+ currency_decimal_digits: number;
65
+ decimal_symbol: string;
66
+ thousands_symbol: string;
67
+ };
68
+ /**
69
+ * Effective user-preferences fixture shared by test and Storybook harnesses.
70
+ */
71
+ export declare const userPreferencesFixture: {
72
+ decimalSymbol: string;
73
+ thousandsSymbol: string;
74
+ dateFormat: string;
75
+ timeFormat: string;
76
+ timeZone: {
77
+ id: number;
78
+ name: string;
79
+ title: string;
80
+ baseOffset: number;
81
+ dstOffset: number;
82
+ countryCode: string;
83
+ };
84
+ locale: string;
85
+ magnitudesSystemId: number;
86
+ properties: {
87
+ baseMagnitudeId: string;
88
+ id: string;
89
+ magnitudeUnitBase: {
90
+ id: string;
91
+ symbol: string;
92
+ };
93
+ magnitudeUnitUser: {
94
+ id: string;
95
+ symbol: string;
96
+ };
97
+ factor: {
98
+ factorX0: number;
99
+ factorX1: number;
100
+ factorX2: number;
101
+ };
102
+ }[];
103
+ currency: string;
104
+ currencyDecimalDigits: number;
105
+ };
106
+ /**
107
+ * Raw `/users/me/preferences` response `data` fixture that mirrors backend casing.
108
+ */
109
+ export declare const userPreferencesApiDataFixture: {
110
+ locale: {
111
+ id: string;
112
+ lang: string;
113
+ region: string;
114
+ script: string;
115
+ name: string;
116
+ url_icon: string;
117
+ };
118
+ time_zone: {
119
+ id: number;
120
+ name: string;
121
+ title: string;
122
+ base_offset: number;
123
+ dst_offset: number;
124
+ country_code: string;
125
+ };
126
+ magnitudes_system: {
127
+ id: number;
128
+ name: string;
129
+ };
130
+ properties: {
131
+ base_magnitude_id: string;
132
+ id: string;
133
+ value: {
134
+ magnitude_unit_base: {
135
+ id: string;
136
+ symbol: string;
137
+ };
138
+ magnitude_unit_user: {
139
+ id: string;
140
+ symbol: string;
141
+ };
142
+ factor: {
143
+ factor_x0: number;
144
+ factor_x1: number;
145
+ factor_x2: number;
146
+ };
147
+ };
148
+ }[];
149
+ date_format: {
150
+ id: number;
151
+ format: string;
152
+ name: string;
153
+ };
154
+ time_format: {
155
+ id: number;
156
+ format: string;
157
+ name: string;
158
+ };
159
+ decimal_symbol: string;
160
+ thousands_symbol: string;
161
+ currency: string;
162
+ currency_decimal_digits: number;
163
+ };
164
+ /**
165
+ * Neutral Axios-like result payload for tests that only need a simple `data`
166
+ * envelope from a network operation.
167
+ */
168
+ export declare const axiosOperationResultFixture: {
169
+ data: {
170
+ a: number;
171
+ b: string;
172
+ };
173
+ };
174
+ /**
175
+ * Deterministic network-request fixture for tests that verify request shaping
176
+ * rather than endpoint-specific business semantics.
177
+ */
178
+ export declare const networkRequestFixture: {
179
+ method: string;
180
+ endPoint: string;
181
+ parms: {};
182
+ };
183
+ /**
184
+ * Full environment fixture for providers or context consumers that require a
185
+ * complete `EnvironmentType`-compatible object.
186
+ *
187
+ * Prefer `createEnvironmentFixture(...)` when the test needs local overrides,
188
+ * and keep local inline environment objects for truly feature-specific values
189
+ * only.
190
+ */
191
+ export declare const environmentFixture: {
192
+ isLocalhost: true;
193
+ host: string;
194
+ database: string;
195
+ domain_token: string;
196
+ domainToken: string;
197
+ host_api_local: string;
198
+ hostApiLocal: string;
199
+ host_api_remote: string;
200
+ hostApiRemote: string;
201
+ hostRemote: string;
202
+ hostApiIcons: string;
203
+ host_static_assets: string;
204
+ environment_assets: string;
205
+ isIsolatation: false;
206
+ isMicroFrontend: false;
207
+ getModuleUrlIconAsset: () => string;
208
+ };
209
+ /**
210
+ * Lightweight `useEnvironment()` value fixture for tests that only consume the
211
+ * commonly read environment fields instead of the full provider contract.
212
+ *
213
+ * Use this when mocking `useEnvironment()` directly. For provider values or
214
+ * stricter contract checks, prefer `environmentFixture` instead.
215
+ */
216
+ export declare const useEnvironmentValueFixture: {
217
+ host_static_assets: string;
218
+ environment_assets: string;
219
+ host_api_local: string;
220
+ hostApiLocal: string;
221
+ host_api_remote: string;
222
+ hostApiRemote: string;
223
+ domain_token: string;
224
+ domainToken: string;
225
+ hostRemote: string;
226
+ hostApiIcons: string;
227
+ };
228
+ /**
229
+ * Neutral base-provider payload used by tests that only need a tiny stable
230
+ * object shape to satisfy generic provider contracts.
231
+ */
232
+ export declare const baseProviderValueFixture: {
233
+ a: string;
234
+ b: number;
235
+ };
236
+ /**
237
+ * Deterministic formatter values shared by tests that need date, number, or
238
+ * currency formatting without mounting the real graphics formatter pipeline.
239
+ */
240
+ export declare const formattersFixture: {
241
+ currencyFormatter: {
242
+ decimalDigits: number;
243
+ code: string;
244
+ };
245
+ numberFormatter: {
246
+ decimalSymbol: string;
247
+ thousandsSymbol: string;
248
+ };
249
+ dateFormatter: {
250
+ dateFormat: string;
251
+ dateMask: string;
252
+ datetimeFormat: string;
253
+ datetimeMask: string;
254
+ timeFormat: string;
255
+ timeMask: string;
256
+ formatDate: typeof format;
257
+ };
258
+ };
@@ -0,0 +1,44 @@
1
+ import type { EnvironmentFixture, UseEnvironmentValueFixture } from '../types';
2
+ /**
3
+ * Builds a full environment fixture on top of the shared baseline.
4
+ *
5
+ * Use this when the test needs a provider-compatible environment object and
6
+ * only a few fields differ from the standard workspace baseline.
7
+ */
8
+ export declare function createEnvironmentFixture(overrides?: Partial<EnvironmentFixture>): {
9
+ isLocalhost: boolean;
10
+ host: string;
11
+ database: string;
12
+ domain_token: string;
13
+ domainToken: string;
14
+ host_api_local: string;
15
+ hostApiLocal: string;
16
+ host_api_remote: string;
17
+ hostApiRemote: string;
18
+ hostRemote: string;
19
+ hostApiIcons: string;
20
+ host_static_assets: string;
21
+ environment_assets: string;
22
+ isIsolatation: boolean;
23
+ isMicroFrontend: boolean;
24
+ getModuleUrlIconAsset: () => string;
25
+ };
26
+ /**
27
+ * Builds a lighter `useEnvironment()` return value on top of the shared
28
+ * baseline.
29
+ *
30
+ * Prefer this over `createEnvironmentFixture(...)` when the test mocks the
31
+ * hook directly and does not need the full `EnvironmentType` contract.
32
+ */
33
+ export declare function createUseEnvironmentValueFixture(overrides?: Partial<UseEnvironmentValueFixture>): {
34
+ host_static_assets: string;
35
+ environment_assets: string;
36
+ host_api_local: string;
37
+ hostApiLocal: string;
38
+ host_api_remote: string;
39
+ hostApiRemote: string;
40
+ domain_token: string;
41
+ domainToken: string;
42
+ hostRemote: string;
43
+ hostApiIcons: string;
44
+ };
@@ -0,0 +1,10 @@
1
+ import type { HostToolsFixture, HostToolsFixtureOverrides } from '../types';
2
+ /**
3
+ * Builds a neutral host-tools fixture with no-op callbacks and a shared toast
4
+ * stub.
5
+ *
6
+ * Use this when a test needs `useHostTools()` or host-tools provider data but
7
+ * only cares about one or two callbacks. Override only the members that are
8
+ * relevant to the scenario.
9
+ */
10
+ export declare function createHostToolsFixture(overrides?: HostToolsFixtureOverrides): HostToolsFixture;
@@ -0,0 +1,5 @@
1
+ export * from './environment';
2
+ export * from './toaster';
3
+ export * from './hostTools';
4
+ export * from './moduleDictionary';
5
+ export * from './userPreferences';
@@ -0,0 +1,9 @@
1
+ import type { CreateUseModuleDictionaryValueFixtureOptions, UseModuleDictionaryValueFixture } from '../types';
2
+ /**
3
+ * Builds a lightweight `useModuleDictionary()` return value for tests that
4
+ * only need predictable label resolution and a stable module label.
5
+ *
6
+ * Prefer this over rebuilding inline `{ getLabel, getModuleLabel }` objects in
7
+ * each suite. Override only the label behavior that matters to the scenario.
8
+ */
9
+ export declare function createUseModuleDictionaryValueFixture({ fallbackToKey, getLabel, labels, moduleLabel, }?: CreateUseModuleDictionaryValueFixtureOptions): UseModuleDictionaryValueFixture;
@@ -0,0 +1,9 @@
1
+ import type { ToasterFixture } from '../types';
2
+ /**
3
+ * Creates a deterministic toaster stub whose methods always return stable
4
+ * numeric ids.
5
+ *
6
+ * Use this when the test only needs toast-call observability or a valid toast
7
+ * object shape without mounting the real toast runtime.
8
+ */
9
+ export declare function createToasterFixture(): ToasterFixture;
@@ -0,0 +1,17 @@
1
+ import type { UserPreferencesApiDataFixture, UserPreferencesContextValueFixture, UserPreferencesFixture, UserPreferencesMagnitudePropertyFixture } from '../types';
2
+ /**
3
+ * Build one magnitude-property fixture on top of the shared preferences baseline.
4
+ */
5
+ export declare function createUserPreferencesMagnitudePropertyFixture(overrides?: Partial<UserPreferencesMagnitudePropertyFixture>): UserPreferencesMagnitudePropertyFixture;
6
+ /**
7
+ * Build one `useUserPreferences()`-compatible fixture with live conversion helpers.
8
+ */
9
+ export declare function createUserPreferencesContextValueFixture(overrides?: Partial<UserPreferencesFixture>): UserPreferencesContextValueFixture;
10
+ /**
11
+ * Build one normalized user-preferences fixture with optional overrides.
12
+ */
13
+ export declare function createUserPreferencesFixture(overrides?: Partial<UserPreferencesFixture>): UserPreferencesFixture;
14
+ /**
15
+ * Build one raw `/users/me/preferences` API fixture with optional overrides.
16
+ */
17
+ export declare function createUserPreferencesApiDataFixture(overrides?: Partial<UserPreferencesApiDataFixture>): UserPreferencesApiDataFixture;
@@ -0,0 +1,4 @@
1
+ export * from './types';
2
+ export * from './constants';
3
+ export * from './fixtures';
4
+ export * from './helpers';