@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
@@ -1,29 +0,0 @@
1
- import { g as r } from "../../helpers/getFieldNameDomElement.js";
2
- import { g as i } from "../getFormScope/getFormScope.js";
3
- const c = (l) => l.get('[class*="MuiAutocomplete-listbox"]').find('[class*="MuiMenuItem-root"]'), d = ({ inputs: l, stepIndex: s }) => {
4
- l.forEach((e, a) => {
5
- const o = i(s).find(r(e.typeElement)).eq(e?.index ?? a);
6
- switch (e.valueVisibleByDefault && o.should("have.value", e.valueVisibleByDefault), e.typeElement) {
7
- case "input":
8
- if (e.typeValue === "number") {
9
- const t = "text string testing";
10
- o.type(t).should("not.have.value", t);
11
- }
12
- e.valueToWrite && o.should("be.visible").click().type(e.valueToWrite).should("have.value", e.valueToWrite);
13
- break;
14
- case "textarea":
15
- e.valueToWrite && o.should("be.visible").click().type(e.valueToWrite);
16
- break;
17
- case "select":
18
- if (o.should("be.visible").click(), e.endpointToWait && cy.wait(e.endpointToWait), e.options) {
19
- for (let t = 0; t < e.options.length; t++)
20
- c(o).eq(t).should("contain.text", e.options?.[t]);
21
- c(o).eq(e.optionIndexToSelect ?? 0).click(), i(s).find("input").eq(e?.index ?? a).should("have.value", e.options?.[0]);
22
- }
23
- break;
24
- }
25
- });
26
- };
27
- export {
28
- d as f
29
- };
@@ -1,5 +0,0 @@
1
- import { InputsForm } from '../assertInitialFormState/type';
2
- export interface FillAndAssertFormFields {
3
- inputs: InputsForm[];
4
- stepIndex?: number;
5
- }
@@ -1,20 +0,0 @@
1
- /**
2
- * Function to get the scope of the form based on the step index (if provided)
3
- * or the whole form if no step index is provided
4
- * @param stepIndex - The step index to get the scope of the form
5
- * @returns The scope of the form. Examples:
6
- * - Example with stepper:
7
- * ```ts
8
- * cy.get('[class*="M4LWindowBase-contentWindowBase"]')
9
- * .find('[class*="M4LStepper-contentArea"]')
10
- * .find('[class*="M4LStepper-stepContent"]')
11
- * .eq(1)
12
- * .find('[class*="M4LPaperForm-containerContent"]');
13
- * ```
14
- * - Example without stepper:
15
- * ```ts
16
- * cy.get('[class*="M4LWindowBase-contentWindowBase"]')
17
- * .find('[class*="M4LPaperForm-containerContent"]');
18
- * ```
19
- */
20
- export declare const getFormScope: (stepIndex?: number) => Cypress.Chainable<JQuery<HTMLElement>>;
@@ -1,8 +0,0 @@
1
- import { W as o, P as s } from "../constants.js";
2
- const r = (t) => {
3
- let e = cy.get(o);
4
- return t !== void 0 && (e = e.find('[class*="M4LStepper-contentArea"]').find('[class*="M4LStepper-stepContent"]').eq(t)), e.find(s);
5
- };
6
- export {
7
- r as g
8
- };
@@ -1,10 +0,0 @@
1
- import { ProceedFormStep } from './type';
2
- /**
3
- * Function to proceed to the next step or submit the form by clicking the button with the given label
4
- * @param buttonLabel - The label of the button to click
5
- * @param force - The force to click the button if true, the button will be clicked with force
6
- * @returns The click action of the button with the given label
7
- * @example
8
- * cy.proceedFormStep({ buttonLabel: 'N_D:[stepper.label_next_button]', force: false });
9
- */
10
- export declare const proceedFormStep: ({ buttonLabel, force }: ProceedFormStep) => void;
@@ -1,6 +0,0 @@
1
- const o = ({ buttonLabel: e, force: s = !1 }) => {
2
- cy.get('[class*="M4LAreasViewer-windowBase"]').should("be.visible"), cy.get('[data-testid="M4LTypography-root"]').contains(e).should("be.visible").click({ force: s });
3
- };
4
- export {
5
- o as p
6
- };
@@ -1,13 +0,0 @@
1
- export interface ProceedFormStep {
2
- /**
3
- * The label of the button to click
4
- * @example
5
- * 'N_D:[stepper.label_next_button]'
6
- */
7
- buttonLabel: string;
8
- /**
9
- * The force to click the button if true, the button will be clicked with force
10
- * @default false
11
- */
12
- force?: boolean;
13
- }
@@ -1,7 +0,0 @@
1
- import { InputsForm } from '../cypress/assertInitialFormState/type';
2
- /**
3
- * Function to get the name of the DOM element based on the type of the element
4
- * @param typeElement - The type of the element
5
- * @returns The name of the DOM element
6
- */
7
- export declare const getFieldNameDomElement: (typeElement: InputsForm["typeElement"]) => "input" | "textarea";
@@ -1,13 +0,0 @@
1
- const t = (e) => {
2
- switch (e) {
3
- case "input":
4
- return "input";
5
- case "select":
6
- return "input";
7
- case "textarea":
8
- return "textarea";
9
- }
10
- };
11
- export {
12
- t as g
13
- };
@@ -1,88 +0,0 @@
1
- import { AssertInitialFormState } from './cypress/assertInitialFormState/type';
2
- import { AssertMandatoryFields } from './cypress/assertMandatoryFields/type';
3
- import { ProceedFormStep } from './cypress/proceedFormStep/type';
4
- import { FillAndAssertFormFields } from './cypress/fillAndAssertFormFields/type';
5
-
6
- declare global {
7
- namespace Cypress {
8
- interface Chainable {
9
- /**
10
- * Assert initial state of a Form, with or without stepper.
11
- * You need send the params with the inputs to validate.
12
- * @example
13
- * // Option 1: Without stepper
14
- * cy.m4lAssertInitialFormState({
15
- * inputs: [{ typeElement: 'input', index: 0, expectedValue: 'John Doe' }],
16
- * });
17
- * // Option 2: With stepper
18
- * cy.m4lAssertInitialFormState({
19
- * steps: [{ stepperIndex: 1, inputs: [{ typeElement: 'input', index: 0, expectedValue: 'John Doe' }] }],
20
- * });
21
- */
22
- m4lAssertInitialFormState (params: AssertInitialFormState): Chainable<void>
23
- /**
24
- * function to assert mandatory fields
25
- * @param props - The properties to assert mandatory fields
26
- * @example
27
- * {
28
- * formFieldItems: [
29
- * {
30
- * name: 'name',
31
- * evaluateField: true,
32
- * mandatory: true,
33
- * },
34
- * ],
35
- * propertyValueSelector: '[data-testid="m4l-property-value-root-name"]',
36
- * }
37
- */
38
- m4lAssertMandatoryFields (params: AssertMandatoryFields): Chainable<void>
39
- /**
40
- * Function to get the scope of the form based on the step index (if provided)
41
- * or the whole form if no step index is provided
42
- * @param stepIndex (optional) - The step index to get the scope of the form
43
- * @returns The scope of the form. Examples:
44
- * - Example with stepper:
45
- * ```ts
46
- * cy.get('[class*="M4LWindowBase-contentWindowBase"]')
47
- * .find('[class*="M4LStepper-contentArea"]')
48
- * .find('[class*="M4LStepper-stepContent"]')
49
- * .eq(1)
50
- * .find('[class*="M4LPaperForm-containerContent"]');
51
- * ```
52
- * - Example without stepper:
53
- * ```ts
54
- * cy.get('[class*="M4LWindowBase-contentWindowBase"]')
55
- * .find('[class*="M4LPaperForm-containerContent"]');
56
- * ```
57
- */
58
- m4lGetFormScope (stepIndex?: number): Chainable<JQuery<HTMLElement>>
59
- /**
60
- * Fill and validate the inputs of the form with the data of the form
61
- * @param inputs - The inputs to validate
62
- * @param stepIndex - The step index to get the scope of the form
63
- * @returns Chainable<void>
64
- * @example
65
- * cy.m4lFillAndAssertFormFields({
66
- * inputs: [
67
- * { typeElement: 'input', index: 0, valueToWrite: 'John Doe' },
68
- * { typeElement: 'textarea', index: 0, valueToWrite: 'John Doe' },
69
- * { typeElement: 'select', index: 0, options: ['Option 1', 'Option 2'], optionIndexToSelect: 0, endpointToWait: '@getOptions' },
70
- * ],
71
- * stepIndex: 1,
72
- * });
73
- */
74
- m4lFillAndAssertFormFields (params: FillAndAssertFormFields): Chainable<void>
75
- /**
76
- * Function to proceed to the next step or submit the form by clicking the button with the given label
77
- * @param buttonLabel - The label of the button to click
78
- * @param force - The force to click the button if true, the button will be clicked with force
79
- * @returns Chainable<void>
80
- * @example
81
- * cy.proceedFormStep({ buttonLabel: 'N_D:[stepper.label_next_button]', force: false });
82
- */
83
- m4lProceedFormStep (params: ProceedFormStep): Chainable<void>
84
- }
85
- }
86
- }
87
-
88
- export { };
@@ -1,4 +0,0 @@
1
- /**
2
- * Registers MenuActions commands
3
- */
4
- export declare const registerMenuActionsCommands: () => void;
@@ -1,8 +0,0 @@
1
- const o = () => {
2
- Cypress.Commands.add("m4lMenuActionsItem", (e, s) => {
3
- cy.m4lPopover().find("[role=menuitem]").eq(e), s ? cy.should("have.attr", "aria-disabled", "true") : cy.should("be.visible", { timeout: 1e4 });
4
- });
5
- };
6
- export {
7
- o as r
8
- };
@@ -1,24 +0,0 @@
1
- declare global {
2
- namespace Cypress {
3
- interface Chainable {
4
- /**
5
- * Gets the MenuItem of a MenuAction at the specified position. Optionally asserts disabled state.
6
- * @example
7
- * cy.m4lMenuActionsItem(0); // first item, expect visible
8
- * cy.m4lMenuActionsItem(1, 'isDisabled'); // second item, expect disabled
9
- */
10
- m4lMenuActionsItem(
11
- /**
12
- * menuActions item index
13
- */
14
- menuItemIndex: number,
15
- /**
16
- * Indicates whether the menuActions item is disabled
17
- */
18
- isDisabled?: 'isDisabled',
19
- ): Chainable<Element>
20
- }
21
- }
22
- }
23
-
24
- export {};
@@ -1,4 +0,0 @@
1
- /**
2
- * Registers Popover commands
3
- */
4
- export declare const registerPopoverCommands: () => void;
@@ -1,8 +0,0 @@
1
- const o = () => {
2
- Cypress.Commands.add("m4lPopover", () => {
3
- cy.get("[role=presentation").find('[class^="MuiPaper-root"]');
4
- });
5
- };
6
- export {
7
- o as r
8
- };
@@ -1,15 +0,0 @@
1
- declare global {
2
- namespace Cypress {
3
- interface Chainable {
4
- /**
5
- * Gets the currently open popover (MUI Paper with role=presentation).
6
- * @example
7
- * cy.m4lDynamicFilterInputClick();
8
- * cy.m4lPopover().find('li').contains('Name').click();
9
- */
10
- m4lPopover(): Chainable<Element>
11
- }
12
- }
13
- }
14
-
15
- export {};
@@ -1,4 +0,0 @@
1
- /**
2
- * Registers PropertyValue commands
3
- */
4
- export declare const registerPropertyValueCommands: () => void;
@@ -1,8 +0,0 @@
1
- const r = () => {
2
- Cypress.Commands.add("m4lPropertyValue", (e) => {
3
- cy.get(e).find('[class*="M4LPropertyValue-value"]');
4
- });
5
- };
6
- export {
7
- r
8
- };
@@ -1,19 +0,0 @@
1
- declare global {
2
- namespace Cypress {
3
- interface Chainable {
4
- /**
5
- * Gets the PropertyValue element (value part) within the given selector.
6
- * @example
7
- * cy.m4lPropertyValue('[class*="M4LPropertyValue-root"]').should('have.text', '123');
8
- */
9
- m4lPropertyValue(
10
- /**
11
- * Property selector
12
- */
13
- selector: string,
14
- ): Chainable<Element>
15
- }
16
- }
17
- }
18
-
19
- export {};
@@ -1,4 +0,0 @@
1
- /**
2
- * Registers Tab commands
3
- */
4
- export declare const registerTabCommands: () => void;
@@ -1,9 +0,0 @@
1
- const a = () => {
2
- Cypress.Commands.add("m4lTabButton", (o, s, t) => {
3
- const n = cy.get(o).find("[role=tablist]").find("button").eq(s);
4
- t !== void 0 && n.should("have.text", t);
5
- });
6
- };
7
- export {
8
- a as r
9
- };
@@ -1,29 +0,0 @@
1
- declare global {
2
- namespace Cypress {
3
- interface Chainable {
4
- /**
5
- * Gets the tab button at the given index and asserts its text equals tabTitle.
6
- * @example
7
- * cy.m4lTabButton('[class*="M4LTab-root"]', 0); // Without title
8
- * cy.m4lTabButton('[class*="M4LTab-root"]', 0, 'Details');
9
- * cy.m4lTabButton('[class*="M4LTab-root"]', 1, 'History');
10
- */
11
- m4lTabButton(
12
- /**
13
- * @param selector - The component selector to get the tab button
14
- */
15
- selector: string,
16
- /**
17
- * @param tabIndex - The tab index to get the button
18
- */
19
- tabIndex: number,
20
- /**
21
- * @param tabTitle - The tab title to validate
22
- */
23
- tabTitle?: string,
24
- ): Chainable<Element>
25
- }
26
- }
27
- }
28
-
29
- export {};
@@ -1,4 +0,0 @@
1
- /**
2
- * Registers WindowBase commands
3
- */
4
- export declare const registerWindowBaseCommands: () => void;
@@ -1,24 +0,0 @@
1
- const e = () => {
2
- Cypress.Commands.add("m4lWindowBaseHeader", () => {
3
- cy.get('[class^="M4LDragResizeWindowRND-draggableHandle"]').find('[class^="M4LDragResizeWindowRND-draggableCancel"]');
4
- }), Cypress.Commands.add("m4lWindowBaseLeftAction", (s) => {
5
- cy.m4lWindowBaseHeader().find("button").eq(s);
6
- }), Cypress.Commands.add("m4lWindowBaseLeftActionClick", (s) => {
7
- cy.m4lWindowBaseLeftAction(s).click({ force: !0 });
8
- }), Cypress.Commands.add("m4lWindowBaseMenuAction", (s) => {
9
- cy.m4lWindowBaseHeader().find('[class*="M4LMenuActions-root-M4LWindowBase-menuActionsWindowBase"]').find("button").eq(0).click(), cy.get("[role=presentation]").find('[class^="MuiPaper-root"]').find("[role=menuitem]").eq(s);
10
- }), Cypress.Commands.add("m4lWindowBaseMenuActionDisabled", (s) => {
11
- cy.m4lWindowBaseMenuAction(s).should("have.attr", "aria-disabled", "true");
12
- }), Cypress.Commands.add("m4lDialogWindowActions", (s) => {
13
- cy.get('[class^="MuiDialog-container"]').find('[class^="M4LWindowBase-root"]').should("contain", s);
14
- }), Cypress.Commands.add("m4lDialogWindowActionsValidateTitle", (s) => {
15
- cy.get('[class^="M4LGridLayout-root"]').find('[class*="M4LPopupsViewer-root"]').find('[class*="M4LDragResizeWindowRND-draggableHandle"]').find('[class*="M4LTypography-root"]').should("have.text", s);
16
- }), Cypress.Commands.add("m4lAssertModuleHeaderTitle", (s) => {
17
- cy.get('[class*="M4LWindowBase-root"]').find('[class*="M4LWindowBase-headerContentWindowBase"]').find('[class*="M4LWindowBase-containerTitleSubtitle"]').should("be.visible").should("contain.text", s);
18
- }), Cypress.Commands.add("m4lAssertModuleHeaderIcon", (s) => {
19
- cy.get('[class*="M4LWindowBase-root"]').find('[class*="M4LWindowBase-headerContentWindowBase"]').find('[class*="M4LIcon-root"]').find('[class*="M4LIcon-icon"]').should("be.visible").invoke("css", "mask").should("contain", s);
20
- });
21
- };
22
- export {
23
- e as r
24
- };
@@ -1,100 +0,0 @@
1
- declare global {
2
- namespace Cypress {
3
- interface Chainable {
4
- /**
5
- * Gets the module header (draggable handle area).
6
- * @example
7
- * cy.m4lWindowBaseHeader().find('button').first().click();
8
- */
9
- m4lWindowBaseHeader (): Chainable<Element>
10
- /**
11
- * Gets a button on the left side of the module by 0-based index.
12
- * @example
13
- * cy.m4lWindowBaseLeftAction(0).click(); // first left button
14
- */
15
- m4lWindowBaseLeftAction (
16
- /**
17
- * Button position
18
- */
19
- buttonPosition: number,
20
- ): Chainable<Element>
21
- /**
22
- * Clicks on the left button of the module by 0-based index.
23
- * @example
24
- * cy.m4lWindowBaseLeftActionClick(0);
25
- */
26
- m4lWindowBaseLeftActionClick (
27
- /**
28
- * Button position
29
- */
30
- buttonPosition: number,
31
- ): Chainable<Element>
32
- /**
33
- * Opens the header menu and returns the menu item at the given 0-based position.
34
- * @example
35
- * cy.m4lWindowBaseMenuAction(0).click(); // click first menu item
36
- */
37
- m4lWindowBaseMenuAction (
38
- /**
39
- * Button position
40
- */
41
- menuItemPosition: number,
42
- ): Chainable<Element>
43
- /**
44
- * Asserts that the menu item at the given position is disabled.
45
- * @example
46
- * cy.m4lWindowBaseMenuActionDisabled(2);
47
- */
48
- m4lWindowBaseMenuActionDisabled (
49
- /**
50
- * Button position
51
- */
52
- menuItemPosition: number,
53
- ): Chainable<Element>
54
- /**
55
- * Finds the dialog by title and returns the container (e.g. to then find and click accept).
56
- * @example
57
- * cy.m4lDialogWindowActions('Confirm').find('button').contains('Accept').click();
58
- */
59
- m4lDialogWindowActions (
60
- /**
61
- * Dialog title
62
- */
63
- title: string,
64
- ): Chainable<Element>
65
- /**
66
- * Asserts that a popup window has the given title.
67
- * @example
68
- * cy.m4lDialogWindowActionsValidateTitle('Edit item');
69
- */
70
- m4lDialogWindowActionsValidateTitle (
71
- /**
72
- * Dialog title
73
- */
74
- title: string,
75
- ): Chainable<Element>
76
- // login(email: string, password: string): Chainable<void>
77
- // drag(subject: string, options?: Partial<TypeOptions>): Chainable<Element>
78
- // dismiss(subject: string, options?: Partial<TypeOptions>): Chainable<Element>
79
- // visit(originalFn: CommandOriginalFn, url: string, options: Partial<VisitOptions>): Chainable<Element>
80
- /**
81
- * Validate title module of the Window Base
82
- * @example
83
- * ```
84
- * cy.assertModuleHeaderTitle('N_D:[module_name]');
85
- * ```
86
- */
87
- m4lAssertModuleHeaderTitle (title: string): Chainable<Element>
88
- /**
89
- * Validate icon module of the Window Base
90
- * @example
91
- * ```
92
- * cy.assertModuleHeaderIcon('i_common_general_action_add');
93
- * ```
94
- */
95
- m4lAssertModuleHeaderIcon (icon: string): Chainable<Element>
96
- }
97
- }
98
- }
99
-
100
- export { };
@@ -1,12 +0,0 @@
1
- export * from './Accordions/commands';
2
- export * from './DataGrid/commands';
3
- export * from './DynamicFilter/commands';
4
- export * from './DynamicSort/commands';
5
- export * from './MenuActions/commands';
6
- export * from './Popover/commands';
7
- export * from './PropertyValue/commands';
8
- export * from './Tab/commands';
9
- export * from './WindowBase/commands';
10
- export * from './CommonActions/commands';
11
- export * from './Filters/commands';
12
- export * from './Form/commands';
@@ -1 +0,0 @@
1
-
@@ -1,7 +0,0 @@
1
- export { registerCommands } from './register';
2
- export type { M4lFiltersAndSortsConfig } from './components/Filters/types';
3
- export type { M4lPropertyValuesAccordionsConfig } from './components/Accordions/types';
4
- export type { M4LDataGridCypressColumn, M4LGetCypressDataGridColumnsConfig } from './components/DataGrid/types';
5
- export * from './components/Form/cypress/assertInitialFormState/type';
6
- export * from './components/Form/cypress/assertMandatoryFields/type';
7
- export * from './components/Form/cypress/fillAndAssertFormFields/type';
@@ -1 +0,0 @@
1
-
@@ -1,2 +0,0 @@
1
- export * from './noPrivileges/interceptCommands';
2
- export * from './noPrivileges/types';
@@ -1 +0,0 @@
1
-
@@ -1,5 +0,0 @@
1
- import { Rute } from '../../../types';
2
- /**
3
- * Registra los comandos de intercepts
4
- */
5
- export declare const registerInterceptNoPrivilegesCommands: (props?: Rute) => void;
@@ -1,15 +0,0 @@
1
- const t = (e = {}) => {
2
- const { rute: s = "main" } = e;
3
- Cypress.Commands.add("m4lInterceptNoPrivileges", () => {
4
- cy.intercept("GET", `**/${s}/auth/login*`, {
5
- statusCode: 200,
6
- body: {
7
- data: {},
8
- user: {}
9
- }
10
- }).as("noPrivileges");
11
- });
12
- };
13
- export {
14
- t as r
15
- };
@@ -1,8 +0,0 @@
1
- declare global {
2
- namespace Cypress {
3
- interface Chainable {
4
- m4lInterceptNoPrivileges(): Chainable<void>;
5
- }
6
- }
7
- }
8
- export {};
@@ -1,4 +0,0 @@
1
- /**
2
- * Registra los comandos de la aplicación
3
- */
4
- export declare const registerCommands: () => void;
@@ -1,19 +0,0 @@
1
- import { r } from "./components/Accordions/commands.js";
2
- import { r as m } from "./components/DataGrid/commands.js";
3
- import { r as o } from "./components/DynamicFilter/commands.js";
4
- import { r as s } from "./components/DynamicSort/commands.js";
5
- import { r as e } from "./components/MenuActions/commands.js";
6
- import { r as i } from "./components/Popover/commands.js";
7
- import { r as t } from "./components/PropertyValue/commands.js";
8
- import { r as a } from "./components/Tab/commands.js";
9
- import { r as n } from "./components/WindowBase/commands.js";
10
- import { r as d } from "./components/CommonActions/commands.js";
11
- import { r as p } from "./components/Filters/commands.js";
12
- import { r as g } from "./intercepts/noPrivileges/interceptCommands.js";
13
- import { r as C } from "./components/Form/commands.js";
14
- const B = () => {
15
- r(), m(), o(), s(), e(), i(), t(), a(), n(), d(), p(), g(), C();
16
- };
17
- export {
18
- B as r
19
- };
package/e2e/cypress.d.js DELETED
@@ -1 +0,0 @@
1
-
package/e2e/cypress.d.ts DELETED
@@ -1,24 +0,0 @@
1
- /// <reference path="./commands/components/Accordions/types.d.ts" />
2
- /// <reference path="./commands/components/DataGrid/types.d.ts" />
3
- /// <reference path="./commands/components/DynamicFilter/types.d.ts" />
4
- /// <reference path="./commands/components/DynamicSort/types.d.ts" />
5
- /// <reference path="./commands/components/MenuActions/types.d.ts" />
6
- /// <reference path="./commands/components/WindowBase/types.d.ts" />
7
- /// <reference path="./commands/components/Popover/types.d.ts" />
8
- /// <reference path="./commands/components/PropertyValue/types.d.ts" />
9
- /// <reference path="./commands/components/Tab/types.d.ts" />
10
- /// <reference path="./commands/components/CommonActions/types.d.ts" />
11
- /// <reference path="./commands/intercepts/noPrivileges/types.d.ts" />
12
- /// <reference path="./commands/components/Form/types.d.ts" />
13
-
14
-
15
- declare global {
16
- namespace Cypress {
17
- // eslint-disable-next-line @typescript-eslint/no-empty-interface
18
- interface Chainable {
19
- // Los tipos se extienden automáticamente desde los archivos importados
20
- }
21
- }
22
- }
23
-
24
- export { };
package/e2e/index.d.ts DELETED
@@ -1 +0,0 @@
1
- export * from './commands';
package/e2e/types.d.ts DELETED
@@ -1,4 +0,0 @@
1
- export type OptionsRute = 'main' | 'domain' | 'admin';
2
- export interface Rute {
3
- rute?: OptionsRute;
4
- }