@northern.tech/testing 0.8.1 → 0.8.3

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 (86) hide show
  1. package/dist/baseTestConfig.json +17 -0
  2. package/dist/chunk-3CVNBMEF.js +161 -0
  3. package/dist/chunk-3CVNBMEF.js.map +1 -0
  4. package/dist/chunk-7GNK7IRV.js +29 -0
  5. package/dist/chunk-7GNK7IRV.js.map +1 -0
  6. package/dist/chunk-AP4MOFMD.js +239 -0
  7. package/dist/chunk-AP4MOFMD.js.map +1 -0
  8. package/dist/chunk-DOHA53UH.js +301 -0
  9. package/dist/chunk-DOHA53UH.js.map +1 -0
  10. package/dist/chunk-H4J7L3HX.js +188 -0
  11. package/dist/chunk-H4J7L3HX.js.map +1 -0
  12. package/dist/chunk-HRGVXWMH.js +17 -0
  13. package/dist/chunk-HRGVXWMH.js.map +1 -0
  14. package/dist/chunk-KCLTR6QS.js +34 -0
  15. package/dist/chunk-KCLTR6QS.js.map +1 -0
  16. package/dist/chunk-M2TKDOPD.js +266 -0
  17. package/dist/chunk-M2TKDOPD.js.map +1 -0
  18. package/dist/chunk-O42KIJXJ.js +933 -0
  19. package/dist/chunk-O42KIJXJ.js.map +1 -0
  20. package/dist/mockData.cjs +967 -0
  21. package/dist/mockData.cjs.map +1 -0
  22. package/dist/mockData.d.cts +636 -0
  23. package/dist/mockData.d.ts +636 -0
  24. package/dist/mockData.js +47 -0
  25. package/dist/mockData.js.map +1 -0
  26. package/dist/requestHandlers/deploymentHandlers.cjs +1044 -0
  27. package/dist/requestHandlers/deploymentHandlers.cjs.map +1 -0
  28. package/dist/requestHandlers/deploymentHandlers.d.cts +5 -0
  29. package/dist/requestHandlers/deploymentHandlers.d.ts +5 -0
  30. package/dist/requestHandlers/deploymentHandlers.js +8 -0
  31. package/dist/requestHandlers/deploymentHandlers.js.map +1 -0
  32. package/dist/requestHandlers/deviceHandlers.cjs +1096 -0
  33. package/dist/requestHandlers/deviceHandlers.cjs.map +1 -0
  34. package/dist/requestHandlers/deviceHandlers.d.cts +20 -0
  35. package/dist/requestHandlers/deviceHandlers.d.ts +20 -0
  36. package/dist/requestHandlers/deviceHandlers.js +12 -0
  37. package/dist/requestHandlers/deviceHandlers.js.map +1 -0
  38. package/dist/requestHandlers/monitorHandlers.cjs +834 -0
  39. package/dist/requestHandlers/monitorHandlers.cjs.map +1 -0
  40. package/dist/requestHandlers/monitorHandlers.d.cts +5 -0
  41. package/dist/requestHandlers/monitorHandlers.d.ts +5 -0
  42. package/dist/requestHandlers/monitorHandlers.js +8 -0
  43. package/dist/requestHandlers/monitorHandlers.js.map +1 -0
  44. package/dist/requestHandlers/organizationHandlers.cjs +1129 -0
  45. package/dist/requestHandlers/organizationHandlers.cjs.map +1 -0
  46. package/dist/requestHandlers/organizationHandlers.d.cts +5 -0
  47. package/dist/requestHandlers/organizationHandlers.d.ts +5 -0
  48. package/dist/requestHandlers/organizationHandlers.js +8 -0
  49. package/dist/requestHandlers/organizationHandlers.js.map +1 -0
  50. package/dist/requestHandlers/releaseHandlers.cjs +965 -0
  51. package/dist/requestHandlers/releaseHandlers.cjs.map +1 -0
  52. package/dist/requestHandlers/releaseHandlers.d.cts +5 -0
  53. package/dist/requestHandlers/releaseHandlers.d.ts +5 -0
  54. package/dist/requestHandlers/releaseHandlers.js +8 -0
  55. package/dist/requestHandlers/releaseHandlers.js.map +1 -0
  56. package/dist/requestHandlers/requestHandlers.cjs +2002 -0
  57. package/dist/requestHandlers/requestHandlers.cjs.map +1 -0
  58. package/dist/requestHandlers/requestHandlers.d.cts +5 -0
  59. package/dist/requestHandlers/requestHandlers.d.ts +5 -0
  60. package/dist/requestHandlers/requestHandlers.js +35 -0
  61. package/dist/requestHandlers/requestHandlers.js.map +1 -0
  62. package/dist/requestHandlers/userHandlers.cjs +993 -0
  63. package/dist/requestHandlers/userHandlers.cjs.map +1 -0
  64. package/dist/requestHandlers/userHandlers.d.cts +5 -0
  65. package/dist/requestHandlers/userHandlers.d.ts +5 -0
  66. package/dist/requestHandlers/userHandlers.js +8 -0
  67. package/dist/requestHandlers/userHandlers.js.map +1 -0
  68. package/dist/setupTests.cjs +995 -0
  69. package/dist/setupTests.cjs.map +1 -0
  70. package/dist/setupTests.d.cts +77 -0
  71. package/dist/setupTests.d.ts +77 -0
  72. package/dist/setupTests.js +138 -0
  73. package/dist/setupTests.js.map +1 -0
  74. package/dist/theme/light.cjs +41 -0
  75. package/dist/theme/light.cjs.map +1 -0
  76. package/dist/theme/light.d.cts +12 -0
  77. package/dist/theme/light.d.ts +12 -0
  78. package/dist/theme/light.js +7 -0
  79. package/dist/theme/light.js.map +1 -0
  80. package/dist/utils.cjs +71 -0
  81. package/dist/utils.cjs.map +1 -0
  82. package/dist/utils.d.cts +69 -0
  83. package/dist/utils.d.ts +69 -0
  84. package/dist/utils.js +12 -0
  85. package/dist/utils.js.map +1 -0
  86. package/package.json +1 -1
package/dist/utils.cjs ADDED
@@ -0,0 +1,71 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/utils.tsx
21
+ var utils_exports = {};
22
+ __export(utils_exports, {
23
+ renderWithRouter: () => renderWithRouter,
24
+ selectMaterialUiSelectOption: () => selectMaterialUiSelectOption,
25
+ theme: () => theme
26
+ });
27
+ module.exports = __toCommonJS(utils_exports);
28
+ var import_react_redux = require("react-redux");
29
+ var import_react_router_dom = require("react-router-dom");
30
+ var import_styles = require("@mui/material/styles");
31
+ var import_react = require("@testing-library/react");
32
+ var import_react2 = require("@testing-library/react");
33
+ var import_vitest = require("vitest");
34
+
35
+ // src/theme/light.ts
36
+ var palette = {
37
+ border: {
38
+ main: "#e3e3e3"
39
+ },
40
+ tooltip: {
41
+ tierTipBackground: "#f7fafb"
42
+ }
43
+ };
44
+ var light = {
45
+ palette
46
+ };
47
+
48
+ // src/utils.tsx
49
+ var import_jsx_runtime = require("react/jsx-runtime");
50
+ var selectMaterialUiSelectOption = async (element, optionText, user) => {
51
+ const selectButton = element.parentNode.querySelector("[role=combobox]");
52
+ await (0, import_react2.act)(async () => await user.click(selectButton));
53
+ const listbox = (0, import_react2.queryByRole)(document.documentElement, "listbox");
54
+ const listItem = (0, import_react2.within)(listbox).getByText(optionText);
55
+ await user.click(listItem);
56
+ await (0, import_react2.waitFor)(() => (0, import_vitest.expect)((0, import_react2.queryByRole)(document.documentElement, "listbox")).not.toBeInTheDocument());
57
+ return Promise.resolve();
58
+ };
59
+ var theme = (0, import_styles.createTheme)(light);
60
+ var renderWithRouter = (ui, { route = "/", preloadedState } = {}) => {
61
+ const store = getConfiguredStore({ preloadedState });
62
+ const Wrapper = ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styles.ThemeProvider, { theme, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_router_dom.MemoryRouter, { initialEntries: [route], children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_redux.Provider, { store, children }) }) });
63
+ return { store, ...(0, import_react.render)(ui, { wrapper: Wrapper }) };
64
+ };
65
+ // Annotate the CommonJS export names for ESM import in node:
66
+ 0 && (module.exports = {
67
+ renderWithRouter,
68
+ selectMaterialUiSelectOption,
69
+ theme
70
+ });
71
+ //# sourceMappingURL=utils.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/utils.tsx","../src/theme/light.ts"],"sourcesContent":["// Copyright 2025 Northern.tech AS\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//@ts-nocheck\nimport React from 'react';\nimport { Provider } from 'react-redux';\nimport { MemoryRouter } from 'react-router-dom';\n\nimport { ThemeProvider, createTheme } from '@mui/material/styles';\n\nimport { render } from '@testing-library/react';\nimport { act, queryByRole, waitFor, within } from '@testing-library/react';\nimport { expect } from 'vitest';\n\nimport { light } from './theme/light';\n\nexport const selectMaterialUiSelectOption = async (element, optionText, user) => {\n // The button that opens the dropdown, which is a sibling of the input\n const selectButton = element.parentNode.querySelector('[role=combobox]');\n // Open the select dropdown\n await act(async () => await user.click(selectButton));\n // Get the dropdown element. We don't use getByRole() because it includes <select>s too.\n const listbox = queryByRole(document.documentElement, 'listbox');\n // Click the list item\n const listItem = within(listbox!).getByText(optionText);\n await user.click(listItem);\n // Wait for the listbox to be removed, so it isn't visible in subsequent calls\n await waitFor(() => expect(queryByRole(document.documentElement, 'listbox')).not.toBeInTheDocument());\n return Promise.resolve();\n};\n\nexport const theme = createTheme(light);\n\nexport const renderWithRouter = (ui: React.ReactElement, { route = '/', preloadedState } = {}) => {\n const store = getConfiguredStore({ preloadedState });\n const Wrapper = ({ children }) => (\n <ThemeProvider theme={theme}>\n <MemoryRouter initialEntries={[route]}>\n <Provider store={store}>{children}</Provider>\n </MemoryRouter>\n </ThemeProvider>\n );\n return { store, ...render(ui, { wrapper: Wrapper }) };\n};\n","// Copyright 2022 Northern.tech AS\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nconst palette = {\n border: {\n main: '#e3e3e3'\n },\n tooltip: {\n tierTipBackground: '#f7fafb'\n }\n};\n\nexport const light = {\n palette\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAeA,yBAAyB;AACzB,8BAA6B;AAE7B,oBAA2C;AAE3C,mBAAuB;AACvB,IAAAA,gBAAkD;AAClD,oBAAuB;;;ACRvB,IAAM,UAAU;AAAA,EACd,QAAQ;AAAA,IACN,MAAM;AAAA,EACR;AAAA,EACA,SAAS;AAAA,IACP,mBAAmB;AAAA,EACrB;AACF;AAEO,IAAM,QAAQ;AAAA,EACnB;AACF;;;ADuBQ;AAtBD,IAAM,+BAA+B,OAAO,SAAS,YAAY,SAAS;AAE/E,QAAM,eAAe,QAAQ,WAAW,cAAc,iBAAiB;AAEvE,YAAM,mBAAI,YAAY,MAAM,KAAK,MAAM,YAAY,CAAC;AAEpD,QAAM,cAAU,2BAAY,SAAS,iBAAiB,SAAS;AAE/D,QAAM,eAAW,sBAAO,OAAQ,EAAE,UAAU,UAAU;AACtD,QAAM,KAAK,MAAM,QAAQ;AAEzB,YAAM,uBAAQ,UAAM,0BAAO,2BAAY,SAAS,iBAAiB,SAAS,CAAC,EAAE,IAAI,kBAAkB,CAAC;AACpG,SAAO,QAAQ,QAAQ;AACzB;AAEO,IAAM,YAAQ,2BAAY,KAAK;AAE/B,IAAM,mBAAmB,CAAC,IAAwB,EAAE,QAAQ,KAAK,eAAe,IAAI,CAAC,MAAM;AAChG,QAAM,QAAQ,mBAAmB,EAAE,eAAe,CAAC;AACnD,QAAM,UAAU,CAAC,EAAE,SAAS,MAC1B,4CAAC,+BAAc,OACb,sDAAC,wCAAa,gBAAgB,CAAC,KAAK,GAClC,sDAAC,+BAAS,OAAe,UAAS,GACpC,GACF;AAEF,SAAO,EAAE,OAAO,OAAG,qBAAO,IAAI,EAAE,SAAS,QAAQ,CAAC,EAAE;AACtD;","names":["import_react"]}
@@ -0,0 +1,69 @@
1
+ import * as _testing_library_dom from '@testing-library/dom';
2
+ import * as pretty_format from 'pretty-format';
3
+ import * as react_dom_client from 'react-dom/client';
4
+ import * as _mui_material_styles from '@mui/material/styles';
5
+ import React from 'react';
6
+
7
+ declare const selectMaterialUiSelectOption: (element: any, optionText: any, user: any) => Promise<void>;
8
+ declare const theme: _mui_material_styles.Theme;
9
+ declare const renderWithRouter: (ui: React.ReactElement, { route, preloadedState }?: {
10
+ route?: string | undefined;
11
+ }) => {
12
+ container: HTMLElement;
13
+ baseElement: HTMLElement;
14
+ debug: (baseElement?: react_dom_client.Container | (Element | Document) | Array<react_dom_client.Container | (Element | Document)> | undefined, maxLength?: number | undefined, options?: pretty_format.OptionsReceived | undefined) => void;
15
+ rerender: (ui: React.ReactNode) => void;
16
+ unmount: () => void;
17
+ asFragment: () => DocumentFragment;
18
+ getByLabelText: (id: _testing_library_dom.Matcher, options?: _testing_library_dom.SelectorMatcherOptions | undefined) => HTMLElement;
19
+ getAllByLabelText: (id: _testing_library_dom.Matcher, options?: _testing_library_dom.SelectorMatcherOptions | undefined) => HTMLElement[];
20
+ queryByLabelText: (id: _testing_library_dom.Matcher, options?: _testing_library_dom.SelectorMatcherOptions | undefined) => HTMLElement | null;
21
+ queryAllByLabelText: (id: _testing_library_dom.Matcher, options?: _testing_library_dom.SelectorMatcherOptions | undefined) => HTMLElement[];
22
+ findByLabelText: (id: _testing_library_dom.Matcher, options?: _testing_library_dom.SelectorMatcherOptions | undefined, waitForElementOptions?: _testing_library_dom.waitForOptions | undefined) => Promise<HTMLElement>;
23
+ findAllByLabelText: (id: _testing_library_dom.Matcher, options?: _testing_library_dom.SelectorMatcherOptions | undefined, waitForElementOptions?: _testing_library_dom.waitForOptions | undefined) => Promise<HTMLElement[]>;
24
+ getByPlaceholderText: (id: _testing_library_dom.Matcher, options?: _testing_library_dom.MatcherOptions | undefined) => HTMLElement;
25
+ getAllByPlaceholderText: (id: _testing_library_dom.Matcher, options?: _testing_library_dom.MatcherOptions | undefined) => HTMLElement[];
26
+ queryByPlaceholderText: (id: _testing_library_dom.Matcher, options?: _testing_library_dom.MatcherOptions | undefined) => HTMLElement | null;
27
+ queryAllByPlaceholderText: (id: _testing_library_dom.Matcher, options?: _testing_library_dom.MatcherOptions | undefined) => HTMLElement[];
28
+ findByPlaceholderText: (id: _testing_library_dom.Matcher, options?: _testing_library_dom.MatcherOptions | undefined, waitForElementOptions?: _testing_library_dom.waitForOptions | undefined) => Promise<HTMLElement>;
29
+ findAllByPlaceholderText: (id: _testing_library_dom.Matcher, options?: _testing_library_dom.MatcherOptions | undefined, waitForElementOptions?: _testing_library_dom.waitForOptions | undefined) => Promise<HTMLElement[]>;
30
+ getByText: (id: _testing_library_dom.Matcher, options?: _testing_library_dom.SelectorMatcherOptions | undefined) => HTMLElement;
31
+ getAllByText: (id: _testing_library_dom.Matcher, options?: _testing_library_dom.SelectorMatcherOptions | undefined) => HTMLElement[];
32
+ queryByText: (id: _testing_library_dom.Matcher, options?: _testing_library_dom.SelectorMatcherOptions | undefined) => HTMLElement | null;
33
+ queryAllByText: (id: _testing_library_dom.Matcher, options?: _testing_library_dom.SelectorMatcherOptions | undefined) => HTMLElement[];
34
+ findByText: (id: _testing_library_dom.Matcher, options?: _testing_library_dom.SelectorMatcherOptions | undefined, waitForElementOptions?: _testing_library_dom.waitForOptions | undefined) => Promise<HTMLElement>;
35
+ findAllByText: (id: _testing_library_dom.Matcher, options?: _testing_library_dom.SelectorMatcherOptions | undefined, waitForElementOptions?: _testing_library_dom.waitForOptions | undefined) => Promise<HTMLElement[]>;
36
+ getByAltText: (id: _testing_library_dom.Matcher, options?: _testing_library_dom.MatcherOptions | undefined) => HTMLElement;
37
+ getAllByAltText: (id: _testing_library_dom.Matcher, options?: _testing_library_dom.MatcherOptions | undefined) => HTMLElement[];
38
+ queryByAltText: (id: _testing_library_dom.Matcher, options?: _testing_library_dom.MatcherOptions | undefined) => HTMLElement | null;
39
+ queryAllByAltText: (id: _testing_library_dom.Matcher, options?: _testing_library_dom.MatcherOptions | undefined) => HTMLElement[];
40
+ findByAltText: (id: _testing_library_dom.Matcher, options?: _testing_library_dom.MatcherOptions | undefined, waitForElementOptions?: _testing_library_dom.waitForOptions | undefined) => Promise<HTMLElement>;
41
+ findAllByAltText: (id: _testing_library_dom.Matcher, options?: _testing_library_dom.MatcherOptions | undefined, waitForElementOptions?: _testing_library_dom.waitForOptions | undefined) => Promise<HTMLElement[]>;
42
+ getByTitle: (id: _testing_library_dom.Matcher, options?: _testing_library_dom.MatcherOptions | undefined) => HTMLElement;
43
+ getAllByTitle: (id: _testing_library_dom.Matcher, options?: _testing_library_dom.MatcherOptions | undefined) => HTMLElement[];
44
+ queryByTitle: (id: _testing_library_dom.Matcher, options?: _testing_library_dom.MatcherOptions | undefined) => HTMLElement | null;
45
+ queryAllByTitle: (id: _testing_library_dom.Matcher, options?: _testing_library_dom.MatcherOptions | undefined) => HTMLElement[];
46
+ findByTitle: (id: _testing_library_dom.Matcher, options?: _testing_library_dom.MatcherOptions | undefined, waitForElementOptions?: _testing_library_dom.waitForOptions | undefined) => Promise<HTMLElement>;
47
+ findAllByTitle: (id: _testing_library_dom.Matcher, options?: _testing_library_dom.MatcherOptions | undefined, waitForElementOptions?: _testing_library_dom.waitForOptions | undefined) => Promise<HTMLElement[]>;
48
+ getByDisplayValue: (id: _testing_library_dom.Matcher, options?: _testing_library_dom.MatcherOptions | undefined) => HTMLElement;
49
+ getAllByDisplayValue: (id: _testing_library_dom.Matcher, options?: _testing_library_dom.MatcherOptions | undefined) => HTMLElement[];
50
+ queryByDisplayValue: (id: _testing_library_dom.Matcher, options?: _testing_library_dom.MatcherOptions | undefined) => HTMLElement | null;
51
+ queryAllByDisplayValue: (id: _testing_library_dom.Matcher, options?: _testing_library_dom.MatcherOptions | undefined) => HTMLElement[];
52
+ findByDisplayValue: (id: _testing_library_dom.Matcher, options?: _testing_library_dom.MatcherOptions | undefined, waitForElementOptions?: _testing_library_dom.waitForOptions | undefined) => Promise<HTMLElement>;
53
+ findAllByDisplayValue: (id: _testing_library_dom.Matcher, options?: _testing_library_dom.MatcherOptions | undefined, waitForElementOptions?: _testing_library_dom.waitForOptions | undefined) => Promise<HTMLElement[]>;
54
+ getByRole: (role: _testing_library_dom.ByRoleMatcher, options?: _testing_library_dom.ByRoleOptions | undefined) => HTMLElement;
55
+ getAllByRole: (role: _testing_library_dom.ByRoleMatcher, options?: _testing_library_dom.ByRoleOptions | undefined) => HTMLElement[];
56
+ queryByRole: (role: _testing_library_dom.ByRoleMatcher, options?: _testing_library_dom.ByRoleOptions | undefined) => HTMLElement | null;
57
+ queryAllByRole: (role: _testing_library_dom.ByRoleMatcher, options?: _testing_library_dom.ByRoleOptions | undefined) => HTMLElement[];
58
+ findByRole: (role: _testing_library_dom.ByRoleMatcher, options?: _testing_library_dom.ByRoleOptions | undefined, waitForElementOptions?: _testing_library_dom.waitForOptions | undefined) => Promise<HTMLElement>;
59
+ findAllByRole: (role: _testing_library_dom.ByRoleMatcher, options?: _testing_library_dom.ByRoleOptions | undefined, waitForElementOptions?: _testing_library_dom.waitForOptions | undefined) => Promise<HTMLElement[]>;
60
+ getByTestId: (id: _testing_library_dom.Matcher, options?: _testing_library_dom.MatcherOptions | undefined) => HTMLElement;
61
+ getAllByTestId: (id: _testing_library_dom.Matcher, options?: _testing_library_dom.MatcherOptions | undefined) => HTMLElement[];
62
+ queryByTestId: (id: _testing_library_dom.Matcher, options?: _testing_library_dom.MatcherOptions | undefined) => HTMLElement | null;
63
+ queryAllByTestId: (id: _testing_library_dom.Matcher, options?: _testing_library_dom.MatcherOptions | undefined) => HTMLElement[];
64
+ findByTestId: (id: _testing_library_dom.Matcher, options?: _testing_library_dom.MatcherOptions | undefined, waitForElementOptions?: _testing_library_dom.waitForOptions | undefined) => Promise<HTMLElement>;
65
+ findAllByTestId: (id: _testing_library_dom.Matcher, options?: _testing_library_dom.MatcherOptions | undefined, waitForElementOptions?: _testing_library_dom.waitForOptions | undefined) => Promise<HTMLElement[]>;
66
+ store: any;
67
+ };
68
+
69
+ export { renderWithRouter, selectMaterialUiSelectOption, theme };
@@ -0,0 +1,69 @@
1
+ import * as _testing_library_dom from '@testing-library/dom';
2
+ import * as pretty_format from 'pretty-format';
3
+ import * as react_dom_client from 'react-dom/client';
4
+ import * as _mui_material_styles from '@mui/material/styles';
5
+ import React from 'react';
6
+
7
+ declare const selectMaterialUiSelectOption: (element: any, optionText: any, user: any) => Promise<void>;
8
+ declare const theme: _mui_material_styles.Theme;
9
+ declare const renderWithRouter: (ui: React.ReactElement, { route, preloadedState }?: {
10
+ route?: string | undefined;
11
+ }) => {
12
+ container: HTMLElement;
13
+ baseElement: HTMLElement;
14
+ debug: (baseElement?: react_dom_client.Container | (Element | Document) | Array<react_dom_client.Container | (Element | Document)> | undefined, maxLength?: number | undefined, options?: pretty_format.OptionsReceived | undefined) => void;
15
+ rerender: (ui: React.ReactNode) => void;
16
+ unmount: () => void;
17
+ asFragment: () => DocumentFragment;
18
+ getByLabelText: (id: _testing_library_dom.Matcher, options?: _testing_library_dom.SelectorMatcherOptions | undefined) => HTMLElement;
19
+ getAllByLabelText: (id: _testing_library_dom.Matcher, options?: _testing_library_dom.SelectorMatcherOptions | undefined) => HTMLElement[];
20
+ queryByLabelText: (id: _testing_library_dom.Matcher, options?: _testing_library_dom.SelectorMatcherOptions | undefined) => HTMLElement | null;
21
+ queryAllByLabelText: (id: _testing_library_dom.Matcher, options?: _testing_library_dom.SelectorMatcherOptions | undefined) => HTMLElement[];
22
+ findByLabelText: (id: _testing_library_dom.Matcher, options?: _testing_library_dom.SelectorMatcherOptions | undefined, waitForElementOptions?: _testing_library_dom.waitForOptions | undefined) => Promise<HTMLElement>;
23
+ findAllByLabelText: (id: _testing_library_dom.Matcher, options?: _testing_library_dom.SelectorMatcherOptions | undefined, waitForElementOptions?: _testing_library_dom.waitForOptions | undefined) => Promise<HTMLElement[]>;
24
+ getByPlaceholderText: (id: _testing_library_dom.Matcher, options?: _testing_library_dom.MatcherOptions | undefined) => HTMLElement;
25
+ getAllByPlaceholderText: (id: _testing_library_dom.Matcher, options?: _testing_library_dom.MatcherOptions | undefined) => HTMLElement[];
26
+ queryByPlaceholderText: (id: _testing_library_dom.Matcher, options?: _testing_library_dom.MatcherOptions | undefined) => HTMLElement | null;
27
+ queryAllByPlaceholderText: (id: _testing_library_dom.Matcher, options?: _testing_library_dom.MatcherOptions | undefined) => HTMLElement[];
28
+ findByPlaceholderText: (id: _testing_library_dom.Matcher, options?: _testing_library_dom.MatcherOptions | undefined, waitForElementOptions?: _testing_library_dom.waitForOptions | undefined) => Promise<HTMLElement>;
29
+ findAllByPlaceholderText: (id: _testing_library_dom.Matcher, options?: _testing_library_dom.MatcherOptions | undefined, waitForElementOptions?: _testing_library_dom.waitForOptions | undefined) => Promise<HTMLElement[]>;
30
+ getByText: (id: _testing_library_dom.Matcher, options?: _testing_library_dom.SelectorMatcherOptions | undefined) => HTMLElement;
31
+ getAllByText: (id: _testing_library_dom.Matcher, options?: _testing_library_dom.SelectorMatcherOptions | undefined) => HTMLElement[];
32
+ queryByText: (id: _testing_library_dom.Matcher, options?: _testing_library_dom.SelectorMatcherOptions | undefined) => HTMLElement | null;
33
+ queryAllByText: (id: _testing_library_dom.Matcher, options?: _testing_library_dom.SelectorMatcherOptions | undefined) => HTMLElement[];
34
+ findByText: (id: _testing_library_dom.Matcher, options?: _testing_library_dom.SelectorMatcherOptions | undefined, waitForElementOptions?: _testing_library_dom.waitForOptions | undefined) => Promise<HTMLElement>;
35
+ findAllByText: (id: _testing_library_dom.Matcher, options?: _testing_library_dom.SelectorMatcherOptions | undefined, waitForElementOptions?: _testing_library_dom.waitForOptions | undefined) => Promise<HTMLElement[]>;
36
+ getByAltText: (id: _testing_library_dom.Matcher, options?: _testing_library_dom.MatcherOptions | undefined) => HTMLElement;
37
+ getAllByAltText: (id: _testing_library_dom.Matcher, options?: _testing_library_dom.MatcherOptions | undefined) => HTMLElement[];
38
+ queryByAltText: (id: _testing_library_dom.Matcher, options?: _testing_library_dom.MatcherOptions | undefined) => HTMLElement | null;
39
+ queryAllByAltText: (id: _testing_library_dom.Matcher, options?: _testing_library_dom.MatcherOptions | undefined) => HTMLElement[];
40
+ findByAltText: (id: _testing_library_dom.Matcher, options?: _testing_library_dom.MatcherOptions | undefined, waitForElementOptions?: _testing_library_dom.waitForOptions | undefined) => Promise<HTMLElement>;
41
+ findAllByAltText: (id: _testing_library_dom.Matcher, options?: _testing_library_dom.MatcherOptions | undefined, waitForElementOptions?: _testing_library_dom.waitForOptions | undefined) => Promise<HTMLElement[]>;
42
+ getByTitle: (id: _testing_library_dom.Matcher, options?: _testing_library_dom.MatcherOptions | undefined) => HTMLElement;
43
+ getAllByTitle: (id: _testing_library_dom.Matcher, options?: _testing_library_dom.MatcherOptions | undefined) => HTMLElement[];
44
+ queryByTitle: (id: _testing_library_dom.Matcher, options?: _testing_library_dom.MatcherOptions | undefined) => HTMLElement | null;
45
+ queryAllByTitle: (id: _testing_library_dom.Matcher, options?: _testing_library_dom.MatcherOptions | undefined) => HTMLElement[];
46
+ findByTitle: (id: _testing_library_dom.Matcher, options?: _testing_library_dom.MatcherOptions | undefined, waitForElementOptions?: _testing_library_dom.waitForOptions | undefined) => Promise<HTMLElement>;
47
+ findAllByTitle: (id: _testing_library_dom.Matcher, options?: _testing_library_dom.MatcherOptions | undefined, waitForElementOptions?: _testing_library_dom.waitForOptions | undefined) => Promise<HTMLElement[]>;
48
+ getByDisplayValue: (id: _testing_library_dom.Matcher, options?: _testing_library_dom.MatcherOptions | undefined) => HTMLElement;
49
+ getAllByDisplayValue: (id: _testing_library_dom.Matcher, options?: _testing_library_dom.MatcherOptions | undefined) => HTMLElement[];
50
+ queryByDisplayValue: (id: _testing_library_dom.Matcher, options?: _testing_library_dom.MatcherOptions | undefined) => HTMLElement | null;
51
+ queryAllByDisplayValue: (id: _testing_library_dom.Matcher, options?: _testing_library_dom.MatcherOptions | undefined) => HTMLElement[];
52
+ findByDisplayValue: (id: _testing_library_dom.Matcher, options?: _testing_library_dom.MatcherOptions | undefined, waitForElementOptions?: _testing_library_dom.waitForOptions | undefined) => Promise<HTMLElement>;
53
+ findAllByDisplayValue: (id: _testing_library_dom.Matcher, options?: _testing_library_dom.MatcherOptions | undefined, waitForElementOptions?: _testing_library_dom.waitForOptions | undefined) => Promise<HTMLElement[]>;
54
+ getByRole: (role: _testing_library_dom.ByRoleMatcher, options?: _testing_library_dom.ByRoleOptions | undefined) => HTMLElement;
55
+ getAllByRole: (role: _testing_library_dom.ByRoleMatcher, options?: _testing_library_dom.ByRoleOptions | undefined) => HTMLElement[];
56
+ queryByRole: (role: _testing_library_dom.ByRoleMatcher, options?: _testing_library_dom.ByRoleOptions | undefined) => HTMLElement | null;
57
+ queryAllByRole: (role: _testing_library_dom.ByRoleMatcher, options?: _testing_library_dom.ByRoleOptions | undefined) => HTMLElement[];
58
+ findByRole: (role: _testing_library_dom.ByRoleMatcher, options?: _testing_library_dom.ByRoleOptions | undefined, waitForElementOptions?: _testing_library_dom.waitForOptions | undefined) => Promise<HTMLElement>;
59
+ findAllByRole: (role: _testing_library_dom.ByRoleMatcher, options?: _testing_library_dom.ByRoleOptions | undefined, waitForElementOptions?: _testing_library_dom.waitForOptions | undefined) => Promise<HTMLElement[]>;
60
+ getByTestId: (id: _testing_library_dom.Matcher, options?: _testing_library_dom.MatcherOptions | undefined) => HTMLElement;
61
+ getAllByTestId: (id: _testing_library_dom.Matcher, options?: _testing_library_dom.MatcherOptions | undefined) => HTMLElement[];
62
+ queryByTestId: (id: _testing_library_dom.Matcher, options?: _testing_library_dom.MatcherOptions | undefined) => HTMLElement | null;
63
+ queryAllByTestId: (id: _testing_library_dom.Matcher, options?: _testing_library_dom.MatcherOptions | undefined) => HTMLElement[];
64
+ findByTestId: (id: _testing_library_dom.Matcher, options?: _testing_library_dom.MatcherOptions | undefined, waitForElementOptions?: _testing_library_dom.waitForOptions | undefined) => Promise<HTMLElement>;
65
+ findAllByTestId: (id: _testing_library_dom.Matcher, options?: _testing_library_dom.MatcherOptions | undefined, waitForElementOptions?: _testing_library_dom.waitForOptions | undefined) => Promise<HTMLElement[]>;
66
+ store: any;
67
+ };
68
+
69
+ export { renderWithRouter, selectMaterialUiSelectOption, theme };
package/dist/utils.js ADDED
@@ -0,0 +1,12 @@
1
+ import {
2
+ renderWithRouter,
3
+ selectMaterialUiSelectOption,
4
+ theme
5
+ } from "./chunk-KCLTR6QS.js";
6
+ import "./chunk-HRGVXWMH.js";
7
+ export {
8
+ renderWithRouter,
9
+ selectMaterialUiSelectOption,
10
+ theme
11
+ };
12
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@northern.tech/testing",
3
- "version": "0.8.1",
3
+ "version": "0.8.3",
4
4
  "license": "Apache-2.0",
5
5
  "private": false,
6
6
  "publishConfig": {