@m4l/testing 0.0.24 → 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 (235) 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 +84 -69
  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/Form/commands.d.ts +0 -4
  153. package/e2e/commands/components/Form/commands.js +0 -11
  154. package/e2e/commands/components/Form/cypress/assertInitialFormState/assertInitialFormState.d.ts +0 -5
  155. package/e2e/commands/components/Form/cypress/assertInitialFormState/assertInitialFormState.js +0 -20
  156. package/e2e/commands/components/Form/cypress/assertInitialFormState/type.d.ts +0 -105
  157. package/e2e/commands/components/Form/cypress/assertInitialFormState/type.js +0 -1
  158. package/e2e/commands/components/Form/cypress/assertMandatoryFields/assertMandatoryFields.d.ts +0 -17
  159. package/e2e/commands/components/Form/cypress/assertMandatoryFields/assertMandatoryFields.js +0 -14
  160. package/e2e/commands/components/Form/cypress/assertMandatoryFields/type.d.ts +0 -28
  161. package/e2e/commands/components/Form/cypress/assertMandatoryFields/type.js +0 -1
  162. package/e2e/commands/components/Form/cypress/constants.d.ts +0 -3
  163. package/e2e/commands/components/Form/cypress/constants.js +0 -6
  164. package/e2e/commands/components/Form/cypress/fillAndAssertFormFields/fillAndAssertFormFields.d.ts +0 -8
  165. package/e2e/commands/components/Form/cypress/fillAndAssertFormFields/fillAndAssertFormFields.js +0 -29
  166. package/e2e/commands/components/Form/cypress/fillAndAssertFormFields/type.d.ts +0 -5
  167. package/e2e/commands/components/Form/cypress/fillAndAssertFormFields/type.js +0 -1
  168. package/e2e/commands/components/Form/cypress/getFormScope/getFormScope.d.ts +0 -20
  169. package/e2e/commands/components/Form/cypress/getFormScope/getFormScope.js +0 -8
  170. package/e2e/commands/components/Form/cypress/proceedFormStep/proceedFormStep.d.ts +0 -10
  171. package/e2e/commands/components/Form/cypress/proceedFormStep/proceedFormStep.js +0 -6
  172. package/e2e/commands/components/Form/cypress/proceedFormStep/type.d.ts +0 -13
  173. package/e2e/commands/components/Form/helpers/getFieldNameDomElement.d.ts +0 -7
  174. package/e2e/commands/components/Form/helpers/getFieldNameDomElement.js +0 -13
  175. package/e2e/commands/components/Form/types.d.ts +0 -88
  176. package/e2e/commands/components/MenuActions/commands.d.ts +0 -4
  177. package/e2e/commands/components/MenuActions/commands.js +0 -8
  178. package/e2e/commands/components/MenuActions/types.d.ts +0 -24
  179. package/e2e/commands/components/Popover/commands.d.ts +0 -4
  180. package/e2e/commands/components/Popover/commands.js +0 -8
  181. package/e2e/commands/components/Popover/types.d.ts +0 -15
  182. package/e2e/commands/components/PropertyValue/commands.d.ts +0 -4
  183. package/e2e/commands/components/PropertyValue/commands.js +0 -8
  184. package/e2e/commands/components/PropertyValue/types.d.ts +0 -19
  185. package/e2e/commands/components/Tab/commands.d.ts +0 -4
  186. package/e2e/commands/components/Tab/commands.js +0 -9
  187. package/e2e/commands/components/Tab/types.d.ts +0 -29
  188. package/e2e/commands/components/WindowBase/commands.d.ts +0 -4
  189. package/e2e/commands/components/WindowBase/commands.js +0 -24
  190. package/e2e/commands/components/WindowBase/types.d.ts +0 -100
  191. package/e2e/commands/components/index.d.ts +0 -12
  192. package/e2e/commands/components/index.js +0 -1
  193. package/e2e/commands/index.d.ts +0 -7
  194. package/e2e/commands/index.js +0 -1
  195. package/e2e/commands/intercepts/index.d.ts +0 -2
  196. package/e2e/commands/intercepts/index.js +0 -1
  197. package/e2e/commands/intercepts/noPrivileges/interceptCommands.d.ts +0 -5
  198. package/e2e/commands/intercepts/noPrivileges/interceptCommands.js +0 -15
  199. package/e2e/commands/intercepts/noPrivileges/types.d.ts +0 -8
  200. package/e2e/commands/intercepts/noPrivileges/types.js +0 -1
  201. package/e2e/commands/register.d.ts +0 -4
  202. package/e2e/commands/register.js +0 -19
  203. package/e2e/cypress.d.js +0 -1
  204. package/e2e/cypress.d.ts +0 -24
  205. package/e2e/index.d.ts +0 -1
  206. package/e2e/types.d.ts +0 -4
  207. package/index.d.ts +0 -4
  208. package/index.test.d.ts +0 -1
  209. package/testComponents/DataGrid/helpers.d.ts +0 -5
  210. package/testComponents/DataGrid/helpers.js +0 -95
  211. package/testComponents/DataGrid/index.d.ts +0 -2
  212. package/testComponents/DataGrid/index.js +0 -1
  213. package/testComponents/DataGrid/types.d.ts +0 -54
  214. package/testComponents/DataGrid/types.js +0 -1
  215. package/testComponents/DynamicFilter/helpers.d.ts +0 -5
  216. package/testComponents/DynamicFilter/helpers.js +0 -18
  217. package/testComponents/DynamicFilter/index.d.ts +0 -1
  218. package/testComponents/DynamicFilter/index.js +0 -1
  219. package/testComponents/DynamicFilter/types.d.ts +0 -0
  220. package/testComponents/DynamicSort/helpers.d.ts +0 -5
  221. package/testComponents/DynamicSort/helpers.js +0 -16
  222. package/testComponents/DynamicSort/index.d.ts +0 -1
  223. package/testComponents/DynamicSort/index.js +0 -1
  224. package/testComponents/index.d.ts +0 -3
  225. package/testComponents/index.js +0 -1
  226. package/testTools/constants.d.ts +0 -0
  227. package/testTools/index.d.ts +0 -1
  228. package/testTools/index.js +0 -1
  229. package/testTools/mocks.d.ts +0 -0
  230. package/testTools/setup.d.ts +0 -0
  231. package/testTools/setup.js +0 -1
  232. package/testTools/types.d.ts +0 -0
  233. package/testTools/utils.d.ts +0 -11
  234. package/testTools/utils.js +0 -23
  235. package/vite-env.d.ts +0 -5
