@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.
- package/README.md +679 -0
- package/chunks/reactLeaflet-Cffkauof.js +1846 -0
- package/chunks/render-CsuV8xqo.js +17 -0
- package/chunks/userPreferences-BmOgRaIX.js +493 -0
- package/index.js +76 -25
- package/mocks/index.js +41 -0
- package/package.json +84 -69
- package/playwright/index.js +2041 -0
- package/rtl/index.js +180 -0
- package/types/libs/observability/mf/src/browserRuntimeHandles.d.ts +112 -0
- package/types/libs/observability/mf/src/diagnosticLogging.d.ts +2 -0
- package/types/libs/observability/mf/src/diagnosticPolicies/catalog.d.ts +267 -0
- package/types/libs/observability/mf/src/diagnosticPolicies/contracts.d.ts +64 -0
- package/types/libs/observability/mf/src/diagnosticPolicies/host.d.ts +139 -0
- package/types/libs/observability/mf/src/diagnosticPolicies/index.d.ts +6 -0
- package/types/libs/observability/mf/src/diagnosticPolicies/operativeMyGpsDevices.d.ts +104 -0
- package/types/libs/observability/mf/src/diagnosticPolicies/sharedReportsList.d.ts +44 -0
- package/types/libs/observability/mf/src/diagnosticPolicyKeys.d.ts +34 -0
- package/types/libs/observability/mf/src/index.d.ts +14 -0
- package/types/libs/observability/mf/src/runtimeSmoke.d.ts +13 -0
- package/types/libs/observability/mf/src/telemetry.d.ts +2 -0
- package/types/libs/observability/shared/src/diagnosticLogging.d.ts +97 -0
- package/types/libs/observability/shared/src/index.d.ts +6 -0
- package/types/libs/observability/shared/src/runtimeHandles.d.ts +27 -0
- package/types/libs/observability/shared/src/telemetry.d.ts +179 -0
- package/types/packages/testing/mocks/src/constants.d.ts +10 -0
- package/types/packages/testing/mocks/src/fixtures.d.ts +258 -0
- package/types/packages/testing/mocks/src/helpers/environment.d.ts +44 -0
- package/types/packages/testing/mocks/src/helpers/hostTools.d.ts +10 -0
- package/types/packages/testing/mocks/src/helpers/index.d.ts +5 -0
- package/types/packages/testing/mocks/src/helpers/moduleDictionary.d.ts +9 -0
- package/types/packages/testing/mocks/src/helpers/toaster.d.ts +9 -0
- package/types/packages/testing/mocks/src/helpers/userPreferences.d.ts +17 -0
- package/types/packages/testing/mocks/src/index.d.ts +4 -0
- package/types/packages/testing/mocks/src/types.d.ts +233 -0
- package/types/packages/testing/playwright/src/fixtures/createHostAreaFixture.d.ts +5 -0
- package/types/packages/testing/playwright/src/fixtures/createHostAuthenticatedMfMenuFixture.d.ts +5 -0
- package/types/packages/testing/playwright/src/fixtures/createHostAuthenticatedMfModuleDictionaryFixture.d.ts +5 -0
- package/types/packages/testing/playwright/src/fixtures/createHostAuthenticatedSessionFixture.d.ts +6 -0
- package/types/packages/testing/playwright/src/fixtures/createHostCookieFixture.d.ts +5 -0
- package/types/packages/testing/playwright/src/fixtures/createHostGuestSessionFixture.d.ts +5 -0
- package/types/packages/testing/playwright/src/fixtures/createHostLocaleFixture.d.ts +5 -0
- package/types/packages/testing/playwright/src/fixtures/createHostMfPreviewDynamicParamsFixture.d.ts +5 -0
- package/types/packages/testing/playwright/src/fixtures/createHostModuleDictionaryFixture.d.ts +11 -0
- package/types/packages/testing/playwright/src/fixtures/createHostUiConfigFixture.d.ts +7 -0
- package/types/packages/testing/playwright/src/fixtures/createHostUserPreferencesFixture.d.ts +6 -0
- package/types/packages/testing/playwright/src/fixtures/createListResponseFixture.d.ts +6 -0
- package/types/packages/testing/playwright/src/fixtures/index.d.ts +12 -0
- package/types/packages/testing/playwright/src/helpers/attachJson.d.ts +9 -0
- package/types/packages/testing/playwright/src/helpers/formAccess.d.ts +53 -0
- package/types/packages/testing/playwright/src/helpers/formSelect.d.ts +51 -0
- package/types/packages/testing/playwright/src/helpers/formatFailedChecks.d.ts +18 -0
- package/types/packages/testing/playwright/src/helpers/index.d.ts +16 -0
- package/types/packages/testing/playwright/src/helpers/listDatagrid.d.ts +219 -0
- package/types/packages/testing/playwright/src/helpers/listDetail.d.ts +65 -0
- package/types/packages/testing/playwright/src/helpers/listFilter.d.ts +27 -0
- package/types/packages/testing/playwright/src/helpers/listSort.d.ts +19 -0
- package/types/packages/testing/playwright/src/helpers/listStatePersistence.d.ts +15 -0
- package/types/packages/testing/playwright/src/helpers/openHostAccountMenuModule.d.ts +10 -0
- package/types/packages/testing/playwright/src/helpers/openHostAuthenticatedMfPreviewModule.d.ts +5 -0
- package/types/packages/testing/playwright/src/helpers/openHostMobileSidebarModule.d.ts +15 -0
- package/types/packages/testing/playwright/src/helpers/openHostSidebarModule.d.ts +5 -0
- package/types/packages/testing/playwright/src/helpers/realtimePerformanceBrowser.d.ts +144 -0
- package/types/packages/testing/playwright/src/helpers/viewModeDataGrid.d.ts +67 -0
- package/types/packages/testing/playwright/src/helpers/waitForBrowserCondition.d.ts +38 -0
- package/types/packages/testing/playwright/src/index.d.ts +11 -0
- package/types/packages/testing/playwright/src/installers/index.d.ts +20 -0
- package/types/packages/testing/playwright/src/installers/installHostAlarmsCountRoute.d.ts +5 -0
- package/types/packages/testing/playwright/src/installers/installHostAreasRoute.d.ts +5 -0
- package/types/packages/testing/playwright/src/installers/installHostAuthenticatedBootstrapRoutes.d.ts +6 -0
- package/types/packages/testing/playwright/src/installers/installHostAuthenticatedMfModuleDictionaryRoute.d.ts +5 -0
- package/types/packages/testing/playwright/src/installers/installHostAuthenticatedMfPreviewBootstrap.d.ts +11 -0
- package/types/packages/testing/playwright/src/installers/installHostAuthenticatedSessionRoute.d.ts +6 -0
- package/types/packages/testing/playwright/src/installers/installHostCookiesRoute.d.ts +8 -0
- package/types/packages/testing/playwright/src/installers/installHostGuestBootstrapRoutes.d.ts +7 -0
- package/types/packages/testing/playwright/src/installers/installHostGuestSessionRoute.d.ts +7 -0
- package/types/packages/testing/playwright/src/installers/installHostLocaleRoute.d.ts +5 -0
- package/types/packages/testing/playwright/src/installers/installHostMenusRoute.d.ts +11 -0
- package/types/packages/testing/playwright/src/installers/installHostModuleDictionaryRoute.d.ts +6 -0
- package/types/packages/testing/playwright/src/installers/installHostPasswordNewRoute.d.ts +6 -0
- package/types/packages/testing/playwright/src/installers/installHostPasswordResetRoute.d.ts +6 -0
- package/types/packages/testing/playwright/src/installers/installHostUiConfigAssetRoutes.d.ts +9 -0
- package/types/packages/testing/playwright/src/installers/installHostUiConfigRoute.d.ts +7 -0
- package/types/packages/testing/playwright/src/installers/installHostUserPreferencesRoute.d.ts +6 -0
- package/types/packages/testing/playwright/src/installers/installListEndpointRoute.d.ts +7 -0
- package/types/packages/testing/playwright/src/installers/installMicrofrontendRenderStub.d.ts +9 -0
- package/types/packages/testing/playwright/src/installers/installModulePrivilegesRoute.d.ts +11 -0
- package/types/packages/testing/playwright/src/types.d.ts +598 -0
- package/types/packages/testing/rtl/src/index.d.ts +4 -0
- package/types/packages/testing/rtl/src/matchMedia.d.ts +10 -0
- package/types/packages/testing/rtl/src/render.d.ts +17 -0
- package/types/packages/testing/rtl/src/resizeObserver.d.ts +33 -0
- package/types/packages/testing/rtl/src/storage.d.ts +10 -0
- package/types/packages/testing/src/index.d.ts +6 -0
- package/types/packages/testing/vitest/src/constants.d.ts +24 -0
- package/types/packages/testing/vitest/src/factories/app/index.d.ts +5 -0
- package/types/packages/testing/vitest/src/factories/app/m4lAppBase.d.ts +9 -0
- package/types/packages/testing/vitest/src/factories/app/m4lAppComponents.d.ts +20 -0
- package/types/packages/testing/vitest/src/factories/app/m4lAppCore.d.ts +12 -0
- package/types/packages/testing/vitest/src/factories/app/m4lAppGraphics.d.ts +10 -0
- package/types/packages/testing/vitest/src/factories/app/m4lAppLayouts.d.ts +18 -0
- package/types/packages/testing/vitest/src/factories/base/index.d.ts +1 -0
- package/types/packages/testing/vitest/src/factories/base/m4lBaseComponents.d.ts +13 -0
- package/types/packages/testing/vitest/src/factories/index.d.ts +7 -0
- package/types/packages/testing/vitest/src/factories/leaflet.d.ts +10 -0
- package/types/packages/testing/vitest/src/factories/packages/index.d.ts +7 -0
- package/types/packages/testing/vitest/src/factories/packages/m4lPackageBase.d.ts +11 -0
- package/types/packages/testing/vitest/src/factories/packages/m4lPackageComponents.d.ts +11 -0
- package/types/packages/testing/vitest/src/factories/packages/m4lPackageCore.d.ts +11 -0
- package/types/packages/testing/vitest/src/factories/packages/m4lPackageGclick.d.ts +10 -0
- package/types/packages/testing/vitest/src/factories/packages/m4lPackageGclickRealtime.d.ts +6 -0
- package/types/packages/testing/vitest/src/factories/packages/m4lPackageGraphics.d.ts +9 -0
- package/types/packages/testing/vitest/src/factories/packages/m4lPackageLayouts.d.ts +10 -0
- package/types/packages/testing/vitest/src/factories/reResizable.d.ts +6 -0
- package/types/packages/testing/vitest/src/factories/reactHookForm.d.ts +10 -0
- package/types/packages/testing/vitest/src/factories/reactLeaflet.d.ts +10 -0
- package/types/packages/testing/vitest/src/fixtures.d.ts +71 -0
- package/types/packages/testing/vitest/src/helpers/columnConfigs.d.ts +184 -0
- package/types/packages/testing/vitest/src/helpers/elementMocks.d.ts +166 -0
- package/types/packages/testing/vitest/src/helpers/filterFields.d.ts +37 -0
- package/types/packages/testing/vitest/src/helpers/index.d.ts +9 -0
- package/types/packages/testing/vitest/src/helpers/mapStore.d.ts +9 -0
- package/types/packages/testing/vitest/src/helpers/moduleContract.d.ts +15 -0
- package/types/packages/testing/vitest/src/helpers/rhf.d.ts +8 -0
- package/types/packages/testing/vitest/src/helpers/serialization.d.ts +7 -0
- package/types/packages/testing/vitest/src/helpers/sortFields.d.ts +28 -0
- package/types/packages/testing/vitest/src/helpers/windowSizes.d.ts +1 -0
- package/types/packages/testing/vitest/src/index.d.ts +6 -0
- package/types/packages/testing/vitest/src/installers/consoleError.d.ts +9 -0
- package/types/packages/testing/vitest/src/installers/index.d.ts +2 -0
- package/types/packages/testing/vitest/src/installers/rhfSubmit.d.ts +9 -0
- package/types/packages/testing/vitest/src/types.d.ts +116 -0
- package/vitest/index.js +55 -0
- package/e2e/commands/components/Accordions/commands.d.ts +0 -4
- package/e2e/commands/components/Accordions/commands.js +0 -19
- package/e2e/commands/components/Accordions/types.d.ts +0 -63
- package/e2e/commands/components/CommonActions/commands.d.ts +0 -4
- package/e2e/commands/components/CommonActions/commands.js +0 -11
- package/e2e/commands/components/CommonActions/types.d.ts +0 -20
- package/e2e/commands/components/DataGrid/commands.d.ts +0 -4
- package/e2e/commands/components/DataGrid/commands.js +0 -42
- package/e2e/commands/components/DataGrid/types.d.ts +0 -140
- package/e2e/commands/components/DynamicFilter/commands.d.ts +0 -4
- package/e2e/commands/components/DynamicFilter/commands.js +0 -12
- package/e2e/commands/components/DynamicFilter/types.d.ts +0 -27
- package/e2e/commands/components/DynamicSort/commands.d.ts +0 -4
- package/e2e/commands/components/DynamicSort/commands.js +0 -10
- package/e2e/commands/components/DynamicSort/types.d.ts +0 -26
- package/e2e/commands/components/Filters/commands.d.ts +0 -4
- package/e2e/commands/components/Filters/commands.js +0 -24
- package/e2e/commands/components/Filters/types.d.ts +0 -91
- package/e2e/commands/components/Form/commands.d.ts +0 -4
- package/e2e/commands/components/Form/commands.js +0 -11
- package/e2e/commands/components/Form/cypress/assertInitialFormState/assertInitialFormState.d.ts +0 -5
- package/e2e/commands/components/Form/cypress/assertInitialFormState/assertInitialFormState.js +0 -20
- package/e2e/commands/components/Form/cypress/assertInitialFormState/type.d.ts +0 -105
- package/e2e/commands/components/Form/cypress/assertInitialFormState/type.js +0 -1
- package/e2e/commands/components/Form/cypress/assertMandatoryFields/assertMandatoryFields.d.ts +0 -17
- package/e2e/commands/components/Form/cypress/assertMandatoryFields/assertMandatoryFields.js +0 -14
- package/e2e/commands/components/Form/cypress/assertMandatoryFields/type.d.ts +0 -28
- package/e2e/commands/components/Form/cypress/assertMandatoryFields/type.js +0 -1
- package/e2e/commands/components/Form/cypress/constants.d.ts +0 -3
- package/e2e/commands/components/Form/cypress/constants.js +0 -6
- package/e2e/commands/components/Form/cypress/fillAndAssertFormFields/fillAndAssertFormFields.d.ts +0 -8
- package/e2e/commands/components/Form/cypress/fillAndAssertFormFields/fillAndAssertFormFields.js +0 -29
- package/e2e/commands/components/Form/cypress/fillAndAssertFormFields/type.d.ts +0 -5
- package/e2e/commands/components/Form/cypress/fillAndAssertFormFields/type.js +0 -1
- package/e2e/commands/components/Form/cypress/getFormScope/getFormScope.d.ts +0 -20
- package/e2e/commands/components/Form/cypress/getFormScope/getFormScope.js +0 -8
- package/e2e/commands/components/Form/cypress/proceedFormStep/proceedFormStep.d.ts +0 -10
- package/e2e/commands/components/Form/cypress/proceedFormStep/proceedFormStep.js +0 -6
- package/e2e/commands/components/Form/cypress/proceedFormStep/type.d.ts +0 -13
- package/e2e/commands/components/Form/helpers/getFieldNameDomElement.d.ts +0 -7
- package/e2e/commands/components/Form/helpers/getFieldNameDomElement.js +0 -13
- package/e2e/commands/components/Form/types.d.ts +0 -88
- package/e2e/commands/components/MenuActions/commands.d.ts +0 -4
- package/e2e/commands/components/MenuActions/commands.js +0 -8
- package/e2e/commands/components/MenuActions/types.d.ts +0 -24
- package/e2e/commands/components/Popover/commands.d.ts +0 -4
- package/e2e/commands/components/Popover/commands.js +0 -8
- package/e2e/commands/components/Popover/types.d.ts +0 -15
- package/e2e/commands/components/PropertyValue/commands.d.ts +0 -4
- package/e2e/commands/components/PropertyValue/commands.js +0 -8
- package/e2e/commands/components/PropertyValue/types.d.ts +0 -19
- package/e2e/commands/components/Tab/commands.d.ts +0 -4
- package/e2e/commands/components/Tab/commands.js +0 -9
- package/e2e/commands/components/Tab/types.d.ts +0 -29
- package/e2e/commands/components/WindowBase/commands.d.ts +0 -4
- package/e2e/commands/components/WindowBase/commands.js +0 -24
- package/e2e/commands/components/WindowBase/types.d.ts +0 -100
- package/e2e/commands/components/index.d.ts +0 -12
- package/e2e/commands/components/index.js +0 -1
- package/e2e/commands/index.d.ts +0 -7
- package/e2e/commands/index.js +0 -1
- package/e2e/commands/intercepts/index.d.ts +0 -2
- package/e2e/commands/intercepts/index.js +0 -1
- package/e2e/commands/intercepts/noPrivileges/interceptCommands.d.ts +0 -5
- package/e2e/commands/intercepts/noPrivileges/interceptCommands.js +0 -15
- package/e2e/commands/intercepts/noPrivileges/types.d.ts +0 -8
- package/e2e/commands/intercepts/noPrivileges/types.js +0 -1
- package/e2e/commands/register.d.ts +0 -4
- package/e2e/commands/register.js +0 -19
- package/e2e/cypress.d.js +0 -1
- package/e2e/cypress.d.ts +0 -24
- package/e2e/index.d.ts +0 -1
- package/e2e/types.d.ts +0 -4
- package/index.d.ts +0 -4
- package/index.test.d.ts +0 -1
- package/testComponents/DataGrid/helpers.d.ts +0 -5
- package/testComponents/DataGrid/helpers.js +0 -95
- package/testComponents/DataGrid/index.d.ts +0 -2
- package/testComponents/DataGrid/index.js +0 -1
- package/testComponents/DataGrid/types.d.ts +0 -54
- package/testComponents/DataGrid/types.js +0 -1
- package/testComponents/DynamicFilter/helpers.d.ts +0 -5
- package/testComponents/DynamicFilter/helpers.js +0 -18
- package/testComponents/DynamicFilter/index.d.ts +0 -1
- package/testComponents/DynamicFilter/index.js +0 -1
- package/testComponents/DynamicFilter/types.d.ts +0 -0
- package/testComponents/DynamicSort/helpers.d.ts +0 -5
- package/testComponents/DynamicSort/helpers.js +0 -16
- package/testComponents/DynamicSort/index.d.ts +0 -1
- package/testComponents/DynamicSort/index.js +0 -1
- package/testComponents/index.d.ts +0 -3
- package/testComponents/index.js +0 -1
- package/testTools/constants.d.ts +0 -0
- package/testTools/index.d.ts +0 -1
- package/testTools/index.js +0 -1
- package/testTools/mocks.d.ts +0 -0
- package/testTools/setup.d.ts +0 -0
- package/testTools/setup.js +0 -1
- package/testTools/types.d.ts +0 -0
- package/testTools/utils.d.ts +0 -11
- package/testTools/utils.js +0 -23
- package/vite-env.d.ts +0 -5
package/e2e/commands/components/Form/cypress/fillAndAssertFormFields/fillAndAssertFormFields.js
DELETED
|
@@ -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 +0,0 @@
|
|
|
1
|
-
|
|
@@ -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,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,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,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,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,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,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,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,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
|
-
|
package/e2e/commands/index.d.ts
DELETED
|
@@ -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';
|
package/e2e/commands/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -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 +0,0 @@
|
|
|
1
|
-
|
package/e2e/commands/register.js
DELETED
|
@@ -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