-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(common): add prop theme utility for E2E (#9027)
**Related Issue:** #7180 ## Summary Our chromium tests do a good job of ensuring the component token updates to styles do not break the existing UI but custom style application of tokens should be considered a data change, not a style change and therefor should be tested with Unit tests. These E2E tests are faster, less resource heavy, and less prone to human error. However, E2E token tests are harder to set up. To facilitate ease-of-use for other developers this PR introduces a new commonTest utility called themed. This utility expects a calcite-component followed by an object of component token names as keys and each value being an object with a selector, shadowSelector, targetProp, and optional state. The state key will accept a string or an object for more selector specificity which is required when testing a "press"/"active" state.
- Loading branch information
1 parent
c284778
commit dff8460
Showing
2 changed files
with
289 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters