Testing core classes
API documentation for test utilities core classes.
On this page
Did this page help you?
Tell us more - optional
Overview
This article contains the API documentation for Cloudscape test utilities core classes. These utilities don’t depend on the specific component you’re testing. For information about how to use these core classes in your tests, see introduction to testing.
Test utilities expose two core classes:
An element wrapper for unit tests, where you typically have direct access to the Document Object Model (DOM).
An element wrapper for integration tests, where it’s typical to rely on string selectors.
Unit Testing
The entry point for unit tests is the default method exposed by the '@cloudscape-design/components/test-utils/dom'
package. This method returns an instance of ElementWrapper
. The following table describes the class interface.
For more information and examples for unit testing with Cloudscape, see introduction to testing.
Integration testing
The entry point for unit tests is the default method exposed by the '@cloudscape-design/components/test-utils/selectors'
package. This method returns an instance of ElementWrapper
. The following table describes the class interface.
For more information and examples for integration testing with Cloudscape see introduction to testing.