Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/template-retail-react-app/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## v5.1.0-dev (TBD)

- Update test data references to 2024, and unify to 01/2040 [#2196](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/2197)
- 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)
Expand Down
10 changes: 5 additions & 5 deletions packages/template-retail-react-app/app/mocks/mock-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ export const mockedRegisteredCustomer = {
cardType: 'Master Card',
creditCardExpired: false,
expirationMonth: 1,
expirationYear: 2030,
expirationYear: 2040,
holder: 'Test McTester',
maskedNumber: '************5454',
numberLastDigits: '5454',
Expand Down Expand Up @@ -203,7 +203,7 @@ export const mockedRegisteredCustomerWithNoAddress = {
cardType: 'Master Card',
creditCardExpired: false,
expirationMonth: 1,
expirationYear: 2030,
expirationYear: 2040,
holder: 'Test McTester',
maskedNumber: '************5454',
numberLastDigits: '5454',
Expand Down Expand Up @@ -826,7 +826,7 @@ export const mockOrderHistory = {
cardType: 'Visa',
creditCardExpired: false,
expirationMonth: 1,
expirationYear: 2030,
expirationYear: 2040,
holder: 'tester testing',
maskedNumber: '************1111',
numberLastDigits: '1111',
Expand Down Expand Up @@ -978,7 +978,7 @@ export const mockOrderHistory = {
cardType: 'Master Card',
creditCardExpired: false,
expirationMonth: 1,
expirationYear: 2030,
expirationYear: 2040,
holder: 'tester testing',
maskedNumber: '************5454',
numberLastDigits: '5454',
Expand Down Expand Up @@ -1130,7 +1130,7 @@ export const mockOrderHistory = {
cardType: 'Master Card',
creditCardExpired: false,
expirationMonth: 1,
expirationYear: 2030,
expirationYear: 2040,
holder: 'tester testing',
maskedNumber: '************5454',
numberLastDigits: '5454',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ export const mockOrder = {
paymentCard: {
cardType: 'Visa',
creditCardExpired: false,
expirationMonth: 12,
expirationYear: 2023,
expirationMonth: 1,
expirationYear: 2040,
holder: 'test',
maskedNumber: '************1111',
numberLastDigits: '1111'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ beforeEach(() => {
cardType: 'Master Card',
creditCardExpired: false,
expirationMonth: 1,
expirationYear: 2030,
expirationYear: 2040,
holder: 'Test McTester',
maskedNumber: '************5454',
numberLastDigits: '5454',
Expand Down Expand Up @@ -275,8 +275,8 @@ test('Can proceed through checkout steps as guest', async () => {
paymentCard: {
cardType: 'Visa',
creditCardExpired: false,
expirationMonth: 12,
expirationYear: 2024,
expirationMonth: 1,
expirationYear: 2040,
holder: 'Testy McTester',
maskedNumber: '************1111',
numberLastDigits: '1111',
Expand Down Expand Up @@ -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), '1240')
await user.type(screen.getByLabelText(/expiration date/i), '0140')
await user.type(screen.getByLabelText(/^security code$/i /* not "security code info" */), '123')

// Same as shipping checkbox selected by default
Expand All @@ -417,7 +417,7 @@ test('Can proceed through checkout steps as guest', async () => {
// Verify applied payment and billing address
expect(step3Content.getByText('Visa')).toBeInTheDocument()
expect(step3Content.getByText('•••• 1111')).toBeInTheDocument()
expect(step3Content.getByText('12/2024')).toBeInTheDocument()
expect(step3Content.getByText('1/2040')).toBeInTheDocument()

expect(step3Content.getByText('Tester McTesting')).toBeInTheDocument()
expect(step3Content.getByText('123 Main St')).toBeInTheDocument()
Expand Down Expand Up @@ -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), '1240')
await user.type(screen.getByLabelText(/expiration date/i), '0140')
await user.type(screen.getByLabelText(/^security code$/i /* not "security code info" */), '123')

// Same as shipping checkbox selected by default
Expand Down Expand Up @@ -518,7 +518,7 @@ test('Can proceed through checkout as registered customer', async () => {
// Verify applied payment and billing address
expect(step3Content.getByText('Master Card')).toBeInTheDocument()
expect(step3Content.getByText('•••• 5454')).toBeInTheDocument()
expect(step3Content.getByText('1/2030')).toBeInTheDocument()
expect(step3Content.getByText('1/2040')).toBeInTheDocument()

expect(step3Content.getByText('John Smith')).toBeInTheDocument()
expect(step3Content.getByText('123 Main St')).toBeInTheDocument()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,12 +173,12 @@ function UseCustomer() {
paymentCard: {
number: '4454852652415965',
validFromMonth: 12,
expirationYear: 2030,
expirationMonth: 12,
expirationMonth: 1,
expirationYear: 2040,
cardType: 'Visa',
holder: 'John Smith',
issueNumber: '92743928',
validFromYear: 22
validFromYear: 2020
},
paymentMethodId: 'Credit Card'
},
Expand Down
Loading