From fbc1c78c0ff6f50bc25a3512fee1220fbd5f3f50 Mon Sep 17 00:00:00 2001 From: Ujwala <59447810+unandyala@users.noreply.github.com> Date: Fri, 10 Jan 2025 09:47:18 -0500 Subject: [PATCH] @W-17572026: Fix failing checkout test (#2195) Fix failing checkout tests --- packages/template-retail-react-app/CHANGELOG.md | 3 ++- .../app/pages/checkout/index.test.js | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/template-retail-react-app/CHANGELOG.md b/packages/template-retail-react-app/CHANGELOG.md index 95a8bd1853..297d4770ea 100644 --- a/packages/template-retail-react-app/CHANGELOG.md +++ b/packages/template-retail-react-app/CHANGELOG.md @@ -1,7 +1,8 @@ ## v5.1.0-dev (TBD) +- Fixed failing checkout tests [#2195](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/2195) - [BUG] Fixed "getCheckboxProps is not a function" when rendering checkout page in generated app.[#2140](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/2140) -- Replace transfer basket call with merge basket on checkout [#2138])(https://github.com/SalesforceCommerceCloud/pwa-kit/pull/2138) +- Replace transfer basket call with merge basket on checkout [#2138](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/2138) ### Accessibility Improvements - [a11y] Fix LinkList component to follow a11y practise [#2098])(https://github.com/SalesforceCommerceCloud/pwa-kit/pull/2098) diff --git a/packages/template-retail-react-app/app/pages/checkout/index.test.js b/packages/template-retail-react-app/app/pages/checkout/index.test.js index e394139639..29131447c2 100644 --- a/packages/template-retail-react-app/app/pages/checkout/index.test.js +++ b/packages/template-retail-react-app/app/pages/checkout/index.test.js @@ -394,7 +394,7 @@ test('Can proceed through checkout steps as guest', async () => { // Fill out credit card payment form await user.type(screen.getByLabelText(/card number/i), '4111111111111111') await user.type(screen.getByLabelText(/name on card/i), 'Testy McTester') - await user.type(screen.getByLabelText(/expiration date/i), '1224') + await user.type(screen.getByLabelText(/expiration date/i), '1240') await user.type(screen.getByLabelText(/^security code$/i /* not "security code info" */), '123') // Same as shipping checkbox selected by default @@ -485,7 +485,7 @@ test('Can proceed through checkout as registered customer', async () => { // (we no longer have saved payment methods) await user.type(screen.getByLabelText(/card number/i), '4111111111111111') await user.type(screen.getByLabelText(/name on card/i), 'Testy McTester') - await user.type(screen.getByLabelText(/expiration date/i), '1224') + await user.type(screen.getByLabelText(/expiration date/i), '1240') await user.type(screen.getByLabelText(/^security code$/i /* not "security code info" */), '123') // Same as shipping checkbox selected by default