Skip to content

Conversation

@jperals
Copy link
Member

@jperals jperals commented Nov 20, 2025

Description

Ticket: AWSUI-61492

Related doc: zOhkAQWpDXKq

How has this been tested?

  1. Updated test-utils selectors with npm run build && npx jest -c jest.unit.config.js -u src/__tests__/snapshot-tests/test-utils-selectors.test.tsx and verified the change in the snapshot (part of this PR's diff)
  2. Manually verified in my local environment that both the radio group and the inner radio button have the legacy classnames
Review checklist

The following items are to be evaluated by the author(s) and the reviewer(s).

Correctness

  • Changes include appropriate documentation updates.
  • Changes are backward-compatible if not indicated, see CONTRIBUTING.md.
  • Changes do not include unsupported browser features, see CONTRIBUTING.md.
  • Changes were manually tested for accessibility, see accessibility guidelines.

Security

Testing

  • Changes are covered with new/existing unit tests?
  • Changes are covered with new/existing integration tests?

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.


findButtons(): Array<RadioButtonWrapper> {
return this.findAllByClassName(radioButtonStyles.root).map(r => new RadioButtonWrapper(r.getElement()));
return this.findAll(`:is(.${radioButtonStyles.root}, .${legacyStyles.radio})`).map(
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For finding the radio group with the old test utils, adding the static legacyRootSelector statement above is enough (related: cloudscape-design/test-utils#100), but in order to find the radio buttons inside the radio group, it is necessary to manually construct the selector here.

],
"radio-group": [
"awsui_radio_1mabk",
"awsui_root_1mabk",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@codecov
Copy link

codecov bot commented Nov 20, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.12%. Comparing base (c99509e) to head (07192f2).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4058      +/-   ##
==========================================
+ Coverage   96.99%   97.12%   +0.12%     
==========================================
  Files         862      863       +1     
  Lines       25226    25295      +69     
  Branches     9111     9119       +8     
==========================================
+ Hits        24469    24567      +98     
- Misses        710      722      +12     
+ Partials       47        6      -41     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jperals jperals marked this pull request as ready for review November 20, 2025 11:56
@jperals jperals requested a review from a team as a code owner November 20, 2025 11:56
@jperals jperals requested review from SpyZzey and removed request for a team November 20, 2025 11:56
/* used for backwards-compatibility with older versions of test-utils */
}

.radio {
Copy link
Member

@SpyZzey SpyZzey Nov 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need to add .radio to the styles if we don't use it anywhere? Is it just for the snapshot-tests to generate correctly?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This selector is used here, but the line 24 of this same scss file, here, already provides it, so I am removing it.

@jperals jperals added this pull request to the merge queue Nov 21, 2025
Merged via the queue into main with commit 4950e94 Nov 21, 2025
49 checks passed
@jperals jperals deleted the fix/radio-group-legacy-selectors branch November 21, 2025 09:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants