fix(ui): fix and improve some test descriptions#1806
Conversation
Signed-off-by: Franz Heidl <franzheidl@sap.com>
|
|
Signed-off-by: Franz Heidl <franzheidl@sap.com>
Signed-off-by: Franz Heidl <franzheidl@sap.com>
Signed-off-by: Franz Heidl <franzheidl@sap.com>
There was a problem hiding this comment.
Pull request overview
This PR improves the correctness of ui-components unit tests by fixing misleading test descriptions, correcting copy/paste artifacts, and re-aligning FormRow / FormSection tests with the components they actually cover (per #1590).
Changes:
- Corrected multiple test titles/strings across several components (typos, wrong component names, clearer wording).
- Fixed
FormattedTexttestids that were incorrectly copied fromPagination. - Reworked
FormRow.test.tsxandFormSection.test.tsxso each file tests the correct component (and added additionalFormSectiontitle-related assertions).
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/ui-components/src/components/TopNavigationItem/TopNavigationItem.test.tsx | Fixes typos in test descriptions (“ToppNavigationItem” → “TopNavigationItem”). |
| packages/ui-components/src/components/SelectDivider/SelectDivider.test.tsx | Fixes typo in test description (“pops” → “props”). |
| packages/ui-components/src/components/Select/Select.test.tsx | Fixes typo in test description (“defgault” → “default”). |
| packages/ui-components/src/components/Radio/Radio.test.tsx | Improves several test descriptions to consistently refer to Radio. |
| packages/ui-components/src/components/ModalFooter/ModalFooter.test.tsx | Fixes typo in test description (“onComfirm” → “onConfirm”). |
| packages/ui-components/src/components/GridColumn/GridColumn.test.tsx | Fixes incorrect component reference in test description (“Grid row” → “Grid column”). |
| packages/ui-components/src/components/FormSection/FormSection.test.tsx | Moves/updates tests so the file validates FormSection behavior (including title rendering). |
| packages/ui-components/src/components/FormRow/FormRow.test.tsx | Moves/updates tests so the file validates FormRow behavior. |
| packages/ui-components/src/components/FormattedText/FormattedText.test.tsx | Fixes copied test ids (“my-pagination” → “my-formatted-text”). |
Signed-off-by: Franz Heidl <franzheidl@sap.com>
Signed-off-by: Franz Heidl <franzheidl@sap.com>
Summary
This PR fixes test descriptions in ui-components as per #1590.
Changes Made
Radiotest descriptionsGridColumntest descriptionsTopNavigationItemFormattedTexttest descriptionsToasttest descriptionsSelecttest descriptionsSelectDividertest descriptionsModalFootertest descriptionsFormRow.test.tsxandFormSection.test.tsxfiles / file contentsRelated Issues
Closes #1590
Test Instructions
pnpm ipnpm run testChecklist
PR Manifesto
Review the PR Manifesto for best practises.