@m4l/testing 0.0.23 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +85 -102
- 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/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 -20
- package/e2e/commands/components/WindowBase/types.d.ts +0 -84
- package/e2e/commands/components/index.d.ts +0 -11
- package/e2e/commands/components/index.js +0 -1
- package/e2e/commands/index.d.ts +0 -4
- 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 -18
- package/e2e/cypress.d.js +0 -1
- package/e2e/cypress.d.ts +0 -23
- 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
|
@@ -1,11 +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';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
package/e2e/commands/index.d.ts
DELETED
|
@@ -1,4 +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';
|
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,18 +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
|
-
const w = () => {
|
|
14
|
-
r(), m(), o(), s(), e(), i(), t(), a(), n(), d(), p(), g();
|
|
15
|
-
};
|
|
16
|
-
export {
|
|
17
|
-
w as r
|
|
18
|
-
};
|
package/e2e/cypress.d.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
package/e2e/cypress.d.ts
DELETED
|
@@ -1,23 +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
|
-
|
|
13
|
-
|
|
14
|
-
declare global {
|
|
15
|
-
namespace Cypress {
|
|
16
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
17
|
-
interface Chainable {
|
|
18
|
-
// Los tipos se extienden automáticamente desde los archivos importados
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export {};
|
package/e2e/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './commands';
|
package/e2e/types.d.ts
DELETED
package/index.d.ts
DELETED
package/index.test.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -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 +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,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,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
|
-
|
package/testComponents/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
package/testTools/constants.d.ts
DELETED
|
File without changes
|
package/testTools/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './utils';
|
package/testTools/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
package/testTools/mocks.d.ts
DELETED
|
File without changes
|
package/testTools/setup.d.ts
DELETED
|
File without changes
|
package/testTools/setup.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import "@testing-library/jest-dom";
|
package/testTools/types.d.ts
DELETED
|
File without changes
|
package/testTools/utils.d.ts
DELETED
|
@@ -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, };
|
package/testTools/utils.js
DELETED
|
@@ -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
|
-
};
|