Attributes
- Companion
- trait
- Deprecated
- true
- Graph
-
- Supertypes
-
trait LegacyReactTestUtilstrait ReactTestUtilExtensionstrait ReactTestUtilExtensions1class Objecttrait Matchableclass AnyShow all
- Self type
-
LegacyReactTestUtils.type
Members list
Type members
Classlikes
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
Inherited types
Attributes
- Inherited from:
- LegacyReactTestUtils
Attributes
- Inherited from:
- LegacyReactTestUtils
Attributes
- Inherited from:
- LegacyReactTestUtils
Attributes
- Inherited from:
- LegacyReactTestUtils
Value members
Concrete methods
Deprecated methods
Attributes
- Deprecated
- true
Attributes
- Deprecated
- true
Attributes
- Deprecated
- true
Attributes
- Deprecated
- true
Attributes
- Deprecated
- true
Inherited methods
When writing UI tests, tasks like rendering, user events, or data fetching can be considered as "units" of interaction with a user interface. React provides a helper called act() that makes sure all updates related to these "units" have been processed and applied to the DOM before you make any assertions:
When writing UI tests, tasks like rendering, user events, or data fetching can be considered as "units" of interaction with a user interface. React provides a helper called act() that makes sure all updates related to these "units" have been processed and applied to the DOM before you make any assertions:
act {
// render components
}
// make assertions
This helps make your tests run closer to what real users would experience when using your application.
Attributes
- Inherited from:
- LegacyReactTestUtils
When writing UI tests, tasks like rendering, user events, or data fetching can be considered as "units" of interaction with a user interface. React provides a helper called act() that makes sure all updates related to these "units" have been processed and applied to the DOM before you make any assertions:
When writing UI tests, tasks like rendering, user events, or data fetching can be considered as "units" of interaction with a user interface. React provides a helper called act() that makes sure all updates related to these "units" have been processed and applied to the DOM before you make any assertions:
await act(async () => {
// render components
});
// make assertions
This helps make your tests run closer to what real users would experience when using your application.
Attributes
- Inherited from:
- LegacyReactTestUtils
Traverse all components in tree and accumulate all components where test(component) is true. This is not that useful on its own, but it's used as a primitive for other test utils.
Traverse all components in tree and accumulate all components where test(component) is true. This is not that useful on its own, but it's used as a primitive for other test utils.
Attributes
- Inherited from:
- LegacyReactTestUtils
Same as scryRenderedComponentsWithType but expects there to be one result and returns that one result, or throws exception if there is any other number of matches besides one.
Same as scryRenderedComponentsWithType but expects there to be one result and returns that one result, or throws exception if there is any other number of matches besides one.
Attributes
- Inherited from:
- LegacyReactTestUtils
Like scryRenderedDOMComponentsWithClass but expects there to be one result, and returns that one result, or throws exception if there is any other number of matches besides one.
Like scryRenderedDOMComponentsWithClass but expects there to be one result, and returns that one result, or throws exception if there is any other number of matches besides one.
Attributes
- Inherited from:
- LegacyReactTestUtils
Like scryRenderedDOMComponentsWithTag but expects there to be one result, and returns that one result, or throws exception if there is any other number of matches besides one.
Like scryRenderedDOMComponentsWithTag but expects there to be one result, and returns that one result, or throws exception if there is any other number of matches besides one.
Attributes
- Inherited from:
- LegacyReactTestUtils
Attributes
- Inherited from:
- LegacyReactTestUtils
Attributes
- Inherited from:
- LegacyReactTestUtils
Attributes
- Inherited from:
- LegacyReactTestUtils
Attributes
- Inherited from:
- LegacyReactTestUtils
Attributes
- Inherited from:
- LegacyReactTestUtils
Turn <div data-reactroot="">hello</div> into <div>hello</div>
Turn <div data-reactroot="">hello</div> into <div>hello</div>
Attributes
- Inherited from:
- LegacyReactTestUtils
Renders a component into the document body via ReactDOM.render.
Renders a component into the document body via ReactDOM.render.
Unlike LegacyReactTestUtils.renderIntoDocument, this allows DOM focus to work.
Attributes
- Inherited from:
- LegacyReactTestUtils
Attributes
- Inherited from:
- LegacyReactTestUtils
Render a component into a detached DOM node in the document. This function requires a DOM.
Render a component into a detached DOM node in the document. This function requires a DOM.
Attributes
- Inherited from:
- LegacyReactTestUtils
Attributes
- Inherited from:
- LegacyReactTestUtils
Finds all instances of components with type equal to componentClass.
Finds all instances of components with type equal to componentClass.
Attributes
- Inherited from:
- LegacyReactTestUtils
Finds all instance of components in the rendered tree that are DOM components with the class name matching className.
Finds all instance of components in the rendered tree that are DOM components with the class name matching className.
Attributes
- Inherited from:
- LegacyReactTestUtils
Finds all instance of components in the rendered tree that are DOM components with the tag name matching tagName.
Finds all instance of components in the rendered tree that are DOM components with the tag name matching tagName.
Attributes
- Inherited from:
- LegacyReactTestUtils
Attributes
- Inherited from:
- LegacyReactTestUtils
Attributes
- Inherited from:
- LegacyReactTestUtils
Attributes
- Inherited from:
- LegacyReactTestUtils
Attributes
- Inherited from:
- LegacyReactTestUtils
Attributes
- Inherited from:
- LegacyReactTestUtils
Attributes
- Inherited from:
- LegacyReactTestUtils
Attributes
- Inherited from:
- LegacyReactTestUtils
Renders a component then unmounts and cleans up after use.
Renders a component then unmounts and cleans up after use.
Value parameters
- intoBody
-
Whether to use renderIntoBody or LegacyReactTestUtils.renderIntoDocument.
Attributes
- Inherited from:
- LegacyReactTestUtils
Renders a component then unmounts and cleans up after use.
Renders a component then unmounts and cleans up after use.
Value parameters
- intoBody
-
Whether to use renderIntoBodyAsync() or renderIntoDocumentAsync().
Attributes
- Inherited from:
- LegacyReactTestUtils
Renders a component then unmounts and cleans up after use.
Renders a component then unmounts and cleans up after use.
Value parameters
- intoBody
-
Whether to use renderIntoBodyFuture() or renderIntoDocumentFuture().
Attributes
- Inherited from:
- LegacyReactTestUtils
Renders a component into the document body via ReactDOM.render, then unmounts and cleans up after use.
Renders a component into the document body via ReactDOM.render, then unmounts and cleans up after use.
Unlike LegacyReactTestUtils.renderIntoDocument, this allows DOM focus to work.
Attributes
- Inherited from:
- LegacyReactTestUtils
Renders a component into the document body via ReactDOM.render, and asynchronously waits for the Async to complete before unmounting.
Renders a component into the document body via ReactDOM.render, and asynchronously waits for the Async to complete before unmounting.
Attributes
- Inherited from:
- LegacyReactTestUtils
Renders a component into the document body via ReactDOM.render, and asynchronously waits for the Future to complete before unmounting.
Renders a component into the document body via ReactDOM.render, and asynchronously waits for the Future to complete before unmounting.
Attributes
- Inherited from:
- LegacyReactTestUtils
Renders a component into detached DOM via LegacyReactTestUtils.renderIntoDocument, then unmounts and cleans up after use.
Renders a component into detached DOM via LegacyReactTestUtils.renderIntoDocument, then unmounts and cleans up after use.
Attributes
- Inherited from:
- LegacyReactTestUtils
Renders a component into the document body via ReactDOM.render, and asynchronously waits for the Async to complete before unmounting.
Renders a component into the document body via ReactDOM.render, and asynchronously waits for the Async to complete before unmounting.
Attributes
- Inherited from:
- LegacyReactTestUtils
Renders a component into detached DOM via LegacyReactTestUtils.renderIntoDocument, and asynchronously waits for the Future to complete before unmounting.
Renders a component into detached DOM via LegacyReactTestUtils.renderIntoDocument, and asynchronously waits for the Future to complete before unmounting.
Attributes
- Inherited from:
- LegacyReactTestUtils
Implicits
Inherited implicits
Attributes
- Inherited from:
- ReactTestUtilExtensions
Attributes
- Inherited from:
- ReactTestUtilExtensions1