-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: c2p customer email is set from basket (#1178)
- Loading branch information
Showing
5 changed files
with
17 additions
and
11 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
|
@@ -29,6 +29,8 @@ beforeEach(() => { | |
querySelector = document.querySelector; | ||
window.Configuration = { environment: 'TEST' }; | ||
window.klarnaWidgetEnabled = true; | ||
window.merchantAccount = 'test_merchant'; | ||
window.customerEmail = '[email protected]'; | ||
store.checkoutConfiguration = {}; | ||
setCheckoutConfiguration() | ||
card = getCardConfig(); | ||
|
@@ -49,6 +51,8 @@ describe('Checkout Configuration', () => { | |
const data = { paymentMethod: { type: 'scheme' } }; | ||
card.onChange({ isValid: true, data }, { props: { holderName: 'test' } }); | ||
expect(store.selectedPayment.isValid).toBeTruthy(); | ||
expect(card.clickToPayConfiguration.shopperEmail).toBe(window.customerEmail); | ||
expect(card.clickToPayConfiguration.merchantDisplayName).toBe(window.merchantAccount); | ||
}); | ||
|
||
it('handles onFieldValid', () => { | ||
|
This file contains 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 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 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 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