-
Notifications
You must be signed in to change notification settings - Fork 204
fix: Restore legacy test util selectors for Radio Group #4058
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,13 +6,17 @@ import { escapeSelector } from '@cloudscape-design/test-utils-core/utils'; | |
| import RadioButtonWrapper from '../radio-button'; | ||
|
|
||
| import radioButtonStyles from '../../../internal/components/radio-button/test-classes/styles.selectors.js'; | ||
| import legacyStyles from '../../../radio-group/styles.selectors.js'; | ||
| import styles from '../../../radio-group/test-classes/styles.selectors.js'; | ||
|
|
||
| export default class RadioGroupWrapper extends ComponentWrapper { | ||
| static rootSelector: string = styles.root; | ||
| static legacyRootSelector: string = legacyStyles.root; | ||
|
|
||
| findButtons(): Array<RadioButtonWrapper> { | ||
| return this.findAllByClassName(radioButtonStyles.root).map(r => new RadioButtonWrapper(r.getElement())); | ||
| return this.findAll(`:is(.${radioButtonStyles.root}, .${legacyStyles.radio})`).map( | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For finding the radio group with the old test utils, adding the |
||
| r => new RadioButtonWrapper(r.getElement()) | ||
| ); | ||
| } | ||
|
|
||
| findInputByValue(value: string): ElementWrapper<HTMLInputElement> | null { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are the two classnames that were removed here: https://github.com/cloudscape-design/components/pull/4021/files#diff-ce8e8ee722d906e9038b89e1e23cddc59e5a144eab9f63e99751ddd309ce7fd2L517-L518