-
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
Changes from 21 commits
d9bfb66
80d87e1
cf7c442
9475ebe
8edb4bd
6bb0efb
3d52943
23f6e5f
5bd7d13
8225fdc
4528d2c
ebbd9ef
b09716f
ad4ce2d
84404bd
b85f91b
714db84
3517dc4
36e1dec
d8e011d
b2c1367
50ad7a3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -223,7 +223,7 @@ const Header = ({ | |
| as="ul" | ||
| data-testid="account-detail-nav" | ||
| > | ||
| {navLinks.map((link, index) => { | ||
|
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. unused |
||
| {navLinks.map((link) => { | ||
| const LinkIcon = link.icon | ||
| return ( | ||
| <List.Item key={link.name}> | ||
|
|
||
| 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> | ||
|
|
||
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