package/index.d.ts DELETED
@@ -1,4 +0,0 @@
1
- export * from './e2e/cypress.d';
2
- export * from './e2e/commands';
3
- export * from './testComponents';
4
- export * from './testTools';
package/index.test.d.ts DELETED
@@ -1 +0,0 @@
1
- export {};
@@ -1,5 +0,0 @@
1
- import { TestingColumn, TestingColumnConfig } from './types';
2
- /**
3
- * Test the column configs
4
- */
5
- export declare const testColumnConfigs: <T>(columns: Array<TestingColumn>, configs: readonly TestingColumnConfig<T>[]) => void;
@@ -1,95 +0,0 @@
1
- import { expect as l } from "vitest";
2
- const i = (t) => t?.type === "nested", k = (t) => t?.type === "date", C = (t) => t?.type === "boolean", d = (t) => t?.type === "setCheck", n = (t) => t?.type === "price", p = (t) => t?.type === "points", y = (t) => t?.type === "uncertainty", f = (t) => t?.type === "concatenated", m = (t) => t?.type === "chipStatus", V = (t) => t?.type === "tags", I = (t) => t?.type === "icon", P = (t) => t?.type === "color", E = (t) => t?.type === "image", B = (t, r) => {
3
- l(t).toHaveLength(r.length), r.forEach((e, u) => {
4
- const o = t[u], h = e.hookCall?.type ?? "none";
5
- describe(`Column ${u + 1}: ${e.key} (${h})`, () => {
6
- if (it("should have the correct basic properties", () => {
7
- l(o.key).toBe(e.key), l(o.name).toBe(e.name), l(o.type).toBe(e.type), l(o.align).toBe(e.align), l(o.width).toBe(e.width), l(o.visible).toBe(e.visible), e.fixed && l(o.fixed).toBe(e.fixed);
8
- }), e.hookCall) {
9
- let a = !0, s = !0;
10
- it("should have the correct hook call properties", () => {
11
- if (i(e.hookCall))
12
- l(o.testProps).toEqual({
13
- fieldValue: e.hookCall.fieldValue,
14
- defaultValue: e.hookCall.defaultValue,
15
- Component: e.hookCall.Component
16
- });
17
- else if (k(e.hookCall))
18
- l(o.testProps).toEqual({
19
- fieldValue: e.hookCall.fieldValue,
20
- presentationType: e.hookCall.presentationType
21
- });
22
- else if (C(e.hookCall))
23
- l(o.testProps).toEqual({
24
- fieldValue: e.hookCall.fieldValue,
25
- presentationType: e.hookCall.presentationType
26
- });
27
- else if (d(e.hookCall))
28
- l(o.testProps).toEqual({
29
- field: e.hookCall.field,
30
- disabledGetter: l.any(Function),
31
- rowKeyGetter: l.any(Function),
32
- useHook: l.any(Function)
33
- }), a = !1, s = !1;
34
- else if (n(e.hookCall))
35
- l(o.testProps).toEqual({
36
- fieldValue: e.hookCall.fieldValue
37
- });
38
- else if (p(e.hookCall))
39
- l(o.testProps).toEqual({
40
- fieldValue: e.hookCall.fieldValue,
41
- fieldUnit: e.hookCall.fieldUnit
42
- });
43
- else if (y(e.hookCall))
44
- l(o.testProps).toEqual({
45
- fieldValue: e.hookCall.fieldValue,
46
- fieldUnit: e.hookCall.fieldUnit,
47
- fieldSymbol: e.hookCall.fieldSymbol
48
- });
49
- else if (f(e.hookCall))
50
- l(o.testProps).toEqual({
51
- fieldValue: e.hookCall.fieldValue,
52
- fieldSeparator: e.hookCall.fieldSeparator
53
- });
54
- else if (m(e.hookCall))
55
- l(o.testProps).toEqual({
56
- fieldLabel: typeof e.hookCall.fieldLabel == "function" ? l.any(Function) : e.hookCall.fieldLabel,
57
- fieldStatus: e.hookCall.fieldStatus,
58
- statusesColors: e.hookCall.statusesColors,
59
- fallbackColor: e.hookCall.fallbackColor
60
- });
61
- else if (V(e.hookCall))
62
- l(o.testProps).toEqual({
63
- fieldValue: e.hookCall.fieldValue
64
- });
65
- else if (I(e.hookCall))
66
- l(o.testProps).toEqual({
67
- getIconProps: l.any(Function)
68
- }), a = !1, s = !1;
69
- else if (P(e.hookCall))
70
- l(o.testProps).toEqual({
71
- fieldValue: e.hookCall.fieldValue
72
- }), a = !1, s = !1;
73
- else if (E(e.hookCall))
74
- l(o.testProps).toEqual({
75
- fieldValue: e.hookCall.fieldValue,
76
- fieldText: e.hookCall.fieldText,
77
- cover: e.hookCall.cover,
78
- width: e.hookCall.width,
79
- height: e.hookCall.height
80
- }), a = !1, s = !1;
81
- else
82
- throw new Error(`Unknown hook call type: ${e.hookCall?.type}`);
83
- }), it("should have formatter, customFilter and customSort functions", () => {
84
- l(o.formatter).toBeDefined(), a && l(o.customFilter).toBeDefined(), s && l(o.customSort).toBeDefined();
85
- });
86
- } else
87
- it("should not have formatter functions", () => {
88
- l(o.formatter).toBeUndefined(), l(o.customFilter).toBeUndefined(), l(o.customSort).toBeUndefined();
89
- });
90
- });
91
- });
92
- };
93
- export {
94
- B as t
95
- };
@@ -1,2 +0,0 @@
1
- export * from './helpers';
2
- export * from './types';
@@ -1 +0,0 @@
1
-
@@ -1,54 +0,0 @@
1
- import { ColumnNestedValueFormatterProps, ColumnDateFormatterProps, ColumnBooleanFormatterProps, ColumnPriceFormatterProps, ColumnPointsFormatterProps, ColumnSetCheckFormatterProps, ColumnUncertaintyFormatterProps, ColumnConcatenatedValuesFormatterProps, Column, ColumnInteractiveCheckFormatterProps, ColumnChipStatusFormatterProps, ColumnTagsFormatterProps, ColumnIconFormatterProps, ColumnColorFormatterProps, ColumnImageFormatterProps } from '@m4l/components';
2
- type BaseColumnConfig<T> = Column<T, unknown>;
3
- type BaseHookCall = {
4
- type: 'nested' | 'date' | 'boolean' | 'price' | 'points' | 'interactiveCheck' | 'setCheck' | 'uncertainty' | 'concatenated' | 'chipStatus' | 'tags' | 'icon' | 'color' | 'image';
5
- };
6
- export type TestingNestedValueHookCall<T> = BaseHookCall & ColumnNestedValueFormatterProps<T> & {
7
- type: 'nested';
8
- };
9
- export type TestingDateHookCall<T> = BaseHookCall & ColumnDateFormatterProps<T> & {
10
- type: 'date';
11
- };
12
- export type TestingBooleanHookCall<T> = BaseHookCall & ColumnBooleanFormatterProps<T> & {
13
- type: 'boolean';
14
- };
15
- export type TestingPriceHookCall<T> = BaseHookCall & ColumnPriceFormatterProps<T> & {
16
- type: 'price';
17
- };
18
- export type TestingPointsHookCall<T> = BaseHookCall & ColumnPointsFormatterProps<T> & {
19
- type: 'points';
20
- };
21
- export type TestingInteractiveCheckHookCall<T> = BaseHookCall & ColumnInteractiveCheckFormatterProps<T> & {
22
- type: 'interactiveCheck';
23
- };
24
- export type TestingSetCheckHookCall<T> = BaseHookCall & ColumnSetCheckFormatterProps<T> & {
25
- type: 'setCheck';
26
- };
27
- export type TestingUncertaintyHookCall<T> = BaseHookCall & ColumnUncertaintyFormatterProps<T> & {
28
- type: 'uncertainty';
29
- };
30
- export type TestingConcatenatedHookCall<T> = BaseHookCall & ColumnConcatenatedValuesFormatterProps<T> & {
31
- type: 'concatenated';
32
- };
33
- export type TestingChipStatusHookCall<T> = BaseHookCall & ColumnChipStatusFormatterProps<T> & {
34
- type: 'chipStatus';
35
- };
36
- export type TestingTagsHookCall<T> = BaseHookCall & ColumnTagsFormatterProps<T> & {
37
- type: 'tags';
38
- };
39
- export type TestingIconHookCall<T> = BaseHookCall & ColumnIconFormatterProps<T> & {
40
- type: 'icon';
41
- };
42
- export type TestingColorHookCall<T> = BaseHookCall & ColumnColorFormatterProps<T> & {
43
- type: 'color';
44
- };
45
- export type TestingImageHookCall<T> = BaseHookCall & ColumnImageFormatterProps<T> & {
46
- type: 'image';
47
- };
48
- export type TestingColumnConfig<T> = BaseColumnConfig<T> & {
49
- hookCall?: TestingNestedValueHookCall<T> | TestingDateHookCall<T> | TestingBooleanHookCall<T> | TestingPriceHookCall<T> | TestingPointsHookCall<T> | TestingInteractiveCheckHookCall<T> | TestingSetCheckHookCall<T> | TestingUncertaintyHookCall<T> | TestingConcatenatedHookCall<T> | TestingChipStatusHookCall<T> | TestingTagsHookCall<T> | TestingIconHookCall<T> | TestingColorHookCall<T> | TestingImageHookCall<T>;
50
- };
51
- export type TestingColumn = Column<unknown, unknown> & {
52
- testProps?: Record<string, unknown>;
53
- };
54
- export {};
@@ -1 +0,0 @@
1
-
@@ -1,5 +0,0 @@
1
- import { FilterField } from '@m4l/components';
2
- /**
3
- * Verifica que los campos del filtro sean correctos
4
- */
5
- export declare const testFilterFields: (actualFields: FilterField[], expectedFields: FilterField[]) => void;
@@ -1,18 +0,0 @@
1
- import { it as s, expect as r, describe as c } from "vitest";
2
- const f = (a, n) => {
3
- s("should return an array with the correct length", () => {
4
- r(Array.isArray(a)).toBe(!0), r(a.length).toBe(n.length);
5
- }), n.forEach((t, u) => {
6
- const o = a[u];
7
- c(`Field ${u + 1}: ${t.name}`, () => {
8
- s("should have the correct basic properties", () => {
9
- r(o).toBeDefined(), r(o.name).toBe(t.name), r(o.dictionaryId).toBe(t.dictionaryId), r(o.type).toBe(t.type), r(o.multiple).toBe(t.multiple), r(o.presence).toBe(t.presence), t.defaultOperator && r(o.defaultOperator).toEqual(t.defaultOperator), t.restritcOperatorsTo && r(o.restritcOperatorsTo).toEqual(t.restritcOperatorsTo), t.defaultOperand1 && r(o.defaultOperand1).toEqual(t.defaultOperand1), t.urlIcon && r(o.urlIcon).toBe(t.urlIcon);
10
- }), t.type === "selectAsync" && s("should have the correct selectAsync properties", () => {
11
- r(o.selectAsyncOptions).toBeDefined(), r(o.selectAsyncOptions).toMatchObject(t.selectAsyncOptions);
12
- });
13
- });
14
- });
15
- };
16
- export {
17
- f as t
18
- };
@@ -1 +0,0 @@
1
- export * from './helpers';
@@ -1 +0,0 @@
1
-
File without changes
@@ -1,5 +0,0 @@
1
- import { SortField } from '@m4l/components';
2
- /**
3
- * Verifica que los campos de ordenamiento sean correctos
4
- */
5
- export declare const testSortFields: (actualFields: SortField[], expectedFields: SortField[]) => void;
@@ -1,16 +0,0 @@
1
- import { it as h, expect as r, describe as s } from "vitest";
2
- const B = (n, a) => {
3
- h("should return an array with the correct length", () => {
4
- r(Array.isArray(n)).toBe(!0), r(n.length).toBe(a.length);
5
- }), a.forEach((o, e) => {
6
- const t = n[e];
7
- s(`Field ${e + 1}: ${o.name}`, () => {
8
- h("should have the correct basic properties", () => {
9
- r(t).toBeDefined(), r(t.name).toBe(o.name), r(t.dictionaryId).toBe(o.dictionaryId), r(t.type).toBe(o.type), r(t.presence).toBe(o.presence), o.urlIcon && r(t.urlIcon).toBe(o.urlIcon);
10
- });
11
- });
12
- });
13
- };
14
- export {
15
- B as t
16
- };
@@ -1 +0,0 @@
1
- export * from './helpers';
@@ -1 +0,0 @@
1
-
@@ -1,3 +0,0 @@
1
- export * from './DataGrid';
2
- export * from './DynamicFilter';
3
- export * from './DynamicSort';
@@ -1 +0,0 @@
1
-
File without changes
@@ -1 +0,0 @@
1
- export * from './utils';
@@ -1 +0,0 @@
1
-
File without changes
File without changes
@@ -1 +0,0 @@
1
- import "@testing-library/jest-dom";
File without changes
@@ -1,11 +0,0 @@
1
- import { renderHook, cleanup, fireEvent, RenderResult, screen, waitFor, within } from '@testing-library/react';
2
- import { default as userEvent } from '@testing-library/user-event';
3
- import { act, ReactElement } from 'react';
4
- import { beforeEach, describe, expect } from 'vitest';
5
- /**
6
- * Render a component
7
- */
8
- declare const customRender: (ui: ReactElement, options?: {}) => RenderResult & {
9
- user: ReturnType<typeof userEvent.setup>;
10
- };
11
- export { act, cleanup, describe, expect, fireEvent, customRender as render, renderHook, screen, userEvent, waitFor, within, beforeEach, };
@@ -1,23 +0,0 @@
1
- import { render as m, cleanup as p } from "@testing-library/react";
2
- import c from "@testing-library/user-event";
3
- import { act as s } from "react";
4
- import { afterEach as a } from "vitest";
5
- a(() => {
6
- p(), vi.clearAllMocks();
7
- });
8
- const i = (e, t = {}) => {
9
- let r;
10
- return s(() => {
11
- r = m(e, {
12
- // wrap provider(s) here if needed
13
- wrapper: ({ children: o }) => o,
14
- ...t
15
- });
16
- }), {
17
- ...r,
18
- user: c.setup()
19
- };
20
- };
21
- export {
22
- i as c
23
- };
package/vite-env.d.ts DELETED
@@ -1,5 +0,0 @@
1
- /// <reference types="vite/client" />
2
- /// <reference types="vitest" />
3
- /// <reference types="vitest/globals" />
4
- /// <reference types="vitest/importMeta" />
5
- /// <reference types="cypress" />