@mui/internal-test-utils 2.0.18-canary.2 → 2.0.18-canary.20
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 +23 -12
- package/{esm/chaiPlugin.js → chaiPlugin.mjs} +1 -1
- package/{esm/createRenderer.d.ts → createRenderer.d.mts} +59 -59
- package/createRenderer.d.ts +58 -58
- package/{esm/createRenderer.js → createRenderer.mjs} +3 -3
- package/{esm/describeConformance.d.ts → describeConformance.d.mts} +2 -20
- package/describeConformance.d.ts +0 -18
- package/describeConformance.js +2 -173
- package/{esm/describeConformance.js → describeConformance.mjs} +4 -175
- package/{esm/flushMicrotasks.js → flushMicrotasks.mjs} +1 -1
- package/{esm/focusVisible.js → focusVisible.mjs} +1 -1
- package/index.d.mts +11 -0
- package/index.js +2 -2
- package/index.mjs +19 -0
- package/initMatchers.d.mts +5 -0
- package/{esm/initMatchers.js → initMatchers.mjs} +2 -2
- package/package.json +57 -27
- package/{esm/setupVitest.d.ts → setupVitest.d.mts} +2 -2
- package/setupVitest.js +11 -9
- package/{esm/setupVitest.js → setupVitest.mjs} +14 -12
- package/esm/index.d.ts +0 -11
- package/esm/index.js +0 -19
- package/esm/initMatchers.d.ts +0 -5
- package/esm/package.json +0 -1
- /package/{esm/chaiPlugin.d.ts → chaiPlugin.d.mts} +0 -0
- /package/{esm/chaiTypes.d.ts → chaiTypes.d.mts} +0 -0
- /package/{esm/chaiTypes.js → chaiTypes.mjs} +0 -0
- /package/{esm/components.d.ts → components.d.mts} +0 -0
- /package/{esm/components.js → components.mjs} +0 -0
- /package/{esm/configure.d.ts → configure.d.mts} +0 -0
- /package/{esm/configure.js → configure.mjs} +0 -0
- /package/{esm/createDescribe.d.ts → createDescribe.d.mts} +0 -0
- /package/{esm/createDescribe.js → createDescribe.mjs} +0 -0
- /package/{esm/env.d.ts → env.d.mts} +0 -0
- /package/{esm/env.js → env.mjs} +0 -0
- /package/{esm/flushMicrotasks.d.ts → flushMicrotasks.d.mts} +0 -0
- /package/{esm/focusVisible.d.ts → focusVisible.d.mts} +0 -0
- /package/{esm/ignoreActWarnings.d.ts → ignoreActWarnings.d.mts} +0 -0
- /package/{esm/ignoreActWarnings.js → ignoreActWarnings.mjs} +0 -0
- /package/{esm/initPlaywrightMatchers.d.ts → initPlaywrightMatchers.d.mts} +0 -0
- /package/{esm/initPlaywrightMatchers.js → initPlaywrightMatchers.mjs} +0 -0
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# MUI Public
|
|
2
2
|
|
|
3
|
-
Mono-repository for the MUI organization with code that can be public
|
|
3
|
+
Mono-repository for the MUI organization with code that can be public.\
|
|
4
4
|
See https://github.com/mui/mui-private for code that needs to be private.
|
|
5
5
|
|
|
6
6
|
## Documentation
|
|
@@ -9,31 +9,42 @@ You can [read the Infra documentation here](./docs/README.md).
|
|
|
9
9
|
|
|
10
10
|
## Applications
|
|
11
11
|
|
|
12
|
-
###
|
|
12
|
+
### Frontend Public
|
|
13
13
|
|
|
14
|
-
-
|
|
14
|
+
- URL: [frontend-public.mui.com](https://frontend-public.mui.com/)
|
|
15
|
+
- Source: `/apps/code-infra-dashboard/`
|
|
16
|
+
- Hosting: https://dashboard.render.com/web/srv-d5fq2j0gjchc73e9st5g
|
|
17
|
+
- [Docs](./apps/code-infra-dashboard/#readme)
|
|
18
|
+
|
|
19
|
+
### Tools Public
|
|
20
|
+
|
|
21
|
+
⚠️ Deprecated. Use **Frontend Public** instead.
|
|
22
|
+
|
|
23
|
+
- URL: [tools-public.mui.com](https://tools-public.mui.com/)
|
|
24
|
+
- Source: `/apps/tools-public/`
|
|
15
25
|
- Hosting: https://dashboard.render.com/web/srv-d08mooq4d50c73fso49g
|
|
16
26
|
- [Docs](./apps/tools-public/#readme)
|
|
27
|
+
- Internal public Toolpad apps that run the operations of MUI, built using https://github.com/mui/toolpad.
|
|
17
28
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
### [Code infra dashboard](https://frontend-public.mui.com/)
|
|
29
|
+
### MUI Internal
|
|
21
30
|
|
|
22
|
-
- URL: [
|
|
23
|
-
-
|
|
24
|
-
- Hosting: https://app.netlify.com/
|
|
25
|
-
- [Docs](./
|
|
31
|
+
- URL: [mui-internal.netlify.app](https://mui-internal.netlify.app)
|
|
32
|
+
- Source: `/docs/`
|
|
33
|
+
- Hosting: https://app.netlify.com/projects/mui-internal/overview
|
|
34
|
+
- [Docs](./docs/#readme)
|
|
35
|
+
- Website for MUI internal packages, e.g. hosts docs-infra.
|
|
36
|
+
This is equivalent to https://backoffice.mui.com/ but for public logic.
|
|
26
37
|
|
|
27
38
|
## Packages
|
|
28
39
|
|
|
29
40
|
### [docs-infra](./packages/docs-infra/)
|
|
30
41
|
|
|
31
|
-
-
|
|
42
|
+
- Source: `/packages/docs-infra/`
|
|
32
43
|
- [Docs](./packages/docs-infra/README.md)
|
|
33
44
|
|
|
34
45
|
### [code-infra](./packages/code-infra/)
|
|
35
46
|
|
|
36
|
-
-
|
|
47
|
+
- Source: `/packages/code-infra/`
|
|
37
48
|
- [Docs](./packages/code-infra/README.md)
|
|
38
49
|
|
|
39
50
|
## Versioning
|
|
@@ -5,7 +5,7 @@ import { computeAccessibleDescription, computeAccessibleName } from 'dom-accessi
|
|
|
5
5
|
import formatUtil from 'format-util';
|
|
6
6
|
import { kebabCase } from 'es-toolkit/string';
|
|
7
7
|
import { AssertionError } from 'assertion-error';
|
|
8
|
-
import { isJsdom } from "./env.
|
|
8
|
+
import { isJsdom } from "./env.mjs";
|
|
9
9
|
|
|
10
10
|
// chai#utils.elToString that looks like stringified elements in testing-library
|
|
11
11
|
function elementToString(element) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { queries, RenderResult,
|
|
1
|
+
import { queries, RenderResult, Screen, RenderOptions as TestingLibraryRenderOptions } from '@testing-library/react/pure.js';
|
|
2
2
|
import { userEvent } from '@testing-library/user-event';
|
|
3
3
|
import * as React from 'react';
|
|
4
|
-
import {
|
|
5
|
-
import { flushMicrotasks } from "./flushMicrotasks.
|
|
4
|
+
import { vi } from 'vitest';
|
|
5
|
+
import { flushMicrotasks } from "./flushMicrotasks.mjs";
|
|
6
6
|
declare function queryAllDescriptionsOf(baseElement: HTMLElement, element: Element): HTMLElement[];
|
|
7
7
|
declare const customQueries: {
|
|
8
8
|
queryDescriptionOf: import("@testing-library/dom").QueryBy<[Element]>;
|
|
@@ -88,7 +88,7 @@ export interface Clock {
|
|
|
88
88
|
restore(): void;
|
|
89
89
|
}
|
|
90
90
|
export type ClockConfig = undefined | number | Date;
|
|
91
|
-
declare function createClock(defaultMode: 'fake' | 'real', config: ClockConfig, options: Exclude<Parameters<typeof useFakeTimers>[0], number | Date>): Clock;
|
|
91
|
+
declare function createClock(defaultMode: 'fake' | 'real', config: ClockConfig, options: Exclude<Parameters<typeof vi.useFakeTimers>[0], number | Date>): Clock;
|
|
92
92
|
export interface Renderer {
|
|
93
93
|
clock: Clock;
|
|
94
94
|
render(element: React.ReactElement<DataAttributes>, options?: RenderOptions): MuiRenderResult;
|
|
@@ -104,68 +104,62 @@ export interface CreateRendererOptions extends Pick<RenderOptions, 'strict' | 's
|
|
|
104
104
|
emotion?: boolean;
|
|
105
105
|
}
|
|
106
106
|
export declare function createRenderer(globalOptions?: CreateRendererOptions): Renderer;
|
|
107
|
-
declare const fireEvent:
|
|
107
|
+
declare const fireEvent: import("@testing-library/dom").FireFunction & import("@testing-library/dom").FireObject;
|
|
108
108
|
export declare function fireTouchChangedEvent(target: Element, type: 'touchstart' | 'touchmove' | 'touchend', options: {
|
|
109
109
|
changedTouches: Array<Pick<TouchInit, 'clientX' | 'clientY'>>;
|
|
110
110
|
}): void;
|
|
111
111
|
declare function act<T>(callback: () => T | Promise<T>): Promise<T>;
|
|
112
112
|
declare function act(callback: () => void): void;
|
|
113
113
|
declare const bodyBoundQueries: {
|
|
114
|
-
getByLabelText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined):
|
|
115
|
-
getAllByLabelText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined):
|
|
116
|
-
queryByLabelText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined):
|
|
117
|
-
queryAllByLabelText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined):
|
|
118
|
-
findByLabelText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined):
|
|
119
|
-
findAllByLabelText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined):
|
|
120
|
-
getByPlaceholderText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined):
|
|
121
|
-
getAllByPlaceholderText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined):
|
|
122
|
-
queryByPlaceholderText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined):
|
|
123
|
-
queryAllByPlaceholderText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined):
|
|
124
|
-
findByPlaceholderText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined):
|
|
125
|
-
findAllByPlaceholderText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined):
|
|
126
|
-
getByText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined):
|
|
127
|
-
getAllByText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined):
|
|
128
|
-
queryByText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined):
|
|
129
|
-
queryAllByText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined):
|
|
130
|
-
findByText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined):
|
|
131
|
-
findAllByText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined):
|
|
132
|
-
getByAltText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined):
|
|
133
|
-
getAllByAltText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined):
|
|
134
|
-
queryByAltText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined):
|
|
135
|
-
queryAllByAltText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined):
|
|
136
|
-
findByAltText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined):
|
|
137
|
-
findAllByAltText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined):
|
|
138
|
-
getByTitle<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined):
|
|
139
|
-
getAllByTitle<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined):
|
|
140
|
-
queryByTitle<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined):
|
|
141
|
-
queryAllByTitle<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined):
|
|
142
|
-
findByTitle<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined):
|
|
143
|
-
findAllByTitle<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined):
|
|
144
|
-
getByDisplayValue<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined):
|
|
145
|
-
getAllByDisplayValue<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined):
|
|
146
|
-
queryByDisplayValue<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined):
|
|
147
|
-
queryAllByDisplayValue<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined):
|
|
148
|
-
findByDisplayValue<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined):
|
|
149
|
-
findAllByDisplayValue<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined):
|
|
150
|
-
getByRole<T extends HTMLElement = HTMLElement>(role: import("@testing-library/dom").ByRoleMatcher, options?: queries.ByRoleOptions | undefined):
|
|
151
|
-
getAllByRole<T extends HTMLElement = HTMLElement>(role: import("@testing-library/dom").ByRoleMatcher, options?: queries.ByRoleOptions | undefined):
|
|
152
|
-
queryByRole<T extends HTMLElement = HTMLElement>(role: import("@testing-library/dom").ByRoleMatcher, options?: queries.ByRoleOptions | undefined):
|
|
153
|
-
queryAllByRole<T extends HTMLElement = HTMLElement>(role: import("@testing-library/dom").ByRoleMatcher, options?: queries.ByRoleOptions | undefined):
|
|
154
|
-
findByRole<T extends HTMLElement = HTMLElement>(role: import("@testing-library/dom").ByRoleMatcher, options?: queries.ByRoleOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined):
|
|
155
|
-
findAllByRole<T extends HTMLElement = HTMLElement>(role: import("@testing-library/dom").ByRoleMatcher, options?: queries.ByRoleOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined):
|
|
156
|
-
getByTestId<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined):
|
|
157
|
-
getAllByTestId<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined):
|
|
158
|
-
queryByTestId<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined):
|
|
159
|
-
queryAllByTestId<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined):
|
|
160
|
-
findByTestId<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined):
|
|
161
|
-
findAllByTestId<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined):
|
|
114
|
+
getByLabelText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined): T;
|
|
115
|
+
getAllByLabelText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined): T[];
|
|
116
|
+
queryByLabelText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined): T | null;
|
|
117
|
+
queryAllByLabelText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined): T[];
|
|
118
|
+
findByLabelText<T 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>;
|
|
119
|
+
findAllByLabelText<T 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[]>;
|
|
120
|
+
getByPlaceholderText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T;
|
|
121
|
+
getAllByPlaceholderText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T[];
|
|
122
|
+
queryByPlaceholderText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T | null;
|
|
123
|
+
queryAllByPlaceholderText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T[];
|
|
124
|
+
findByPlaceholderText<T 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>;
|
|
125
|
+
findAllByPlaceholderText<T 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[]>;
|
|
126
|
+
getByText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined): T;
|
|
127
|
+
getAllByText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined): T[];
|
|
128
|
+
queryByText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined): T | null;
|
|
129
|
+
queryAllByText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined): T[];
|
|
130
|
+
findByText<T 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>;
|
|
131
|
+
findAllByText<T 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[]>;
|
|
132
|
+
getByAltText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T;
|
|
133
|
+
getAllByAltText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T[];
|
|
134
|
+
queryByAltText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T | null;
|
|
135
|
+
queryAllByAltText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T[];
|
|
136
|
+
findByAltText<T 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>;
|
|
137
|
+
findAllByAltText<T 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[]>;
|
|
138
|
+
getByTitle<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T;
|
|
139
|
+
getAllByTitle<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T[];
|
|
140
|
+
queryByTitle<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T | null;
|
|
141
|
+
queryAllByTitle<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T[];
|
|
142
|
+
findByTitle<T 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>;
|
|
143
|
+
findAllByTitle<T 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[]>;
|
|
144
|
+
getByDisplayValue<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T;
|
|
145
|
+
getAllByDisplayValue<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T[];
|
|
146
|
+
queryByDisplayValue<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T | null;
|
|
147
|
+
queryAllByDisplayValue<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T[];
|
|
148
|
+
findByDisplayValue<T 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>;
|
|
149
|
+
findAllByDisplayValue<T 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[]>;
|
|
150
|
+
getByRole<T extends HTMLElement = HTMLElement>(role: import("@testing-library/dom").ByRoleMatcher, options?: queries.ByRoleOptions | undefined): T;
|
|
151
|
+
getAllByRole<T extends HTMLElement = HTMLElement>(role: import("@testing-library/dom").ByRoleMatcher, options?: queries.ByRoleOptions | undefined): T[];
|
|
152
|
+
queryByRole<T extends HTMLElement = HTMLElement>(role: import("@testing-library/dom").ByRoleMatcher, options?: queries.ByRoleOptions | undefined): T | null;
|
|
153
|
+
queryAllByRole<T extends HTMLElement = HTMLElement>(role: import("@testing-library/dom").ByRoleMatcher, options?: queries.ByRoleOptions | undefined): T[];
|
|
154
|
+
findByRole<T extends HTMLElement = HTMLElement>(role: import("@testing-library/dom").ByRoleMatcher, options?: queries.ByRoleOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): Promise<T>;
|
|
155
|
+
findAllByRole<T extends HTMLElement = HTMLElement>(role: import("@testing-library/dom").ByRoleMatcher, options?: queries.ByRoleOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): Promise<T[]>;
|
|
156
|
+
getByTestId<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T;
|
|
157
|
+
getAllByTestId<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T[];
|
|
158
|
+
queryByTestId<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T | null;
|
|
159
|
+
queryAllByTestId<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T[];
|
|
160
|
+
findByTestId<T 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>;
|
|
161
|
+
findAllByTestId<T 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[]>;
|
|
162
162
|
} & {
|
|
163
|
-
queryDescriptionOf: (args_0: Element) => HTMLElement | null;
|
|
164
|
-
queryAllDescriptionsOf: (element: Element) => HTMLElement[];
|
|
165
|
-
getDescriptionOf: (args_0: Element) => HTMLElement;
|
|
166
|
-
getAllDescriptionsOf: (args_0: Element) => HTMLElement[];
|
|
167
|
-
findDescriptionOf: (args_0: Element, args_1?: undefined, args_2?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement>;
|
|
168
|
-
findAllDescriptionsOf: (args_0: Element, args_1?: undefined, args_2?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement[]>;
|
|
169
163
|
getByLabelText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined) => HTMLElement;
|
|
170
164
|
getAllByLabelText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined) => HTMLElement[];
|
|
171
165
|
queryByLabelText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined) => HTMLElement | null;
|
|
@@ -214,6 +208,12 @@ declare const bodyBoundQueries: {
|
|
|
214
208
|
queryAllByTestId: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement[];
|
|
215
209
|
findByTestId: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement>;
|
|
216
210
|
findAllByTestId: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement[]>;
|
|
211
|
+
queryDescriptionOf: (args_0: Element) => HTMLElement | null;
|
|
212
|
+
queryAllDescriptionsOf: (element: Element) => HTMLElement[];
|
|
213
|
+
getDescriptionOf: (args_0: Element) => HTMLElement;
|
|
214
|
+
getAllDescriptionsOf: (args_0: Element) => HTMLElement[];
|
|
215
|
+
findDescriptionOf: (args_0: Element, args_1?: undefined, args_2?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement>;
|
|
216
|
+
findAllDescriptionsOf: (args_0: Element, args_1?: undefined, args_2?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement[]>;
|
|
217
217
|
};
|
|
218
218
|
export { configure, render, renderHook, waitFor, within, cleanup, createEvent, type RenderHookResult, type EventType } from '@testing-library/react/pure.js';
|
|
219
219
|
export { act, fireEvent };
|
package/createRenderer.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { queries, RenderResult,
|
|
1
|
+
import { queries, RenderResult, Screen, RenderOptions as TestingLibraryRenderOptions } from '@testing-library/react/pure.js';
|
|
2
2
|
import { userEvent } from '@testing-library/user-event';
|
|
3
3
|
import * as React from 'react';
|
|
4
|
-
import {
|
|
4
|
+
import { vi } from 'vitest';
|
|
5
5
|
import { flushMicrotasks } from "./flushMicrotasks.js";
|
|
6
6
|
declare function queryAllDescriptionsOf(baseElement: HTMLElement, element: Element): HTMLElement[];
|
|
7
7
|
declare const customQueries: {
|
|
@@ -88,7 +88,7 @@ export interface Clock {
|
|
|
88
88
|
restore(): void;
|
|
89
89
|
}
|
|
90
90
|
export type ClockConfig = undefined | number | Date;
|
|
91
|
-
declare function createClock(defaultMode: 'fake' | 'real', config: ClockConfig, options: Exclude<Parameters<typeof useFakeTimers>[0], number | Date>): Clock;
|
|
91
|
+
declare function createClock(defaultMode: 'fake' | 'real', config: ClockConfig, options: Exclude<Parameters<typeof vi.useFakeTimers>[0], number | Date>): Clock;
|
|
92
92
|
export interface Renderer {
|
|
93
93
|
clock: Clock;
|
|
94
94
|
render(element: React.ReactElement<DataAttributes>, options?: RenderOptions): MuiRenderResult;
|
|
@@ -104,68 +104,62 @@ export interface CreateRendererOptions extends Pick<RenderOptions, 'strict' | 's
|
|
|
104
104
|
emotion?: boolean;
|
|
105
105
|
}
|
|
106
106
|
export declare function createRenderer(globalOptions?: CreateRendererOptions): Renderer;
|
|
107
|
-
declare const fireEvent:
|
|
107
|
+
declare const fireEvent: import("@testing-library/dom").FireFunction & import("@testing-library/dom").FireObject;
|
|
108
108
|
export declare function fireTouchChangedEvent(target: Element, type: 'touchstart' | 'touchmove' | 'touchend', options: {
|
|
109
109
|
changedTouches: Array<Pick<TouchInit, 'clientX' | 'clientY'>>;
|
|
110
110
|
}): void;
|
|
111
111
|
declare function act<T>(callback: () => T | Promise<T>): Promise<T>;
|
|
112
112
|
declare function act(callback: () => void): void;
|
|
113
113
|
declare const bodyBoundQueries: {
|
|
114
|
-
getByLabelText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined):
|
|
115
|
-
getAllByLabelText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined):
|
|
116
|
-
queryByLabelText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined):
|
|
117
|
-
queryAllByLabelText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined):
|
|
118
|
-
findByLabelText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined):
|
|
119
|
-
findAllByLabelText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined):
|
|
120
|
-
getByPlaceholderText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined):
|
|
121
|
-
getAllByPlaceholderText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined):
|
|
122
|
-
queryByPlaceholderText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined):
|
|
123
|
-
queryAllByPlaceholderText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined):
|
|
124
|
-
findByPlaceholderText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined):
|
|
125
|
-
findAllByPlaceholderText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined):
|
|
126
|
-
getByText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined):
|
|
127
|
-
getAllByText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined):
|
|
128
|
-
queryByText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined):
|
|
129
|
-
queryAllByText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined):
|
|
130
|
-
findByText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined):
|
|
131
|
-
findAllByText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined):
|
|
132
|
-
getByAltText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined):
|
|
133
|
-
getAllByAltText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined):
|
|
134
|
-
queryByAltText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined):
|
|
135
|
-
queryAllByAltText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined):
|
|
136
|
-
findByAltText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined):
|
|
137
|
-
findAllByAltText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined):
|
|
138
|
-
getByTitle<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined):
|
|
139
|
-
getAllByTitle<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined):
|
|
140
|
-
queryByTitle<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined):
|
|
141
|
-
queryAllByTitle<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined):
|
|
142
|
-
findByTitle<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined):
|
|
143
|
-
findAllByTitle<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined):
|
|
144
|
-
getByDisplayValue<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined):
|
|
145
|
-
getAllByDisplayValue<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined):
|
|
146
|
-
queryByDisplayValue<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined):
|
|
147
|
-
queryAllByDisplayValue<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined):
|
|
148
|
-
findByDisplayValue<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined):
|
|
149
|
-
findAllByDisplayValue<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined):
|
|
150
|
-
getByRole<T extends HTMLElement = HTMLElement>(role: import("@testing-library/dom").ByRoleMatcher, options?: queries.ByRoleOptions | undefined):
|
|
151
|
-
getAllByRole<T extends HTMLElement = HTMLElement>(role: import("@testing-library/dom").ByRoleMatcher, options?: queries.ByRoleOptions | undefined):
|
|
152
|
-
queryByRole<T extends HTMLElement = HTMLElement>(role: import("@testing-library/dom").ByRoleMatcher, options?: queries.ByRoleOptions | undefined):
|
|
153
|
-
queryAllByRole<T extends HTMLElement = HTMLElement>(role: import("@testing-library/dom").ByRoleMatcher, options?: queries.ByRoleOptions | undefined):
|
|
154
|
-
findByRole<T extends HTMLElement = HTMLElement>(role: import("@testing-library/dom").ByRoleMatcher, options?: queries.ByRoleOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined):
|
|
155
|
-
findAllByRole<T extends HTMLElement = HTMLElement>(role: import("@testing-library/dom").ByRoleMatcher, options?: queries.ByRoleOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined):
|
|
156
|
-
getByTestId<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined):
|
|
157
|
-
getAllByTestId<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined):
|
|
158
|
-
queryByTestId<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined):
|
|
159
|
-
queryAllByTestId<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined):
|
|
160
|
-
findByTestId<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined):
|
|
161
|
-
findAllByTestId<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined):
|
|
114
|
+
getByLabelText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined): T;
|
|
115
|
+
getAllByLabelText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined): T[];
|
|
116
|
+
queryByLabelText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined): T | null;
|
|
117
|
+
queryAllByLabelText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined): T[];
|
|
118
|
+
findByLabelText<T 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>;
|
|
119
|
+
findAllByLabelText<T 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[]>;
|
|
120
|
+
getByPlaceholderText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T;
|
|
121
|
+
getAllByPlaceholderText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T[];
|
|
122
|
+
queryByPlaceholderText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T | null;
|
|
123
|
+
queryAllByPlaceholderText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T[];
|
|
124
|
+
findByPlaceholderText<T 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>;
|
|
125
|
+
findAllByPlaceholderText<T 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[]>;
|
|
126
|
+
getByText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined): T;
|
|
127
|
+
getAllByText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined): T[];
|
|
128
|
+
queryByText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined): T | null;
|
|
129
|
+
queryAllByText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined): T[];
|
|
130
|
+
findByText<T 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>;
|
|
131
|
+
findAllByText<T 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[]>;
|
|
132
|
+
getByAltText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T;
|
|
133
|
+
getAllByAltText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T[];
|
|
134
|
+
queryByAltText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T | null;
|
|
135
|
+
queryAllByAltText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T[];
|
|
136
|
+
findByAltText<T 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>;
|
|
137
|
+
findAllByAltText<T 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[]>;
|
|
138
|
+
getByTitle<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T;
|
|
139
|
+
getAllByTitle<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T[];
|
|
140
|
+
queryByTitle<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T | null;
|
|
141
|
+
queryAllByTitle<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T[];
|
|
142
|
+
findByTitle<T 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>;
|
|
143
|
+
findAllByTitle<T 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[]>;
|
|
144
|
+
getByDisplayValue<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T;
|
|
145
|
+
getAllByDisplayValue<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T[];
|
|
146
|
+
queryByDisplayValue<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T | null;
|
|
147
|
+
queryAllByDisplayValue<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T[];
|
|
148
|
+
findByDisplayValue<T 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>;
|
|
149
|
+
findAllByDisplayValue<T 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[]>;
|
|
150
|
+
getByRole<T extends HTMLElement = HTMLElement>(role: import("@testing-library/dom").ByRoleMatcher, options?: queries.ByRoleOptions | undefined): T;
|
|
151
|
+
getAllByRole<T extends HTMLElement = HTMLElement>(role: import("@testing-library/dom").ByRoleMatcher, options?: queries.ByRoleOptions | undefined): T[];
|
|
152
|
+
queryByRole<T extends HTMLElement = HTMLElement>(role: import("@testing-library/dom").ByRoleMatcher, options?: queries.ByRoleOptions | undefined): T | null;
|
|
153
|
+
queryAllByRole<T extends HTMLElement = HTMLElement>(role: import("@testing-library/dom").ByRoleMatcher, options?: queries.ByRoleOptions | undefined): T[];
|
|
154
|
+
findByRole<T extends HTMLElement = HTMLElement>(role: import("@testing-library/dom").ByRoleMatcher, options?: queries.ByRoleOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): Promise<T>;
|
|
155
|
+
findAllByRole<T extends HTMLElement = HTMLElement>(role: import("@testing-library/dom").ByRoleMatcher, options?: queries.ByRoleOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): Promise<T[]>;
|
|
156
|
+
getByTestId<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T;
|
|
157
|
+
getAllByTestId<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T[];
|
|
158
|
+
queryByTestId<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T | null;
|
|
159
|
+
queryAllByTestId<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T[];
|
|
160
|
+
findByTestId<T 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>;
|
|
161
|
+
findAllByTestId<T 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[]>;
|
|
162
162
|
} & {
|
|
163
|
-
queryDescriptionOf: (args_0: Element) => HTMLElement | null;
|
|
164
|
-
queryAllDescriptionsOf: (element: Element) => HTMLElement[];
|
|
165
|
-
getDescriptionOf: (args_0: Element) => HTMLElement;
|
|
166
|
-
getAllDescriptionsOf: (args_0: Element) => HTMLElement[];
|
|
167
|
-
findDescriptionOf: (args_0: Element, args_1?: undefined, args_2?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement>;
|
|
168
|
-
findAllDescriptionsOf: (args_0: Element, args_1?: undefined, args_2?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement[]>;
|
|
169
163
|
getByLabelText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined) => HTMLElement;
|
|
170
164
|
getAllByLabelText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined) => HTMLElement[];
|
|
171
165
|
queryByLabelText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined) => HTMLElement | null;
|
|
@@ -214,6 +208,12 @@ declare const bodyBoundQueries: {
|
|
|
214
208
|
queryAllByTestId: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement[];
|
|
215
209
|
findByTestId: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement>;
|
|
216
210
|
findAllByTestId: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement[]>;
|
|
211
|
+
queryDescriptionOf: (args_0: Element) => HTMLElement | null;
|
|
212
|
+
queryAllDescriptionsOf: (element: Element) => HTMLElement[];
|
|
213
|
+
getDescriptionOf: (args_0: Element) => HTMLElement;
|
|
214
|
+
getAllDescriptionsOf: (args_0: Element) => HTMLElement[];
|
|
215
|
+
findDescriptionOf: (args_0: Element, args_1?: undefined, args_2?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement>;
|
|
216
|
+
findAllDescriptionsOf: (args_0: Element, args_1?: undefined, args_2?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement[]>;
|
|
217
217
|
};
|
|
218
218
|
export { configure, render, renderHook, waitFor, within, cleanup, createEvent, type RenderHookResult, type EventType } from '@testing-library/react/pure.js';
|
|
219
219
|
export { act, fireEvent };
|
|
@@ -5,9 +5,9 @@ import { userEvent } from '@testing-library/user-event';
|
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import * as ReactDOMServer from 'react-dom/server';
|
|
7
7
|
import { beforeEach, afterEach, beforeAll, vi } from 'vitest';
|
|
8
|
-
import { reactMajor } from "./env.
|
|
9
|
-
import { flushMicrotasks } from "./flushMicrotasks.
|
|
10
|
-
import { config as utilsConfig } from "./configure.
|
|
8
|
+
import { reactMajor } from "./env.mjs";
|
|
9
|
+
import { flushMicrotasks } from "./flushMicrotasks.mjs";
|
|
10
|
+
import { config as utilsConfig } from "./configure.mjs";
|
|
11
11
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
12
|
function queryAllDescriptionsOf(baseElement, element) {
|
|
13
13
|
const ariaDescribedBy = element.getAttribute('aria-describedby');
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { MuiRenderResult } from "./createRenderer.
|
|
2
|
+
import { MuiRenderResult } from "./createRenderer.mjs";
|
|
3
3
|
interface DataProps {
|
|
4
4
|
[key: `data-${string}`]: string;
|
|
5
5
|
}
|
|
@@ -59,7 +59,6 @@ export interface ConformanceOptions {
|
|
|
59
59
|
};
|
|
60
60
|
testCustomVariant?: boolean;
|
|
61
61
|
testVariantProps?: object;
|
|
62
|
-
testLegacyComponentsProp?: boolean | string[];
|
|
63
62
|
slots?: Record<string, SlotTestingOptions>;
|
|
64
63
|
ThemeProvider?: React.ElementType;
|
|
65
64
|
/**
|
|
@@ -123,20 +122,11 @@ declare function testSlotsProp(element: React.ReactElement<{
|
|
|
123
122
|
children: React.ReactNode;
|
|
124
123
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
125
124
|
};
|
|
126
|
-
components?: {
|
|
127
|
-
[x: string]: SlotTestingOptions['testWithComponent'] | keyof React.JSX.IntrinsicElements | React.ForwardRefExoticComponent<{
|
|
128
|
-
children: React.ReactNode;
|
|
129
|
-
} & React.RefAttributes<HTMLDivElement>>;
|
|
130
|
-
};
|
|
131
125
|
slotProps: {
|
|
132
126
|
[x: string]: DataProps;
|
|
133
127
|
};
|
|
134
|
-
componentsProps?: {
|
|
135
|
-
[x: string]: DataProps;
|
|
136
|
-
};
|
|
137
128
|
}>, getOptions: () => ConformanceOptions): void;
|
|
138
129
|
declare function testSlotPropsProp(element: React.ReactElement<{
|
|
139
|
-
componentsProps?: Record<string, DataProps>;
|
|
140
130
|
slotProps: Record<string, DataProps>;
|
|
141
131
|
}>, getOptions: () => ConformanceOptions): void;
|
|
142
132
|
declare function testSlotPropsCallback(element: React.ReactElement<{
|
|
@@ -147,13 +137,6 @@ declare function testSlotPropsCallbackWithPropsAsOwnerState(element: React.React
|
|
|
147
137
|
slotProps: Record<string, (ownerState: Record<string, any>) => DataProps>;
|
|
148
138
|
className: string;
|
|
149
139
|
}>, getOptions: () => ConformanceOptions): void;
|
|
150
|
-
/**
|
|
151
|
-
* MUI components have a `components` prop that allows rendering a different
|
|
152
|
-
* Components from @inheritComponent
|
|
153
|
-
*/
|
|
154
|
-
declare function testComponentsProp(element: React.ReactElement<{
|
|
155
|
-
components?: Record<string, string>;
|
|
156
|
-
} & DataProps>, getOptions: () => ConformanceOptions): void;
|
|
157
140
|
/**
|
|
158
141
|
* MUI theme has a components section that allows specifying default props.
|
|
159
142
|
* Components from @inheritComponent
|
|
@@ -178,7 +161,6 @@ declare function testThemeVariants(element: React.ReactElement<DataProps & {
|
|
|
178
161
|
declare function testThemeCustomPalette(element: React.ReactElement<unknown>, getOptions: () => ConformanceOptions): void;
|
|
179
162
|
declare const fullSuite: {
|
|
180
163
|
componentProp: typeof testComponentProp;
|
|
181
|
-
componentsProp: typeof testComponentsProp;
|
|
182
164
|
mergeClassName: typeof testClassName;
|
|
183
165
|
propsSpread: typeof testPropsSpread;
|
|
184
166
|
refForwarding: typeof describeRef;
|
|
@@ -192,5 +174,5 @@ declare const fullSuite: {
|
|
|
192
174
|
themeVariants: typeof testThemeVariants;
|
|
193
175
|
themeCustomPalette: typeof testThemeCustomPalette;
|
|
194
176
|
};
|
|
195
|
-
declare const _default: import("./createDescribe.
|
|
177
|
+
declare const _default: import("./createDescribe.mjs").MUIDescribe<[minimalElement: React.ReactElement<any, string | React.JSXElementConstructor<any>>, getOptions: () => ConformanceOptions]>;
|
|
196
178
|
export default _default;
|
package/describeConformance.d.ts
CHANGED
|
@@ -59,7 +59,6 @@ export interface ConformanceOptions {
|
|
|
59
59
|
};
|
|
60
60
|
testCustomVariant?: boolean;
|
|
61
61
|
testVariantProps?: object;
|
|
62
|
-
testLegacyComponentsProp?: boolean | string[];
|
|
63
62
|
slots?: Record<string, SlotTestingOptions>;
|
|
64
63
|
ThemeProvider?: React.ElementType;
|
|
65
64
|
/**
|
|
@@ -123,20 +122,11 @@ declare function testSlotsProp(element: React.ReactElement<{
|
|
|
123
122
|
children: React.ReactNode;
|
|
124
123
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
125
124
|
};
|
|
126
|
-
components?: {
|
|
127
|
-
[x: string]: SlotTestingOptions['testWithComponent'] | keyof React.JSX.IntrinsicElements | React.ForwardRefExoticComponent<{
|
|
128
|
-
children: React.ReactNode;
|
|
129
|
-
} & React.RefAttributes<HTMLDivElement>>;
|
|
130
|
-
};
|
|
131
125
|
slotProps: {
|
|
132
126
|
[x: string]: DataProps;
|
|
133
127
|
};
|
|
134
|
-
componentsProps?: {
|
|
135
|
-
[x: string]: DataProps;
|
|
136
|
-
};
|
|
137
128
|
}>, getOptions: () => ConformanceOptions): void;
|
|
138
129
|
declare function testSlotPropsProp(element: React.ReactElement<{
|
|
139
|
-
componentsProps?: Record<string, DataProps>;
|
|
140
130
|
slotProps: Record<string, DataProps>;
|
|
141
131
|
}>, getOptions: () => ConformanceOptions): void;
|
|
142
132
|
declare function testSlotPropsCallback(element: React.ReactElement<{
|
|
@@ -147,13 +137,6 @@ declare function testSlotPropsCallbackWithPropsAsOwnerState(element: React.React
|
|
|
147
137
|
slotProps: Record<string, (ownerState: Record<string, any>) => DataProps>;
|
|
148
138
|
className: string;
|
|
149
139
|
}>, getOptions: () => ConformanceOptions): void;
|
|
150
|
-
/**
|
|
151
|
-
* MUI components have a `components` prop that allows rendering a different
|
|
152
|
-
* Components from @inheritComponent
|
|
153
|
-
*/
|
|
154
|
-
declare function testComponentsProp(element: React.ReactElement<{
|
|
155
|
-
components?: Record<string, string>;
|
|
156
|
-
} & DataProps>, getOptions: () => ConformanceOptions): void;
|
|
157
140
|
/**
|
|
158
141
|
* MUI theme has a components section that allows specifying default props.
|
|
159
142
|
* Components from @inheritComponent
|
|
@@ -178,7 +161,6 @@ declare function testThemeVariants(element: React.ReactElement<DataProps & {
|
|
|
178
161
|
declare function testThemeCustomPalette(element: React.ReactElement<unknown>, getOptions: () => ConformanceOptions): void;
|
|
179
162
|
declare const fullSuite: {
|
|
180
163
|
componentProp: typeof testComponentProp;
|
|
181
|
-
componentsProp: typeof testComponentsProp;
|
|
182
164
|
mergeClassName: typeof testClassName;
|
|
183
165
|
propsSpread: typeof testPropsSpread;
|
|
184
166
|
refForwarding: typeof describeRef;
|