slice-machine-ui 1.19.3-dev-environments.4 → 1.19.3-dev-environments.5
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/out/404.html +1 -1
- package/out/_next/static/chunks/pages/{_app-2e786eadea48781e.js → _app-145cc8c5d7706b50.js} +1 -1
- package/out/changelog.html +1 -1
- package/out/changes.html +1 -1
- package/out/custom-types/[customTypeId].html +1 -1
- package/out/custom-types.html +1 -1
- package/out/index.html +1 -1
- package/out/labs.html +1 -1
- package/out/page-types/[pageTypeId].html +1 -1
- package/out/slices/[lib]/[sliceName]/[variation]/simulator.html +1 -1
- package/out/slices/[lib]/[sliceName]/[variation].html +1 -1
- package/out/slices.html +1 -1
- package/package.json +4 -4
- package/test/__testutils__/index.tsx +1 -40
- package/test/pages/slices.test.tsx +0 -1
- /package/out/_next/static/{xLu8PGnzSIY5R-ulg5odF → fA-D157V1ZnM6im84NpAa}/_buildManifest.js +0 -0
- /package/out/_next/static/{xLu8PGnzSIY5R-ulg5odF → fA-D157V1ZnM6im84NpAa}/_ssgManifest.js +0 -0
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
render as rtlRender,
|
|
3
|
-
RenderOptions,
|
|
4
|
-
queryHelpers,
|
|
5
|
-
buildQueries,
|
|
6
|
-
Matcher,
|
|
7
|
-
MatcherOptions,
|
|
8
|
-
} from "@testing-library/react";
|
|
1
|
+
import { render as rtlRender, RenderOptions } from "@testing-library/react";
|
|
9
2
|
import userEvent from "@testing-library/user-event";
|
|
10
3
|
import { Store, AnyAction } from "redux";
|
|
11
4
|
|
|
@@ -62,38 +55,6 @@ function render(
|
|
|
62
55
|
};
|
|
63
56
|
}
|
|
64
57
|
|
|
65
|
-
// The queryAllByAttribute is a shortcut for attribute-based matchers
|
|
66
|
-
// You can also use document.querySelector or a combination of existing
|
|
67
|
-
// testing library utilities to find matching nodes for your query
|
|
68
|
-
const queryAllByDataCy = (
|
|
69
|
-
container: HTMLElement,
|
|
70
|
-
id: Matcher,
|
|
71
|
-
options?: MatcherOptions | undefined,
|
|
72
|
-
) => queryHelpers.queryAllByAttribute("data-cy", container, id, options);
|
|
73
|
-
|
|
74
|
-
const [
|
|
75
|
-
queryByDataCy,
|
|
76
|
-
getAllByDataCy,
|
|
77
|
-
getByDataCy,
|
|
78
|
-
findAllByDataCy,
|
|
79
|
-
findByDataCy,
|
|
80
|
-
] = buildQueries(
|
|
81
|
-
queryAllByDataCy,
|
|
82
|
-
(_c, dataCyValue) =>
|
|
83
|
-
`Found multiple elements with the data-cy attribute of: ${dataCyValue}`,
|
|
84
|
-
(_c, dataCyValue) =>
|
|
85
|
-
`Unable to find an element with the data-cy attribute of: ${dataCyValue}`,
|
|
86
|
-
);
|
|
87
|
-
|
|
88
|
-
export {
|
|
89
|
-
queryByDataCy,
|
|
90
|
-
queryAllByDataCy,
|
|
91
|
-
getByDataCy,
|
|
92
|
-
getAllByDataCy,
|
|
93
|
-
findAllByDataCy,
|
|
94
|
-
findByDataCy,
|
|
95
|
-
};
|
|
96
|
-
|
|
97
58
|
// re-export everything
|
|
98
59
|
export * from "@testing-library/react";
|
|
99
60
|
// override render method
|
|
File without changes
|
|
File without changes
|