-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PayPal Express in Cart and Mini-Cart page (#1122)
* Rendering PayPal Expres button (#1076) * Paypal express payment (#1077) * Merchant reference set for PayPal Express (#1080) * Populate payment instrument fields for PayPal Express (#1081) * Adding the possibility to enable/disable paypal express from BM (#1085) * feat: adding the possibility to enable/disable paypal ecs from BM * chore: linting * fix: fixing klarna e2e test * PayPal Express update order (#1086) * feat: paypalUpdateOrder endpoint * test: unit tests and jsdoc annotations * feat: paypal update order * feat(SFI-696): show paypal express if enabled in BM * chore(SFI-696): add sonar properties file * refactor(SFI-696): function to create redirectUrl * feat(SFI-696): add stacktrace for error and fatal logs * chore(SFI-696): exclude e2e tests from sonar * fix(SFI-696): clear session.privacy data for paypal express * chore(SFI-696): undo changes to cartridges * fix(SFI-696): zero-auth flow * add spinner for paypal express flow (#1091) * Added the review page template and controller to render it (#1096) * Place order button for express payments on review page (#1112) * feat(SFI-790): new template for checkout review button * feat(SFI-789): handle payments details call from checkout review page * feat(SFI-789): create basket view data on express review page * feat(SFI-789): create basket view data on express review page * chore: merging develop into SFI-42 and adding required mocks (#1115) * Added e2e tests for paypal express (#1117) * test(SFI-798): paypal express unit tests (#1121) * fix: fixing apple pay express flow --------- Co-authored-by: Shani <[email protected]>
- Loading branch information
1 parent
1133168
commit 5b1cfd4
Showing
65 changed files
with
3,311 additions
and
789 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 |
---|---|---|
|
@@ -22,6 +22,6 @@ jobs: | |
npm install | ||
npm run lint:fix | ||
npm run lint | ||
npm test | ||
npm run test:coverage | ||
env: | ||
CI: true |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
function ShippingLocation() { | ||
return jest.fn(); | ||
} | ||
|
||
module.exports = ShippingLocation; |
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 |
---|---|---|
@@ -1,6 +1,40 @@ | ||
const Money = require('../value/Money'); | ||
|
||
export const getShipmentShippingModel = jest.fn((shipment) => ({ | ||
getApplicableShippingMethods: jest.fn(() => ({ | ||
})), | ||
})); | ||
|
||
const shippingMethods = [ | ||
{ | ||
description: 'Order received within 7-10 business days', | ||
displayName: 'Ground', | ||
ID: '001', | ||
custom: { | ||
estimatedArrivalTime: '7-10 Business Days', | ||
}, | ||
getTaxClassID: jest.fn(), | ||
}, | ||
{ | ||
description: 'Order received in 2 business days', | ||
displayName: '2-Day Express', | ||
ID: '002', | ||
shippingCost: '$0.00', | ||
custom: { | ||
estimatedArrivalTime: '2 Business Days', | ||
}, | ||
getTaxClassID: jest.fn(), | ||
}, | ||
]; | ||
const shippingCost = Money(); | ||
const shipmentShippingModel = { | ||
getApplicableShippingMethods: jest.fn(() => ({ | ||
toArray: jest.fn(() => shippingMethods), | ||
})), | ||
getShippingCost: jest.fn(() => ({ | ||
getAmount: jest.fn(() => shippingCost), | ||
})), | ||
}; | ||
const productShippingModel = { | ||
getApplicableShippingMethods: jest.fn(() => ({})), | ||
getShippingCost: jest.fn(() => ({ | ||
getAmount: jest.fn(() => shippingCost), | ||
})), | ||
}; | ||
export const getShipmentShippingModel = jest.fn(() => shipmentShippingModel); | ||
export const getProductShippingModel = jest.fn(() => productShippingModel); |
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export const getTaxJurisdictionID = jest.fn(); | ||
export const getTaxRate = jest.fn(); |
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 |
---|---|---|
@@ -1 +1 @@ | ||
export const createUUID = jest.fn(); | ||
export const createUUID = jest.fn(() => 'mock_UUID'); |
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 |
---|---|---|
@@ -1,5 +1,30 @@ | ||
export class Money { | ||
constructor() { | ||
return {value: 10, currency: 'TEST'}; | ||
} | ||
} | ||
function Money(isAvailable) { | ||
return { | ||
available: isAvailable, | ||
value: '10.99', | ||
currency: 'USD', | ||
getDecimalValue() { | ||
return '10.99'; | ||
}, | ||
getValue() { | ||
return '10.99'; | ||
}, | ||
getCurrencyCode() { | ||
return 'USD'; | ||
}, | ||
subtract() { | ||
return new Money(isAvailable); | ||
}, | ||
multiply() { | ||
return new Money(isAvailable); | ||
}, | ||
add() { | ||
return new Money(isAvailable); | ||
}, | ||
addRate() { | ||
return new Money(isAvailable); | ||
}, | ||
}; | ||
} | ||
|
||
module.exports = Money; |
Oops, something went wrong.