@open-pioneer/test-utils 0.1.1 → 0.1.2
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/CHANGELOG.md +9 -0
- package/package.json +9 -6
- package/react.d.ts +45 -0
- package/services.d.ts +61 -0
- package/web-components.d.ts +135 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @open-pioneer/test-utils
|
|
2
2
|
|
|
3
|
+
## 0.1.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- a40f12d: Update build-package tool. TypeScript declaration files should now be available.
|
|
8
|
+
- Updated dependencies [a40f12d]
|
|
9
|
+
- @open-pioneer/chakra-integration@0.1.2
|
|
10
|
+
- @open-pioneer/runtime@0.1.2
|
|
11
|
+
|
|
3
12
|
## 0.1.1
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -1,26 +1,29 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@open-pioneer/test-utils",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.2",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@testing-library/react": "^14.0.0",
|
|
7
7
|
"react": "^18.2.0",
|
|
8
8
|
"react-dom": "^18.2.0",
|
|
9
9
|
"@testing-library/dom": "^9.3.0",
|
|
10
10
|
"@formatjs/intl": "^2.7.2",
|
|
11
|
-
"@open-pioneer/runtime": "^0.1.
|
|
12
|
-
"@open-pioneer/chakra-integration": "^0.1.
|
|
11
|
+
"@open-pioneer/runtime": "^0.1.2",
|
|
12
|
+
"@open-pioneer/chakra-integration": "^0.1.2"
|
|
13
13
|
},
|
|
14
14
|
"exports": {
|
|
15
15
|
"./package.json": "./package.json",
|
|
16
16
|
"./web-components": {
|
|
17
|
-
"import": "./web-components.js"
|
|
17
|
+
"import": "./web-components.js",
|
|
18
|
+
"types": "./web-components.d.ts"
|
|
18
19
|
},
|
|
19
20
|
"./react": {
|
|
20
|
-
"import": "./react.js"
|
|
21
|
+
"import": "./react.js",
|
|
22
|
+
"types": "./react.d.ts"
|
|
21
23
|
},
|
|
22
24
|
"./services": {
|
|
23
|
-
"import": "./services.js"
|
|
25
|
+
"import": "./services.js",
|
|
26
|
+
"types": "./services.d.ts"
|
|
24
27
|
}
|
|
25
28
|
},
|
|
26
29
|
"openPioneerFramework": {
|
package/react.d.ts
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { Service } from "@open-pioneer/runtime";
|
|
2
|
+
import { FC, ReactNode } from "react";
|
|
3
|
+
export type AnyService = Service<any>;
|
|
4
|
+
export interface PackageContextProviderProps {
|
|
5
|
+
/** Interface implementations, keyed by interface name. */
|
|
6
|
+
services?: {
|
|
7
|
+
[interfaceName: string]: AnyService;
|
|
8
|
+
};
|
|
9
|
+
/** Interface implementations, keyed by interface name and then by qualifier. */
|
|
10
|
+
qualifiedServices?: {
|
|
11
|
+
[interfaceName: string]: {
|
|
12
|
+
[qualifier: string]: AnyService;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
/** Package properties (keyed by package name). */
|
|
16
|
+
properties?: {
|
|
17
|
+
[packageName: string]: Record<string, unknown>;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* The locale for i18n messages and formatting.
|
|
21
|
+
*
|
|
22
|
+
* @default "en"
|
|
23
|
+
*/
|
|
24
|
+
locale?: string;
|
|
25
|
+
/**
|
|
26
|
+
* I18n messages for packages
|
|
27
|
+
*/
|
|
28
|
+
messages?: {
|
|
29
|
+
/**
|
|
30
|
+
* I18n messages as (messageId, message) entries.
|
|
31
|
+
*
|
|
32
|
+
* @default {}
|
|
33
|
+
*/
|
|
34
|
+
[packageName: string]: Record<string, string>;
|
|
35
|
+
};
|
|
36
|
+
/** Children to render */
|
|
37
|
+
children?: ReactNode;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Injects services and properties into the component tree.
|
|
41
|
+
* React components using pioneer hooks like `useService` and `useProperties`
|
|
42
|
+
* will receive the mocked properties here instead.
|
|
43
|
+
* Currently also wrapped with the CustomChakraProvider to support chakra-ui elements
|
|
44
|
+
*/
|
|
45
|
+
export declare const PackageContextProvider: FC<PackageContextProviderProps>;
|
package/services.d.ts
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { Service, ServiceConstructor } from "@open-pioneer/runtime";
|
|
2
|
+
/**
|
|
3
|
+
* Options for the {@link createService} function.
|
|
4
|
+
*/
|
|
5
|
+
export interface CreateServiceOptions<References> {
|
|
6
|
+
/**
|
|
7
|
+
* References provided to the service constructor.
|
|
8
|
+
*
|
|
9
|
+
* @default {}
|
|
10
|
+
*/
|
|
11
|
+
references?: PartialServiceReferences<References>;
|
|
12
|
+
/**
|
|
13
|
+
* Properties provided to the service constructor.
|
|
14
|
+
*
|
|
15
|
+
* @default {}
|
|
16
|
+
*/
|
|
17
|
+
properties?: Record<string, unknown>;
|
|
18
|
+
/**
|
|
19
|
+
* The locale for i18n messages and formatting.
|
|
20
|
+
*
|
|
21
|
+
* @default "en"
|
|
22
|
+
*/
|
|
23
|
+
locale?: string;
|
|
24
|
+
/**
|
|
25
|
+
* The locale for embedded default messages.
|
|
26
|
+
*
|
|
27
|
+
* See also https://formatjs.io/docs/intl#message-descriptor
|
|
28
|
+
*
|
|
29
|
+
* @default "en"
|
|
30
|
+
*/
|
|
31
|
+
defaultMessageLocale?: string;
|
|
32
|
+
/**
|
|
33
|
+
* I18n messages as (messageId, message) entries.
|
|
34
|
+
*
|
|
35
|
+
* @default {}
|
|
36
|
+
*/
|
|
37
|
+
messages?: Record<string, string>;
|
|
38
|
+
}
|
|
39
|
+
type PartialServiceReferences<References> = {
|
|
40
|
+
[referenceName in keyof References]?: References[referenceName] extends any[] ? Partial<References[referenceName][number]>[] : Partial<References[referenceName]>;
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* Creates a new service instance of `clazz`.
|
|
44
|
+
*
|
|
45
|
+
* The options passed into the constructor of `clazz` are taking from the `options` parameter.
|
|
46
|
+
*
|
|
47
|
+
* This function allows the user to define mock- or test objects as service references.
|
|
48
|
+
*
|
|
49
|
+
* Most type-checking features are disabled for convenience, but by default this function's types
|
|
50
|
+
* enforce that a value provided for a reference must match the partial interface of the actually required type.
|
|
51
|
+
*
|
|
52
|
+
* For example, if a service depends on `{ ctx: ApplicationContext }`, this function ensures
|
|
53
|
+
* that the test value for `ctx` implements `Partial<ApplicationContext>`.
|
|
54
|
+
* This can of course be disabled by casting the value explicitly.
|
|
55
|
+
*
|
|
56
|
+
* @param clazz a service class
|
|
57
|
+
* @param options options passed to the service constructor
|
|
58
|
+
* @returns a new instance of the given service class
|
|
59
|
+
*/
|
|
60
|
+
export declare function createService<References extends {}, Interface extends {}>(clazz: ServiceConstructor<References, Interface>, options?: CreateServiceOptions<References>): Promise<Service<Interface>>;
|
|
61
|
+
export {};
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Renders the given component into the DOM and returns the new node.
|
|
3
|
+
*/
|
|
4
|
+
export declare function renderComponent(component: CustomElementConstructor | string, options?: {
|
|
5
|
+
container?: HTMLElement;
|
|
6
|
+
attributes?: Record<string, string>;
|
|
7
|
+
}): Promise<{
|
|
8
|
+
node: HTMLElement;
|
|
9
|
+
}>;
|
|
10
|
+
/**
|
|
11
|
+
* Renders the given component into the DOM (via {@link renderComponent}) and works on its shadow root.
|
|
12
|
+
* In order to use this function, the shadow root should be attached as `open` from inside the component class.
|
|
13
|
+
*
|
|
14
|
+
* After the shadow root has been accessed, the function searches (and waits) for an inner root container (by default `.pioneer-root`)
|
|
15
|
+
* where all other searches should be executed.
|
|
16
|
+
*
|
|
17
|
+
* Returns the shadow root, the inner container, and a bound queries object that automatically searches in the inner container
|
|
18
|
+
* instead of the whole document.
|
|
19
|
+
*/
|
|
20
|
+
export declare function renderComponentShadowDOM(component: CustomElementConstructor | string, options?: {
|
|
21
|
+
container?: HTMLElement;
|
|
22
|
+
attributes?: Record<string, string>;
|
|
23
|
+
innerContainerSelector?: string;
|
|
24
|
+
}): Promise<{
|
|
25
|
+
node: HTMLElement;
|
|
26
|
+
shadowRoot: ShadowRoot;
|
|
27
|
+
innerContainer: HTMLElement;
|
|
28
|
+
queries: {
|
|
29
|
+
getByLabelText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined): T;
|
|
30
|
+
getAllByLabelText<T_1 extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined): T_1[];
|
|
31
|
+
queryByLabelText<T_2 extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined): T_2 | null;
|
|
32
|
+
queryAllByLabelText<T_3 extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined): T_3[];
|
|
33
|
+
findByLabelText<T_4 extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): Promise<T_4>;
|
|
34
|
+
findAllByLabelText<T_5 extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): Promise<T_5[]>;
|
|
35
|
+
getByPlaceholderText<T_6 extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T_6;
|
|
36
|
+
getAllByPlaceholderText<T_7 extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T_7[];
|
|
37
|
+
queryByPlaceholderText<T_8 extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T_8 | null;
|
|
38
|
+
queryAllByPlaceholderText<T_9 extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T_9[];
|
|
39
|
+
findByPlaceholderText<T_10 extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): Promise<T_10>;
|
|
40
|
+
findAllByPlaceholderText<T_11 extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): Promise<T_11[]>;
|
|
41
|
+
getByText<T_12 extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined): T_12;
|
|
42
|
+
getAllByText<T_13 extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined): T_13[];
|
|
43
|
+
queryByText<T_14 extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined): T_14 | null;
|
|
44
|
+
queryAllByText<T_15 extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined): T_15[];
|
|
45
|
+
findByText<T_16 extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): Promise<T_16>;
|
|
46
|
+
findAllByText<T_17 extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): Promise<T_17[]>;
|
|
47
|
+
getByAltText<T_18 extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T_18;
|
|
48
|
+
getAllByAltText<T_19 extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T_19[];
|
|
49
|
+
queryByAltText<T_20 extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T_20 | null;
|
|
50
|
+
queryAllByAltText<T_21 extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T_21[];
|
|
51
|
+
findByAltText<T_22 extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): Promise<T_22>;
|
|
52
|
+
findAllByAltText<T_23 extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): Promise<T_23[]>;
|
|
53
|
+
getByTitle<T_24 extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T_24;
|
|
54
|
+
getAllByTitle<T_25 extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T_25[];
|
|
55
|
+
queryByTitle<T_26 extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T_26 | null;
|
|
56
|
+
queryAllByTitle<T_27 extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T_27[];
|
|
57
|
+
findByTitle<T_28 extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): Promise<T_28>;
|
|
58
|
+
findAllByTitle<T_29 extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): Promise<T_29[]>;
|
|
59
|
+
getByDisplayValue<T_30 extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T_30;
|
|
60
|
+
getAllByDisplayValue<T_31 extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T_31[];
|
|
61
|
+
queryByDisplayValue<T_32 extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T_32 | null;
|
|
62
|
+
queryAllByDisplayValue<T_33 extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T_33[];
|
|
63
|
+
findByDisplayValue<T_34 extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): Promise<T_34>;
|
|
64
|
+
findAllByDisplayValue<T_35 extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): Promise<T_35[]>;
|
|
65
|
+
getByRole<T_36 extends HTMLElement = HTMLElement>(role: import("@testing-library/dom").ByRoleMatcher, options?: import("@testing-library/dom").ByRoleOptions | undefined): T_36;
|
|
66
|
+
getAllByRole<T_37 extends HTMLElement = HTMLElement>(role: import("@testing-library/dom").ByRoleMatcher, options?: import("@testing-library/dom").ByRoleOptions | undefined): T_37[];
|
|
67
|
+
queryByRole<T_38 extends HTMLElement = HTMLElement>(role: import("@testing-library/dom").ByRoleMatcher, options?: import("@testing-library/dom").ByRoleOptions | undefined): T_38 | null;
|
|
68
|
+
queryAllByRole<T_39 extends HTMLElement = HTMLElement>(role: import("@testing-library/dom").ByRoleMatcher, options?: import("@testing-library/dom").ByRoleOptions | undefined): T_39[];
|
|
69
|
+
findByRole<T_40 extends HTMLElement = HTMLElement>(role: import("@testing-library/dom").ByRoleMatcher, options?: import("@testing-library/dom").ByRoleOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): Promise<T_40>;
|
|
70
|
+
findAllByRole<T_41 extends HTMLElement = HTMLElement>(role: import("@testing-library/dom").ByRoleMatcher, options?: import("@testing-library/dom").ByRoleOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): Promise<T_41[]>;
|
|
71
|
+
getByTestId<T_42 extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T_42;
|
|
72
|
+
getAllByTestId<T_43 extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T_43[];
|
|
73
|
+
queryByTestId<T_44 extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T_44 | null;
|
|
74
|
+
queryAllByTestId<T_45 extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T_45[];
|
|
75
|
+
findByTestId<T_46 extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): Promise<T_46>;
|
|
76
|
+
findAllByTestId<T_47 extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): Promise<T_47[]>;
|
|
77
|
+
} & {
|
|
78
|
+
getByLabelText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined) => HTMLElement;
|
|
79
|
+
getAllByLabelText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined) => HTMLElement[];
|
|
80
|
+
queryByLabelText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined) => HTMLElement | null;
|
|
81
|
+
queryAllByLabelText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined) => HTMLElement[];
|
|
82
|
+
findByLabelText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement>;
|
|
83
|
+
findAllByLabelText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement[]>;
|
|
84
|
+
getByPlaceholderText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement;
|
|
85
|
+
getAllByPlaceholderText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement[];
|
|
86
|
+
queryByPlaceholderText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement | null;
|
|
87
|
+
queryAllByPlaceholderText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement[];
|
|
88
|
+
findByPlaceholderText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement>;
|
|
89
|
+
findAllByPlaceholderText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement[]>;
|
|
90
|
+
getByText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined) => HTMLElement;
|
|
91
|
+
getAllByText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined) => HTMLElement[];
|
|
92
|
+
queryByText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined) => HTMLElement | null;
|
|
93
|
+
queryAllByText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined) => HTMLElement[];
|
|
94
|
+
findByText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement>;
|
|
95
|
+
findAllByText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement[]>;
|
|
96
|
+
getByAltText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement;
|
|
97
|
+
getAllByAltText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement[];
|
|
98
|
+
queryByAltText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement | null;
|
|
99
|
+
queryAllByAltText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement[];
|
|
100
|
+
findByAltText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement>;
|
|
101
|
+
findAllByAltText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement[]>;
|
|
102
|
+
getByTitle: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement;
|
|
103
|
+
getAllByTitle: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement[];
|
|
104
|
+
queryByTitle: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement | null;
|
|
105
|
+
queryAllByTitle: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement[];
|
|
106
|
+
findByTitle: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement>;
|
|
107
|
+
findAllByTitle: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement[]>;
|
|
108
|
+
getByDisplayValue: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement;
|
|
109
|
+
getAllByDisplayValue: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement[];
|
|
110
|
+
queryByDisplayValue: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement | null;
|
|
111
|
+
queryAllByDisplayValue: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement[];
|
|
112
|
+
findByDisplayValue: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement>;
|
|
113
|
+
findAllByDisplayValue: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement[]>;
|
|
114
|
+
getByRole: (role: import("@testing-library/dom").ByRoleMatcher, options?: import("@testing-library/dom").ByRoleOptions | undefined) => HTMLElement;
|
|
115
|
+
getAllByRole: (role: import("@testing-library/dom").ByRoleMatcher, options?: import("@testing-library/dom").ByRoleOptions | undefined) => HTMLElement[];
|
|
116
|
+
queryByRole: (role: import("@testing-library/dom").ByRoleMatcher, options?: import("@testing-library/dom").ByRoleOptions | undefined) => HTMLElement | null;
|
|
117
|
+
queryAllByRole: (role: import("@testing-library/dom").ByRoleMatcher, options?: import("@testing-library/dom").ByRoleOptions | undefined) => HTMLElement[];
|
|
118
|
+
findByRole: (role: import("@testing-library/dom").ByRoleMatcher, options?: import("@testing-library/dom").ByRoleOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement>;
|
|
119
|
+
findAllByRole: (role: import("@testing-library/dom").ByRoleMatcher, options?: import("@testing-library/dom").ByRoleOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement[]>;
|
|
120
|
+
getByTestId: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement;
|
|
121
|
+
getAllByTestId: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement[];
|
|
122
|
+
queryByTestId: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement | null;
|
|
123
|
+
queryAllByTestId: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement[];
|
|
124
|
+
findByTestId: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement>;
|
|
125
|
+
findAllByTestId: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement[]>;
|
|
126
|
+
};
|
|
127
|
+
}>;
|
|
128
|
+
/**
|
|
129
|
+
* Defines the given component and returns the unique tag name.
|
|
130
|
+
* This helper is necessary because tag names must not collide in the global elements registry (and
|
|
131
|
+
* un-registration is not possible).
|
|
132
|
+
*/
|
|
133
|
+
export declare function defineComponent(component: CustomElementConstructor, options?: {
|
|
134
|
+
nameHint?: string;
|
|
135
|
+
}): string;
|