TestRenderResult
Result of rendering a React component for testing.
- Object
- ScreenQuery
- TestRenderResult
Properties
- baseElement → JSObject
-
The base element that was appended to document.body.
no setter
- container → DomNode
-
The container element.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
debug(
) → void - Prints a formatted debug representation of the DOM.
-
findByRole(
String role, {String? name, Duration timeout = const Duration(seconds: 1)}) → Future< DomNode> -
Waits for element with role to appear.
inherited
-
findByTestId(
String testId, {Duration timeout = const Duration(seconds: 1)}) → Future< DomNode> -
Waits for element with test ID to appear.
inherited
-
findByText(
String text, {bool exact = true, Duration timeout = const Duration(seconds: 1)}) → Future< DomNode> -
Waits for element with text to appear.
inherited
-
getByAltText(
String altText, {bool exact = true}) → DomNode -
Finds element by its alt text (for images).
inherited
-
getByDisplayValue(
String value, {bool exact = true}) → DomNode -
Finds element by its display value (for inputs).
inherited
-
getByLabelText(
String labelText, {bool exact = true}) → DomNode -
Finds element by its label text (for form inputs).
inherited
-
getByPlaceholderText(
String placeholder, {bool exact = true}) → DomNode -
Finds element by its placeholder text.
inherited
-
getByRole(
String role, {String? name}) → DomNode -
Finds element by its ARIA role.
inherited
-
getByTestId(
String testId) → DomNode -
Finds element by test ID attribute (data-testid).
inherited
-
getByText(
String text, {bool exact = true}) → DomNode -
Finds element by its text content.
inherited
-
getByTitle(
String title, {bool exact = true}) → DomNode -
Finds element by its title attribute.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
queryAllByAltText(
String altText, {bool exact = true}) → List< DomNode> -
Finds all images with the given alt text.
inherited
-
queryAllByDisplayValue(
String value, {bool exact = true}) → List< DomNode> -
Finds all input elements with the given display value.
inherited
-
queryAllByLabelText(
String labelText, {bool exact = true}) → List< DomNode> -
Finds all elements associated with labels containing the text.
inherited
-
queryAllByPlaceholderText(
String placeholder, {bool exact = true}) → List< DomNode> -
Finds all elements with the given placeholder.
inherited
-
queryAllByRole(
String role, {String? name}) → List< DomNode> -
Finds all elements with the given ARIA role.
inherited
-
queryAllByTestId(
String testId) → List< DomNode> -
Finds all elements with the given test ID.
inherited
-
queryAllByText(
String text, {bool exact = true}) → List< DomNode> -
Finds all elements containing the given text.
inherited
-
queryAllByTitle(
String title, {bool exact = true}) → List< DomNode> -
Finds all elements with the given title attribute.
inherited
-
queryByPlaceholderText(
String placeholder, {bool exact = true}) → DomNode? -
Queries for element by placeholder. Returns null if not found.
inherited
-
queryByRole(
String role, {String? name}) → DomNode? -
Queries for element by role. Returns null if not found.
inherited
-
queryByTestId(
String testId) → DomNode? -
Queries for element by test ID. Returns null if not found.
inherited
-
queryByText(
String text, {bool exact = true}) → DomNode? -
Queries for element by text. Returns null if not found.
inherited
-
rerender(
ReactElement element) → void - Re-renders the component with new props/element.
-
toString(
) → String -
A string representation of this object.
inherited
-
unmount(
) → void - Unmounts the component and cleans up.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited