Skip to content

Commit 12882a0

Browse files
glo42707del22123
andauthored
Pwa 3437 (#4424)
* Fixed place order and filter button issue * Fixed various console warnings in various pages * Fixed ariaLabel errors --------- Co-authored-by: Bharathidasan Elangovan <del22123@adobe.com>
1 parent b92f7d8 commit 12882a0

File tree

13 files changed

+40
-22
lines changed

13 files changed

+40
-22
lines changed

packages/venia-ui/lib/components/CheckoutPage/OrderConfirmationPage/createAccount.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ const CreateAccount = props => {
179179
<GoogleReCaptcha {...recaptchaWidgetProps} />
180180
<div className={classes.actions}>
181181
<Button
182-
disabled={isDisabled}
182+
disabled={Boolean(isDisabled)}
183183
type="submit"
184184
className={classes.create_account_button}
185185
data-cy="OrderConfirmationPage-CreateAccount-createAccountButton"

packages/venia-ui/lib/components/CheckoutPage/__tests__/__snapshots__/checkoutPage.spec.js.snap

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ exports[`CheckoutPage renders an error and disables review order button if there
173173
onTouchCancel={[Function]}
174174
onTouchEnd={[Function]}
175175
onTouchMove={[Function]}
176-
onTouchStart={[Function]}
176+
onTouchStart={[MockFunction toggleSignInContent]}
177177
type="button"
178178
>
179179
<span
@@ -537,7 +537,7 @@ exports[`CheckoutPage renders checkout content for guest on desktop 1`] = `
537537
onTouchCancel={[Function]}
538538
onTouchEnd={[Function]}
539539
onTouchMove={[Function]}
540-
onTouchStart={[Function]}
540+
onTouchStart={[MockFunction toggleSignInContent]}
541541
type="button"
542542
>
543543
<span
@@ -679,7 +679,7 @@ exports[`CheckoutPage renders checkout content for guest on mobile 1`] = `
679679
onTouchCancel={[Function]}
680680
onTouchEnd={[Function]}
681681
onTouchMove={[Function]}
682-
onTouchStart={[Function]}
682+
onTouchStart={[MockFunction toggleSignInContent]}
683683
type="button"
684684
>
685685
<span

packages/venia-ui/lib/components/CheckoutPage/checkoutPage.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ const CheckoutPage = props => {
177177
className={classes.signInButton}
178178
data-cy="CheckoutPage-signInButton"
179179
onClick={toggleSignInContent}
180+
onTouchStart={toggleSignInContent}
180181
priority="normal"
181182
>
182183
<FormattedMessage
@@ -282,6 +283,7 @@ const CheckoutPage = props => {
282283
checkoutStep === CHECKOUT_STEP.REVIEW ? (
283284
<Button
284285
onClick={handlePlaceOrder}
286+
onTouchStart={handlePlaceOrder}
285287
onKeyDown={handlePlaceOrderEnterKeyPress}
286288
priority="high"
287289
className={classes.place_order_button}

packages/venia-ui/lib/components/FilterModal/FilterList/filterDefault.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ const FilterDefault = props => {
5757
field={`${label}-${value_index}`}
5858
fieldValue={!!isSelected}
5959
label={title}
60-
ariaLabel={ariaLabel}
60+
aria-label={ariaLabel}
6161
data-cy="FilterDefault-checkbox"
6262
onClick={onMouseDown}
6363
{...restProps}

packages/venia-ui/lib/components/FilterModal/FilterList/filterItemRadio.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ const FilterItemRadio = props => {
4545
value={value}
4646
onChange={handleOnchange}
4747
data-cy="FilterDefault-radio"
48-
ariaLabel={ariaLabel}
48+
aria-label={ariaLabel}
4949
/>
5050
);
5151

packages/venia-ui/lib/components/FilterModal/FilterList/filterList.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ const FilterList = props => {
3636
var maxRange = Number(items[items.length - 1].value.split('_')[1]);
3737
if (filterState !== undefined) {
3838
const filterArray = [...filterState];
39-
var currentMinVal = Number(filterArray[0].value.split('_')[0]);
40-
var currentMaxVal = Number(filterArray[0].value.split('_')[1]);
39+
var currentMinVal = Number(filterArray[0]?.value?.split('_')[0]);
40+
var currentMaxVal = Number(filterArray[0]?.value?.split('_')[1]);
4141
}
4242
}
4343

packages/venia-ui/lib/components/FilterModal/filterFooter.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ const FilterFooter = props => {
2626
<Button
2727
disabled={!touched}
2828
onClick={applyFilters}
29+
onTouchStart={applyFilters}
2930
data-cy="FilterFooter-button"
3031
aria-label={buttonLabel}
3132
aria-disabled={!touched}

packages/venia-ui/lib/components/FilterModal/filterModal.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ const FilterModal = props => {
8080
<LinkButton
8181
type="button"
8282
onClick={handleReset}
83-
ariaLabel={clearAllAriaLabel}
83+
aria-label={clearAllAriaLabel}
8484
data-cy="FilterModal-clearButton"
8585
>
8686
<FormattedMessage

packages/venia-ui/lib/components/FilterModalOpenButton/filterModalOpenButton.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ const FilterModalOpenButton = props => {
2424
}}
2525
data-cy="FilterModalOpenButton-button"
2626
onClick={handleOpen}
27+
onTouchStart={handleOpen}
2728
onKeyDown={handleKeypress}
2829
type="button"
2930
aria-live="polite"

packages/venia-ui/lib/components/OrderHistoryPage/OrderDetails/items.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const Items = props => {
1313
const classes = useStyle(defaultClasses, props.classes);
1414

1515
const itemsComponent = items.map(item => (
16-
<Item key={item.id} {...item} {...imagesData[item.product_sku]} />
16+
<Item key={item.id} {...item} {...imagesData[0][item.product_sku]} />
1717
));
1818

1919
return (

0 commit comments

Comments
 (0)