Skip to content

Commit

Permalink
Apple Pay on PDP (#1237)
Browse files Browse the repository at this point in the history
* feat: enabling/disabling apple pay express on pdp config (#1140)

* Render applepay btn on PDP (#1145)

* fix: removed err in catch

* feat: override detail page

* fix: unit tests

* chore: move files

* fix: tests

* fix: render button on initial render of the product

* feat: enabling/disabling apple pay express on pdp config (#1140)

* Render applepay btn on PDP (#1145)

* fix: removed err in catch

* feat: override detail page

* fix: unit tests

* chore: move files

* fix: tests

* fix: render button on initial render of the product

* chore: consolidate metadata attributes

* chore: remove system attributes

* Create temporary basket for express pdp (#1183)

* feat(SFI-876): applepay express pdp

* chore(SFI-876): unit tests

* chore(SFI-876): unit tests

* feat(SFI-876): create temporary basket for express pdp

* fix(SFI-876): handle temporary basket creation failure

* fix: adding csrf validation to applePayExpressCommon.js and linting

* chore: linting

---------

Co-authored-by: Zenit Shkreli <[email protected]>

* applepay unit tests (#1193)

* feat(SFI-876): applepay express pdp

* chore(SFI-876): unit tests

* chore(SFI-876): unit tests

* feat(SFI-876): create temporary basket for express pdp

* fix(SFI-876): handle temporary basket creation failure

* fix: lint

* chore: fix lint errors

* fix: lint

* chore: added tests for onshipping contact callback

---------

Co-authored-by: shani <[email protected]>

* BM express config (#1197)

* feat: update the UI for enabling express buttons

* feat: make title bolder

* feat: adapt adyen settings page for modern UI

* fix: removed duplicate key

* fix: linting

* fix: line items

* chore: tests conflicts

* fix: version

* chore: trigger e2e

* chore: bump ubuntu ver

* chore: upgrade playwright

* fix: render generic comp

* fix: tests

---------

Co-authored-by: Zenit Shkreli <[email protected]>
Co-authored-by: Shani <[email protected]>
Co-authored-by: shani <[email protected]>
  • Loading branch information
4 people authored Jan 20, 2025
1 parent 97247f8 commit 28b6068
Show file tree
Hide file tree
Showing 30 changed files with 1,470 additions and 163 deletions.
3 changes: 2 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ module.exports = {
"import/extensions": "off",
"camelcase": "off",
"no-bitwise": "off",
"no-underscore-dangle": "off"
"no-underscore-dangle": "off",
'no-restricted-syntax': ['off', 'ForOfStatement'],
},
};
2 changes: 1 addition & 1 deletion .github/workflows/E2E_SFRA.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
jobs:
setup-the-cartridge:
if: ${{ github.actor != 'renovate[bot]' || github.actor != 'lgtm-com[bot]' }}
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
Expand Down
8 changes: 7 additions & 1 deletion jest/sfccCartridgeMocks.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ jest.mock(
{ virtual: true },
);

jest.mock(
'*/cartridge/adyen/scripts/expressPayments/createTemporaryBasket',
() => jest.fn(),
{ virtual: true },
);

jest.mock(
'*/cartridge/adyen/scripts/expressPayments/selectShippingMethods',
() => jest.fn(),
Expand Down Expand Up @@ -467,4 +473,4 @@ jest.mock(
getInstallmentValues: jest.fn(),
}),
{ virtual: true },
);
);
16 changes: 8 additions & 8 deletions metadata/site_import/meta/system-objecttype-extensions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -517,13 +517,6 @@
<min-length>0</min-length>
<field-length>0</field-length>
</attribute-definition>
<attribute-definition attribute-id="ExpressPayments_enabled">
<display-name xml:lang="x-default">Enable express checkout</display-name>
<type>boolean</type>
<mandatory-flag>false</mandatory-flag>
<externally-managed-flag>false</externally-managed-flag>
<default-value>true</default-value>
</attribute-definition>
<attribute-definition attribute-id="ExpressPayments_order">
<display-name xml:lang="x-default">Order of the express payment buttons</display-name>
<description xml:lang="x-default">If you want to change the order go to the new config page (Adyen Settings)</description>
Expand All @@ -539,6 +532,13 @@
<externally-managed-flag>false</externally-managed-flag>
<default-value>true</default-value>
</attribute-definition>
<attribute-definition attribute-id="ApplePayExpress_Pdp_Enabled">
<display-name xml:lang="x-default">Enable Apple Pay express on product detail page</display-name>
<type>boolean</type>
<mandatory-flag>false</mandatory-flag>
<externally-managed-flag>false</externally-managed-flag>
<default-value>true</default-value>
</attribute-definition>
<attribute-definition attribute-id="AmazonPayExpress_Enabled">
<display-name xml:lang="x-default">Enable Amazon Pay express checkout</display-name>
<type>boolean</type>
Expand Down Expand Up @@ -708,9 +708,9 @@
<attribute attribute-id="AdyenGiving_charityUrl"/>
<attribute attribute-id="AdyenGiving_backgroundUrl"/>
<attribute attribute-id="AdyenGiving_logoUrl"/>
<attribute attribute-id="ExpressPayments_enabled"/>
<attribute attribute-id="ExpressPayments_order"/>
<attribute attribute-id="ApplePayExpress_Enabled"/>
<attribute attribute-id="ApplePayExpress_Pdp_Enabled"/>
<attribute attribute-id="AmazonPayExpress_Enabled"/>
<attribute attribute-id="PayPalExpress_Enabled"/>
<attribute attribute-id="PayPalExpress_ReviewPage_Enabled"/>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "app_adyen_SFRA",
"version": "24.4.1",
"version": "24.4.2",
"description": "Adyen's official cartridge for SFRA",
"main": "index.js",
"paths": {
Expand Down
Loading

0 comments on commit 28b6068

Please sign in to comment.