carbon
carbon copied to clipboard
refactor(pod): convert component code to typescript
Proposed behaviour
- Refactor component, style and index files of
Pod
to typescript - Update
Pod
such that ifonEdit
is a string, render edit button as aLink
with ahref
instead of ato
prop - which was deprecated some time ago (see commit for details) - Update test stories file to typescript CSF
- Rewrite E2E cypress tests - which test the
title
,subtitle
,footer
andchildren
props - to enzyme tests.- Due to an encountered storybook issue with visiting a story url, where the story args are not set using the url parameters as expected. The Storybook Args and/or Controls addons are suspected to be the cause.
- Amend
Grid
's E2E cypress tests - which usePod
, to be more generic so they are independent.
Current behaviour
-
Pod
is written in javascript and its test stores file is written in MDX
Checklist
- [x] Commits follow our style guide
- [x] Related issues linked in commit messages if required
- [x] Screenshots are included in the PR if useful
- [x] All themes are supported if required
- [x] Unit tests added or updated if required
- [x] Cypress automation tests added or updated if required
- [x] Storybook added or updated if required
- [x] Translations added or updated (including creating or amending translation keys table in storybook) if required
- [x] Typescript
d.ts
file added or updated if required
QA
- [ ] Tested in CodeSandbox/storybook
- [ ] Add new Cypress test coverage if required
- [ ] Carbon implementation matches Design System/designs
- [ ] UI Tests GitHub check reviewed if required
Additional context
-
Pod
tests will be refactored to typescript in a separate PR - due to the complexity of the file.
Testing instructions
- Verify no regressions were introduced from this refactor.
This pull request is automatically built and testable in CodeSandbox.
To see build info of the built libraries, click here or the icon next to each commit SHA.
Latest deployment of this branch, based on commit abb90257c986b6ae57cd7d0ec9ef908f8fa8ec10:
Sandbox | Source |
---|---|
carbon-quickstart | Configuration |
carbon-quickstart-typescript | Configuration |
Test summary
Run details
Project | carbon |
Status | Passed |
Commit | abb90257c9 |
Started | Jan 17, 2023 5:31 PM |
Ended | Jan 17, 2023 5:37 PM |
Duration | 05:57 💡 |
OS | Linux Debian - |
Browser | Chrome 107 ![]() |
View run in Cypress Dashboard ➡️
This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard
:tada: This PR is included in version 114.1.0 :tada:
The release is available on:
Your semantic-release bot :package::rocket: