-
Notifications
You must be signed in to change notification settings - Fork 212
[Chakra v3] Clean up and enable tests for hooks folders #2783
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
Merged
alexvuong
merged 22 commits into
feature/chakra-ui-upgrade-v3
from
cleanup/chakra-ui-v3-part-1
Jul 14, 2025
Merged
Changes from 15 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
d9bfb66
Update Error component with chakra v3
alexvuong 80d87e1
Re-enable Reset password page
alexvuong cf7c442
remove error in typescript
alexvuong 9475ebe
lint
alexvuong 8edb4bd
fix tests use-active-data.test.js
alexvuong 6bb0efb
fix tests in use-add-to-cart-modal.test.js
alexvuong 3d52943
fix tests in hooks
alexvuong 23f6e5f
Merge branch 'feature/chakra-ui-upgrade-v3' into fix-chakra-ui-v3-err…
alexvuong 5bd7d13
Merge branch 'fix-chakra-ui-v3-error-comp' into cleanup/chakra-ui-v3-…
alexvuong 8225fdc
fix tests
alexvuong 4528d2c
Merge branch 'feature/chakra-ui-upgrade-v3' into cleanup/chakra-ui-v3…
alexvuong ebbd9ef
fix tests
alexvuong b09716f
fix tests
alexvuong ad4ce2d
Merge branch 'feature/chakra-ui-upgrade-v3' into cleanup/chakra-ui-v3…
alexvuong 84404bd
fix tests
alexvuong b85f91b
lint
alexvuong 714db84
lint
alexvuong 3517dc4
fix tests in product list metadata comp
alexvuong 36e1dec
lint
alexvuong d8e011d
Merge branch 'feature/chakra-ui-upgrade-v3' into cleanup/chakra-ui-v3…
alexvuong b2c1367
lint
alexvuong 50ad7a3
lint
alexvuong File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -76,6 +76,15 @@ export const AddToCartModal = () => { | |
| viewType: 'small' | ||
| })?.images?.[0] | ||
|
|
||
| const dialogTitleId = 'add-to-cart-modal-title' | ||
| const dialogTitle = intl.formatMessage( | ||
| { | ||
| defaultMessage: '{quantity} {quantity, plural, one {item} other {items}} added to cart', | ||
| id: 'add_to_cart_modal.info.added_to_cart' | ||
| }, | ||
| {quantity: numberOfItemsAdded} | ||
| ) | ||
|
|
||
| return ( | ||
| <Dialog.Root | ||
| size={size} | ||
|
|
@@ -92,17 +101,11 @@ export const AddToCartModal = () => { | |
| borderRadius={{base: 'none', md: 'base'}} | ||
| bgColor="gray.50" | ||
| data-testid="add-to-cart-modal" | ||
| aria-labelledby={dialogTitleId} | ||
|
Contributor
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. adding a11y so test can find this element in DOM |
||
| > | ||
| <Dialog.Header paddingY="8" bgColor="white"> | ||
| <Heading as="h1" fontSize="2xl"> | ||
| {intl.formatMessage( | ||
| { | ||
| defaultMessage: | ||
| '{quantity} {quantity, plural, one {item} other {items}} added to cart', | ||
| id: 'add_to_cart_modal.info.added_to_cart' | ||
| }, | ||
| {quantity: numberOfItemsAdded} | ||
| )} | ||
| <Heading as="h1" fontSize="2xl" id={dialogTitleId}> | ||
|
Contributor
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. adding id to connect to |
||
| {dialogTitle} | ||
| </Heading> | ||
| </Dialog.Header> | ||
| <Dialog.Body bgColor="white" padding="0" marginBottom={{base: 40, lg: 0}}> | ||
|
|
@@ -299,7 +302,7 @@ export const AddToCartModal = () => { | |
| <DisplayPrice | ||
| priceData={priceData} | ||
| quantity={quantity} | ||
| currency={currency} | ||
| currency={currency || 'GBP'} | ||
| /> | ||
| </Box> | ||
| </Flex> | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Will enable this back when passwordless bug is fixed in #2783 is merged. I will port the changes to here and fix tests