carbon
carbon copied to clipboard
fix(ModalWrapper): fix submit and close logic, add story w/ args, update tests to RTL
Closes #11713
Changelog
While I was working on refactoring the tests to RTL, I added a story to check everything, then I realized some of the functionalities were actually not working. Specifically closing (on secondary click and close button click) and close on submit. It would, however, close on esc
.
- updates tests to RTL
- one snapshot automatically deleted when tests were updated
- adds story
- fix
this.modal.current.innerModal.current
was returning undefined (probably bc Modal is now a wrapper) - fix handleSubmit to actually close on submit if the prop is true
Testing / Reviewing
- test against website to view bug: https://carbondesignsystem.com/components/modal/code/
- test story and check that:
- modal opens correctly on click
- modal opens correctly on button enter
- modal closes on
esc
press - modal closes on Cancel or close button click
- modal closes on Cancel or close button
enter
- modal closes on submit click
- modal closes on submit
enter
- modal does not close on inner modal click
- modal closes on outer modal click
- check that all tests are passing and make sense
Deploy Preview for carbon-components-react ready!
Name | Link |
---|---|
Latest commit | 68b6a1470f053127656f46bccd4deb985f0533b9 |
Latest deploy log | https://app.netlify.com/sites/carbon-components-react/deploys/62f56c5c7f05c1000990de53 |
Deploy Preview | https://deploy-preview-11839--carbon-components-react.netlify.app |
Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site settings.
Deploy Preview for carbon-elements ready!
Name | Link |
---|---|
Latest commit | 68b6a1470f053127656f46bccd4deb985f0533b9 |
Latest deploy log | https://app.netlify.com/sites/carbon-elements/deploys/62f56c5cd9e413000712eac8 |
Deploy Preview | https://deploy-preview-11839--carbon-elements.netlify.app |
Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site settings.