@northern.tech/testing 0.8.3 → 0.9.0

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 (101) hide show
  1. package/dist/chunk-CKQMccvm.cjs +28 -0
  2. package/dist/mockData.cjs +1288 -953
  3. package/dist/mockData.cjs.map +1 -1
  4. package/dist/mockData.d.cts +595 -569
  5. package/dist/mockData.d.ts +595 -569
  6. package/dist/mockData.js +1278 -45
  7. package/dist/mockData.js.map +1 -1
  8. package/dist/openapi.yaml.d.cjs +0 -0
  9. package/dist/openapi.yaml.d.cts +4 -0
  10. package/dist/openapi.yaml.d.ts +5 -0
  11. package/dist/requestHandlers/deploymentHandlers.cjs +181 -1031
  12. package/dist/requestHandlers/deploymentHandlers.cjs.map +1 -1
  13. package/dist/requestHandlers/deploymentHandlers.d.cts +5 -3
  14. package/dist/requestHandlers/deploymentHandlers.d.ts +5 -3
  15. package/dist/requestHandlers/deploymentHandlers.js +190 -6
  16. package/dist/requestHandlers/deploymentHandlers.js.map +1 -1
  17. package/dist/requestHandlers/deviceHandlers.cjs +427 -1090
  18. package/dist/requestHandlers/deviceHandlers.cjs.map +1 -1
  19. package/dist/requestHandlers/deviceHandlers.d.cts +17 -15
  20. package/dist/requestHandlers/deviceHandlers.d.ts +17 -15
  21. package/dist/requestHandlers/deviceHandlers.js +427 -10
  22. package/dist/requestHandlers/deviceHandlers.js.map +1 -1
  23. package/dist/requestHandlers/monitorHandlers.cjs +21 -831
  24. package/dist/requestHandlers/monitorHandlers.cjs.map +1 -1
  25. package/dist/requestHandlers/monitorHandlers.d.cts +5 -3
  26. package/dist/requestHandlers/monitorHandlers.d.ts +5 -3
  27. package/dist/requestHandlers/monitorHandlers.js +21 -7
  28. package/dist/requestHandlers/monitorHandlers.js.map +1 -1
  29. package/dist/requestHandlers/organizationHandlers.cjs +296 -1113
  30. package/dist/requestHandlers/organizationHandlers.cjs.map +1 -1
  31. package/dist/requestHandlers/organizationHandlers.d.cts +5 -3
  32. package/dist/requestHandlers/organizationHandlers.d.ts +5 -3
  33. package/dist/requestHandlers/organizationHandlers.js +308 -6
  34. package/dist/requestHandlers/organizationHandlers.js.map +1 -1
  35. package/dist/requestHandlers/releaseHandlers.cjs +157 -960
  36. package/dist/requestHandlers/releaseHandlers.cjs.map +1 -1
  37. package/dist/requestHandlers/releaseHandlers.d.cts +5 -3
  38. package/dist/requestHandlers/releaseHandlers.d.ts +5 -3
  39. package/dist/requestHandlers/releaseHandlers.js +158 -6
  40. package/dist/requestHandlers/releaseHandlers.js.map +1 -1
  41. package/dist/requestHandlers/requestHandlers.cjs +26 -2000
  42. package/dist/requestHandlers/requestHandlers.cjs.map +1 -1
  43. package/dist/requestHandlers/requestHandlers.d.cts +5 -4
  44. package/dist/requestHandlers/requestHandlers.d.ts +5 -3
  45. package/dist/requestHandlers/requestHandlers.js +24 -32
  46. package/dist/requestHandlers/requestHandlers.js.map +1 -1
  47. package/dist/requestHandlers/userHandlers.cjs +139 -990
  48. package/dist/requestHandlers/userHandlers.cjs.map +1 -1
  49. package/dist/requestHandlers/userHandlers.d.cts +5 -3
  50. package/dist/requestHandlers/userHandlers.d.ts +5 -3
  51. package/dist/requestHandlers/userHandlers.js +139 -7
  52. package/dist/requestHandlers/userHandlers.js.map +1 -1
  53. package/dist/requestHandlers/validation.cjs +4 -0
  54. package/dist/requestHandlers/validation.d.cts +6 -0
  55. package/dist/requestHandlers/validation.d.ts +6 -0
  56. package/dist/requestHandlers/validation.js +2 -0
  57. package/dist/setupTests.cjs +148 -992
  58. package/dist/setupTests.cjs.map +1 -1
  59. package/dist/setupTests.d.cts +68 -66
  60. package/dist/setupTests.d.ts +68 -66
  61. package/dist/setupTests.js +114 -117
  62. package/dist/setupTests.js.map +1 -1
  63. package/dist/theme/light.cjs +7 -39
  64. package/dist/theme/light.cjs.map +1 -1
  65. package/dist/theme/light.d.cts +5 -10
  66. package/dist/theme/light.d.ts +5 -10
  67. package/dist/theme/light.js +7 -6
  68. package/dist/theme/light.js.map +1 -1
  69. package/dist/theme/mui.d.cjs +0 -0
  70. package/dist/theme/mui.d.cts +11 -0
  71. package/dist/theme/mui.d.ts +11 -0
  72. package/dist/utils.cjs +18 -68
  73. package/dist/utils.cjs.map +1 -1
  74. package/dist/utils.d.cts +6 -67
  75. package/dist/utils.d.ts +6 -67
  76. package/dist/utils.js +16 -10
  77. package/dist/utils.js.map +1 -1
  78. package/dist/validation-CsEFO-Cv.cjs +77 -0
  79. package/dist/validation-CsEFO-Cv.cjs.map +1 -0
  80. package/dist/validation-JDM_vsFz.js +64 -0
  81. package/dist/validation-JDM_vsFz.js.map +1 -0
  82. package/package.json +8 -6
  83. package/dist/chunk-3CVNBMEF.js +0 -161
  84. package/dist/chunk-3CVNBMEF.js.map +0 -1
  85. package/dist/chunk-7GNK7IRV.js +0 -29
  86. package/dist/chunk-7GNK7IRV.js.map +0 -1
  87. package/dist/chunk-AP4MOFMD.js +0 -239
  88. package/dist/chunk-AP4MOFMD.js.map +0 -1
  89. package/dist/chunk-DOHA53UH.js +0 -301
  90. package/dist/chunk-DOHA53UH.js.map +0 -1
  91. package/dist/chunk-H4J7L3HX.js +0 -188
  92. package/dist/chunk-H4J7L3HX.js.map +0 -1
  93. package/dist/chunk-HRGVXWMH.js +0 -17
  94. package/dist/chunk-HRGVXWMH.js.map +0 -1
  95. package/dist/chunk-KCLTR6QS.js +0 -34
  96. package/dist/chunk-KCLTR6QS.js.map +0 -1
  97. package/dist/chunk-M2TKDOPD.js +0 -266
  98. package/dist/chunk-M2TKDOPD.js.map +0 -1
  99. package/dist/chunk-O42KIJXJ.js +0 -933
  100. package/dist/chunk-O42KIJXJ.js.map +0 -1
  101. /package/dist/{baseTestConfig.json → public/baseTestConfig.json} +0 -0
package/dist/utils.d.cts CHANGED
@@ -1,69 +1,8 @@
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';
1
+ import * as _$_mui_material0 from "@mui/material";
6
2
 
3
+ //#region src/utils.d.ts
7
4
  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 };
5
+ declare const theme: _$_mui_material0.Theme;
6
+ //#endregion
7
+ export { selectMaterialUiSelectOption, theme };
8
+ //# sourceMappingURL=utils.d.cts.map
package/dist/utils.d.ts CHANGED
@@ -1,69 +1,8 @@
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';
1
+ import * as _$_mui_material0 from "@mui/material";
6
2
 
3
+ //#region src/utils.d.ts
7
4
  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 };
5
+ declare const theme: _$_mui_material0.Theme;
6
+ //#endregion
7
+ export { selectMaterialUiSelectOption, theme };
8
+ //# sourceMappingURL=utils.d.ts.map
package/dist/utils.js CHANGED
@@ -1,12 +1,18 @@
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
1
+ import { light } from "./theme/light.js";
2
+ import { createTheme } from "@mui/material/styles";
3
+ import { act, queryByRole, waitFor, within } from "@testing-library/react";
4
+ import { expect } from "vitest";
5
+ //#region src/utils.ts
6
+ const selectMaterialUiSelectOption = async (element, optionText, user) => {
7
+ const selectButton = element.parentNode.querySelector("[role=combobox]");
8
+ await act(async () => await user.click(selectButton));
9
+ const listItem = within(queryByRole(document.documentElement, "listbox")).getByText(optionText);
10
+ await user.click(listItem);
11
+ await waitFor(() => expect(queryByRole(document.documentElement, "listbox")).not.toBeInTheDocument());
12
+ return Promise.resolve();
11
13
  };
14
+ const theme = createTheme(light);
15
+ //#endregion
16
+ export { selectMaterialUiSelectOption, theme };
17
+
12
18
  //# sourceMappingURL=utils.js.map
package/dist/utils.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
1
+ {"version":3,"file":"utils.js","names":[],"sources":["../src/utils.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.\nimport { createTheme } from '@mui/material/styles';\n\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"],"mappings":";;;;;AAoBA,MAAa,+BAA+B,OAAO,SAAS,YAAY,SAAS;CAE/E,MAAM,eAAe,QAAQ,WAAW,cAAc,kBAAkB;AAExE,OAAM,IAAI,YAAY,MAAM,KAAK,MAAM,aAAa,CAAC;CAIrD,MAAM,WAAW,OAFD,YAAY,SAAS,iBAAiB,UAAU,CAE/B,CAAC,UAAU,WAAW;AACvD,OAAM,KAAK,MAAM,SAAS;AAE1B,OAAM,cAAc,OAAO,YAAY,SAAS,iBAAiB,UAAU,CAAC,CAAC,IAAI,mBAAmB,CAAC;AACrG,QAAO,QAAQ,SAAS;;AAG1B,MAAa,QAAQ,YAAY,MAAM"}