diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml new file mode 100644 index 0000000000..930d995b34 --- /dev/null +++ b/.github/workflows/playwright.yml @@ -0,0 +1,35 @@ +name: Playwright Accessibility Tests +on: + # allow for manual triggers + workflow_dispatch: {} + push: + branches: [playwright-automated-testing] + pull_request: + branches: [playwright-automated-testing] +jobs: + test: + timeout-minutes: 60 + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: lts/* + - name: Install dependencies + run: npm i + - name: Install Playwright Browsers + run: npx playwright install --with-deps + - name: Run server + run: | + ./.github/scripts/runServerV2.sh + + - name: Run Playwright Tests + run: npx playwright test tests/playwright/tests + + - uses: actions/upload-artifact@v4 + if: always() + with: + name: playwright-report + path: playwright-report/ + retention-days: 1 \ No newline at end of file diff --git a/.gitignore b/.gitignore index db0d27f00e..9c2c4dcc3f 100644 --- a/.gitignore +++ b/.gitignore @@ -22,4 +22,8 @@ ehthumbs.db Icon? Thumbs.db -!*/**/icons \ No newline at end of file +!*/**/icons +/test-results/ +/playwright-report/ +/blob-report/ +/playwright/.cache/ diff --git a/content/messages/AU/gpl.json b/content/messages/AU/gpl.json index 51f8982a6b..7d1ae57018 100644 --- a/content/messages/AU/gpl.json +++ b/content/messages/AU/gpl.json @@ -1,7 +1,8 @@ { "meta": { "offerCountry": "AU", - "offerType": "GPL", + "offerType": "PAY_LATER_SHORT_TERM", + "messageType": "PLST_NQ", "offerTerm": "{total_payments}", "lander": "", "variables": { diff --git a/content/messages/AU/gplq.json b/content/messages/AU/gplq.json index 19bb82f0b3..b0be06b261 100644 --- a/content/messages/AU/gplq.json +++ b/content/messages/AU/gplq.json @@ -1,7 +1,8 @@ { "meta": { "offerCountry": "AU", - "offerType": "GPLQ", + "offerType": "PAY_LATER_SHORT_TERM", + "messageType": "PLST_SQ", "offerTerm": "{total_payments}", "lander": "", "variables": { diff --git a/content/messages/DE/generic-non-de.json b/content/messages/DE/generic-non-de.json index c9ec765b79..98449fde93 100644 --- a/content/messages/DE/generic-non-de.json +++ b/content/messages/DE/generic-non-de.json @@ -1,7 +1,8 @@ { "meta": { "offerCountry": "DE", - "offerType": "GENERIC:NON-DE", + "offerType": "GENERIC", + "messageType": "GENERIC_XB", "offerTerm": "{total_payments}", "lander": "", "variables": { diff --git a/content/messages/DE/generic.json b/content/messages/DE/generic.json index 0d332d8c39..33877b6156 100644 --- a/content/messages/DE/generic.json +++ b/content/messages/DE/generic.json @@ -2,6 +2,7 @@ "meta": { "offerCountry": "DE", "offerType": "GENERIC", + "messageType": "GENERIC", "offerTerm": "{total_payments}", "lander": "", "variables": { diff --git a/content/messages/DE/gpl_eqz-non-de.json b/content/messages/DE/gpl_eqz-non-de.json index 3e0d92a429..acbc2e3276 100644 --- a/content/messages/DE/gpl_eqz-non-de.json +++ b/content/messages/DE/gpl_eqz-non-de.json @@ -1,7 +1,8 @@ { "meta": { "offerCountry": "DE", - "offerType": "GPL:EQZ:NON-DE", + "offerType": "PAY_LATER_LONG_TERM", + "messageType": "PLLT_NQ_EZ_XB", "offerTerm": "{total_payments}", "lander": "", "variables": { diff --git a/content/messages/DE/gpl_eqz.json b/content/messages/DE/gpl_eqz.json index f68ff5e7b7..052987e52e 100644 --- a/content/messages/DE/gpl_eqz.json +++ b/content/messages/DE/gpl_eqz.json @@ -1,7 +1,8 @@ { "meta": { "offerCountry": "DE", - "offerType": "GPL:EQZ", + "offerType": "PAY_LATER_LONG_TERM", + "messageType": "PLLT_NQ_EZ", "offerTerm": "{total_payments}", "lander": "", "variables": { diff --git a/content/messages/DE/gpl_gtz-non-de.json b/content/messages/DE/gpl_gtz-non-de.json index b7757fc01a..0a090727a8 100644 --- a/content/messages/DE/gpl_gtz-non-de.json +++ b/content/messages/DE/gpl_gtz-non-de.json @@ -1,7 +1,8 @@ { "meta": { "offerCountry": "DE", - "offerType": "GPL:GTZ:NON-DE", + "offerType": "PAY_LATER_LONG_TERM", + "messageType": "PLLT_NQ_GZ_XB", "offerTerm": "{total_payments}", "lander": "", "variables": { diff --git a/content/messages/DE/gpl_gtz.json b/content/messages/DE/gpl_gtz.json index bacf06fc69..4286a09ba6 100644 --- a/content/messages/DE/gpl_gtz.json +++ b/content/messages/DE/gpl_gtz.json @@ -1,7 +1,8 @@ { "meta": { "offerCountry": "DE", - "offerType": "GPL:GTZ", + "offerType": "PAY_LATER_LONG_TERM", + "messageType": "PLLT_NQ_GZ", "offerTerm": "{total_payments}", "lander": "", "variables": { diff --git a/content/messages/DE/gplq_eqz-non-de.json b/content/messages/DE/gplq_eqz-non-de.json index a060fa27a4..3f04169e4f 100644 --- a/content/messages/DE/gplq_eqz-non-de.json +++ b/content/messages/DE/gplq_eqz-non-de.json @@ -1,7 +1,8 @@ { "meta": { "offerCountry": "DE", - "offerType": "GPLQ:EQZ:NON-DE", + "offerType": "PAY_LATER_LONG_TERM", + "messageType": "PLLT_MQ_EZ_XB", "offerTerm": "{total_payments}", "lander": "", "variables": { diff --git a/content/messages/DE/gplq_eqz.json b/content/messages/DE/gplq_eqz.json index 9946ea3afa..8ded3fd383 100644 --- a/content/messages/DE/gplq_eqz.json +++ b/content/messages/DE/gplq_eqz.json @@ -1,7 +1,8 @@ { "meta": { "offerCountry": "DE", - "offerType": "GPLQ:EQZ", + "offerType": "PAY_LATER_LONG_TERM", + "messageType": "PLLT_MQ_EZ", "offerTerm": "{total_payments}", "lander": "", "variables": { diff --git a/content/messages/DE/gplq_gtz-non-de.json b/content/messages/DE/gplq_gtz-non-de.json index 4d8b826c9b..3043cf69d3 100644 --- a/content/messages/DE/gplq_gtz-non-de.json +++ b/content/messages/DE/gplq_gtz-non-de.json @@ -1,7 +1,8 @@ { "meta": { "offerCountry": "DE", - "offerType": "GPLQ:GTZ:NON-DE", + "offerType": "PAY_LATER_LONG_TERM", + "messageType": "PLLT_MQ_GZ_XB", "offerTerm": "{total_payments}", "lander": "", "variables": { diff --git a/content/messages/DE/gplq_gtz.json b/content/messages/DE/gplq_gtz.json index 72ca4cc5c8..e9662971fe 100644 --- a/content/messages/DE/gplq_gtz.json +++ b/content/messages/DE/gplq_gtz.json @@ -1,7 +1,8 @@ { "meta": { "offerCountry": "DE", - "offerType": "GPLQ:GTZ", + "offerType": "PAY_LATER_LONG_TERM", + "messageType": "PLLT_MQ_GZ", "offerTerm": "{total_payments}", "lander": "", "variables": { diff --git a/content/messages/DE/pi30-non-de.json b/content/messages/DE/pi30-non-de.json index 59bc89461d..50e39f934b 100644 --- a/content/messages/DE/pi30-non-de.json +++ b/content/messages/DE/pi30-non-de.json @@ -1,7 +1,8 @@ { "meta": { "offerCountry": "DE", - "offerType": "PI30:NON-DE", + "offerType": "PAY_LATER_PAY_IN_1", + "messageType": "PLP1_NA_XB", "offerTerm": "{total_payments}", "lander": "", "variables": { diff --git a/content/messages/DE/pi30.json b/content/messages/DE/pi30.json index 2e807b69f4..9fd0c46052 100644 --- a/content/messages/DE/pi30.json +++ b/content/messages/DE/pi30.json @@ -1,7 +1,8 @@ { "meta": { "offerCountry": "DE", - "offerType": "PI30", + "offerType": "PAY_LATER_PAY_IN_1", + "messageType": "PLP1_NA", "offerTerm": "{total_payments}", "lander": "", "variables": { diff --git a/content/messages/DE/pi30nq-non-de.json b/content/messages/DE/pi30nq-non-de.json index cf87ade9ef..e557de8054 100644 --- a/content/messages/DE/pi30nq-non-de.json +++ b/content/messages/DE/pi30nq-non-de.json @@ -1,7 +1,8 @@ { "meta": { "offerCountry": "DE", - "offerType": "PI30NQ:NON-DE", + "offerType": "PAY_LATER_PAY_IN_1", + "messageType": "PLP1_NQ_XB", "offerTerm": "{total_payments}", "lander": "", "variables": { diff --git a/content/messages/DE/pi30nq.json b/content/messages/DE/pi30nq.json index 529ca4bff3..e4ccfeef04 100644 --- a/content/messages/DE/pi30nq.json +++ b/content/messages/DE/pi30nq.json @@ -1,7 +1,8 @@ { "meta": { "offerCountry": "DE", - "offerType": "PI30NQ", + "offerType": "PAY_LATER_PAY_IN_1", + "messageType": "PLP1_NQ", "offerTerm": "{total_payments}", "lander": "", "variables": { diff --git a/content/messages/DE/pi30q-non-de.json b/content/messages/DE/pi30q-non-de.json index f5abd7d22e..fc7c4aff4d 100644 --- a/content/messages/DE/pi30q-non-de.json +++ b/content/messages/DE/pi30q-non-de.json @@ -1,7 +1,8 @@ { "meta": { "offerCountry": "DE", - "offerType": "PI30Q:NON-DE", + "offerType": "PAY_LATER_PAY_IN_1", + "messageType": "PLP1_SQ_XB", "offerTerm": "{total_payments}", "lander": "", "variables": { diff --git a/content/messages/DE/pi30q.json b/content/messages/DE/pi30q.json index 61944df88b..f23cf4e42a 100644 --- a/content/messages/DE/pi30q.json +++ b/content/messages/DE/pi30q.json @@ -1,7 +1,8 @@ { "meta": { "offerCountry": "DE", - "offerType": "PI30Q", + "offerType": "PAY_LATER_PAY_IN_1", + "messageType": "PLP1_SQ", "offerTerm": "{total_payments}", "lander": "", "variables": { diff --git a/content/messages/ES/short_term_no_amount.json b/content/messages/ES/short_term_no_amount.json index 381cee7b7b..f77b86dd90 100644 --- a/content/messages/ES/short_term_no_amount.json +++ b/content/messages/ES/short_term_no_amount.json @@ -1,7 +1,8 @@ { "meta": { "offerCountry": "ES", - "offerType": "SHORT_TERM:NO_AMOUNT", + "offerType": "PAY_LATER_SHORT_TERM", + "messageType": "PLST_NA", "offerTerm": "{total_payments}", "lander": "", "variables": { diff --git a/content/messages/ES/short_term_nq.json b/content/messages/ES/short_term_nq.json index e8175a3f6a..c3ddc172fb 100644 --- a/content/messages/ES/short_term_nq.json +++ b/content/messages/ES/short_term_nq.json @@ -1,7 +1,8 @@ { "meta": { "offerCountry": "ES", - "offerType": "SHORT_TERM:NQ", + "offerType": "PAY_LATER_SHORT_TERM", + "messageType": "PLST_NQ", "offerTerm": "{total_payments}", "lander": "", "variables": { diff --git a/content/messages/ES/short_term_q.json b/content/messages/ES/short_term_q.json index 7b6e71c4e6..ef7e48aa2b 100644 --- a/content/messages/ES/short_term_q.json +++ b/content/messages/ES/short_term_q.json @@ -1,7 +1,8 @@ { "meta": { "offerCountry": "ES", - "offerType": "SHORT_TERM:Q", + "offerType": "PAY_LATER_SHORT_TERM", + "messageType": "PLST_SQ", "offerTerm": "{total_payments}", "lander": "", "variables": { diff --git a/content/messages/FR/gpl.json b/content/messages/FR/gpl.json index 2037f85452..9c4dbca6ba 100644 --- a/content/messages/FR/gpl.json +++ b/content/messages/FR/gpl.json @@ -2,7 +2,8 @@ "meta": { "id": "03cb950a-7a2c-4374-8814-dcf040b60233", "offerCountry": "FR", - "offerType": "GPL", + "offerType": "PAY_LATER_SHORT_TERM", + "messageType": "PLST_NQ", "offerTerm": "${CREDIT_OFFERS_DS.total_payments}", "lander": "", "variables": { diff --git a/content/messages/FR/gplq.json b/content/messages/FR/gplq.json index b9ef66b576..13dee43de9 100644 --- a/content/messages/FR/gplq.json +++ b/content/messages/FR/gplq.json @@ -2,7 +2,8 @@ "meta": { "id": "b197d597-b5ef-4fee-af47-59f6104dff13", "offerCountry": "FR", - "offerType": "GPLQ", + "offerType": "PAY_LATER_SHORT_TERM", + "messageType": "PLST_SQ", "offerTerm": "${CREDIT_OFFERS_DS.total_payments}", "lander": "", "variables": { diff --git a/content/messages/GB/pl.json b/content/messages/GB/pl.json index 2e7ccbfd81..4faf4b72fe 100644 --- a/content/messages/GB/pl.json +++ b/content/messages/GB/pl.json @@ -2,7 +2,8 @@ "meta": { "id": "67b97f85-2824-4403-b123-abbf50579b2d", "offerCountry": "GB", - "offerType": "PL", + "offerType": "PAY_LATER_SHORT_TERM", + "messageType": "PLST_NQ", "offerTerm": "{total_payments}", "lander": "", "variables": { diff --git a/content/messages/GB/plq.json b/content/messages/GB/plq.json index b359bff768..d3c7d2109e 100644 --- a/content/messages/GB/plq.json +++ b/content/messages/GB/plq.json @@ -2,7 +2,8 @@ "meta": { "id": "73ba853f-bd9a-49d4-ab3d-9cdc51721093", "offerCountry": "GB", - "offerType": "PLQ", + "offerType": "PAY_LATER_SHORT_TERM", + "messageType": "PLST_SQ", "offerTerm": "{total_payments}", "lander": "", "variables": { diff --git a/content/messages/IT/short_term_no_amount.json b/content/messages/IT/short_term_no_amount.json index 27e710656d..6da05c2065 100644 --- a/content/messages/IT/short_term_no_amount.json +++ b/content/messages/IT/short_term_no_amount.json @@ -1,7 +1,8 @@ { "meta": { "offerCountry": "IT", - "offerType": "SHORT_TERM:NO_AMOUNT", + "offerType": "PAY_LATER_SHORT_TERM", + "messageType": "PLST_NA", "offerTerm": "{total_payments}", "lander": "", "variables": { diff --git a/content/messages/IT/short_term_nq.json b/content/messages/IT/short_term_nq.json index b86da67c84..5b5c096f02 100644 --- a/content/messages/IT/short_term_nq.json +++ b/content/messages/IT/short_term_nq.json @@ -1,7 +1,8 @@ { "meta": { "offerCountry": "IT", - "offerType": "SHORT_TERM:NQ", + "offerType": "PAY_LATER_SHORT_TERM", + "messageType": "PLST_NQ", "offerTerm": "{total_payments}", "lander": "", "variables": { diff --git a/content/messages/IT/short_term_q.json b/content/messages/IT/short_term_q.json index a621add11b..8585815db4 100644 --- a/content/messages/IT/short_term_q.json +++ b/content/messages/IT/short_term_q.json @@ -1,7 +1,8 @@ { "meta": { "offerCountry": "IT", - "offerType": "SHORT_TERM:Q", + "offerType": "PAY_LATER_SHORT_TERM", + "messageType": "PLST_SQ", "offerTerm": "{total_payments}", "lander": "", "variables": { diff --git a/content/messages/US/buttons/generic_pay_later.json b/content/messages/US/buttons/generic_pay_later.json index 1e68f65547..ce4c21e9c8 100644 --- a/content/messages/US/buttons/generic_pay_later.json +++ b/content/messages/US/buttons/generic_pay_later.json @@ -5,7 +5,8 @@ }, "id": "", "offerCountry": "US", - "offerType": "GENERIC_PL", + "offerType": "GENERIC", + "messageType": "GENERIC_PL", "lander": "https://www.paypal.com/credit-presentment/lander/modal" }, "headline": [["Pay in full or Pay Later", ["default", "xsmall"]]], diff --git a/content/messages/US/buttons/generic_pay_later_bnpl.json b/content/messages/US/buttons/generic_pay_later_bnpl.json index 085f42f922..513ddaefc4 100644 --- a/content/messages/US/buttons/generic_pay_later_bnpl.json +++ b/content/messages/US/buttons/generic_pay_later_bnpl.json @@ -5,7 +5,8 @@ }, "id": "", "offerCountry": "US", - "offerType": "GENERIC_PL_BNPL", + "offerType": "GENERIC", + "messageType": "GENERIC", "lander": "https://www.paypal.com/credit-presentment/lander/modal" }, "headline": [ diff --git a/content/messages/US/buttons/generic_paypal.json b/content/messages/US/buttons/generic_paypal.json index e8fb1ec404..85d0de3572 100644 --- a/content/messages/US/buttons/generic_paypal.json +++ b/content/messages/US/buttons/generic_paypal.json @@ -5,7 +5,8 @@ }, "id": "", "offerCountry": "US", - "offerType": "GENERIC_PAYPAL", + "offerType": "GENERIC", + "messageType": "GENERIC_PAYPAL", "lander": "https://www.paypal.com/credit-presentment/lander/modal" }, "headline": [["A safer, easier way to pay", ["default", "xsmall"]]], diff --git a/content/messages/US/buttons/long_term_multi_eqz.json b/content/messages/US/buttons/long_term_multi_eqz.json index a4376481fc..41cca1340a 100644 --- a/content/messages/US/buttons/long_term_multi_eqz.json +++ b/content/messages/US/buttons/long_term_multi_eqz.json @@ -2,7 +2,8 @@ "meta": { "id": "", "offerCountry": "US", - "offerType": "LT_MQEZ", + "offerType": "PAY_LATER_LONG_TERM", + "messageType": "PLLT_MQ_EZ", "offerTerm": "${CREDIT_OFFERS_DS.total_payments}", "lander": "https://www.paypal.com/credit-presentment/lander/modal", "variables": { diff --git a/content/messages/US/buttons/long_term_multi_gtz.json b/content/messages/US/buttons/long_term_multi_gtz.json index 8129967444..990c669b74 100644 --- a/content/messages/US/buttons/long_term_multi_gtz.json +++ b/content/messages/US/buttons/long_term_multi_gtz.json @@ -2,7 +2,8 @@ "meta": { "id": "", "offerCountry": "US", - "offerType": "LT_MQGZ", + "offerType": "PAY_LATER_LONG_TERM", + "messageType": "PLLT_MQ_GZ", "offerTerm": "${CREDIT_OFFERS_DS.total_payments}", "lander": "https://www.paypal.com/credit-presentment/lander/modal", "variables": { diff --git a/content/messages/US/buttons/long_term_nq_eqz.json b/content/messages/US/buttons/long_term_nq_eqz.json index 42168266ba..fe25ff0f02 100644 --- a/content/messages/US/buttons/long_term_nq_eqz.json +++ b/content/messages/US/buttons/long_term_nq_eqz.json @@ -2,7 +2,8 @@ "meta": { "id": "", "offerCountry": "US", - "offerType": "LT_NQEZ", + "offerType": "PAY_LATER_LONG_TERM", + "messageType": "PLLT_NQ_EZ", "offerTerm": "{total_payments}", "lander": "https://www.paypal.com/credit-presentment/lander/modal", "variables": { diff --git a/content/messages/US/buttons/long_term_nq_gtz.json b/content/messages/US/buttons/long_term_nq_gtz.json index 336f500ad3..90689bd389 100644 --- a/content/messages/US/buttons/long_term_nq_gtz.json +++ b/content/messages/US/buttons/long_term_nq_gtz.json @@ -2,7 +2,8 @@ "meta": { "id": "d8dbfe8b-0bb8-44b1-ae07-6f32816fafe6", "offerCountry": "US", - "offerType": "LT_NQGZ", + "offerType": "PAY_LATER_LONG_TERM", + "messageType": "PLLT_NQ_GZ", "offerTerm": "${CREDIT_OFFERS_DS.total_payments}", "lander": "https://www.paypal.com/credit-presentment/lander/modal", "variables": { diff --git a/content/messages/US/buttons/long_term_single_eqz.json b/content/messages/US/buttons/long_term_single_eqz.json index 156f0ea15c..452adf6cf4 100644 --- a/content/messages/US/buttons/long_term_single_eqz.json +++ b/content/messages/US/buttons/long_term_single_eqz.json @@ -2,7 +2,8 @@ "meta": { "id": "", "offerCountry": "US", - "offerType": "LT_SQEZ", + "offerType": "PAY_LATER_LONG_TERM", + "messageType": "PLLT_SQ_EZ", "offerTerm": "{total_payments}", "lander": "https://www.paypal.com/credit-presentment/lander/modal", "variables": { diff --git a/content/messages/US/buttons/long_term_single_gtz.json b/content/messages/US/buttons/long_term_single_gtz.json index 65fe092b7d..3fca4eaf27 100644 --- a/content/messages/US/buttons/long_term_single_gtz.json +++ b/content/messages/US/buttons/long_term_single_gtz.json @@ -2,7 +2,8 @@ "meta": { "id": "", "offerCountry": "US", - "offerType": "LT_SQGZ", + "offerType": "PAY_LATER_LONG_TERM", + "messageType": "PLLT_SQ_GZ", "offerTerm": "{total_payments}", "lander": "https://www.paypal.com/credit-presentment/lander/modal", "variables": { diff --git a/content/messages/US/buttons/purchase_protection.json b/content/messages/US/buttons/purchase_protection.json index 405d704b99..c09fbf4218 100644 --- a/content/messages/US/buttons/purchase_protection.json +++ b/content/messages/US/buttons/purchase_protection.json @@ -6,6 +6,7 @@ "id": "", "offer_country_code": "US", "offerType": "PURCHASE_PROTECTION", + "messageType": "PURCHASE_PROTECTION", "lander": "https://www.paypal.com/us/digital-wallet/buyer-purchase-protection" }, "headline": [ diff --git a/content/messages/US/buttons/short_term_nq.json b/content/messages/US/buttons/short_term_nq.json index 8e54acea1a..145c3a715a 100644 --- a/content/messages/US/buttons/short_term_nq.json +++ b/content/messages/US/buttons/short_term_nq.json @@ -2,7 +2,8 @@ "meta": { "id": "d8dbfe8b-0bb8-44b1-ae07-6f32816fafe6", "offerCountry": "US", - "offerType": "ST_NQ", + "offerType": "PAY_LATER_SHORT_TERM", + "messageType": "PLST_NQ", "offerTerm": "${CREDIT_OFFERS_DS.total_payments}", "lander": "https://www.paypal.com/credit-presentment/lander/modal", "variables": { diff --git a/content/messages/US/buttons/short_term_q.json b/content/messages/US/buttons/short_term_q.json index eb0a06f322..ac4dbae7f0 100644 --- a/content/messages/US/buttons/short_term_q.json +++ b/content/messages/US/buttons/short_term_q.json @@ -2,7 +2,8 @@ "meta": { "id": "d8dbfe8b-0bb8-44b1-ae07-6f32816fafe6", "offerCountry": "US", - "offerType": "ST_SQ", + "offerType": "PAY_LATER_SHORT_TERM", + "messageType": "PLST_SQ", "offerTerm": "${CREDIT_OFFERS_DS.total_payments}", "lander": "https://www.paypal.com/credit-presentment/lander/modal", "variables": { diff --git a/content/messages/US/generic.json b/content/messages/US/generic.json index 101c30184c..4a312cb850 100644 --- a/content/messages/US/generic.json +++ b/content/messages/US/generic.json @@ -3,6 +3,7 @@ "id": "d8dbfe8b-0bb8-44b1-ae07-6f32816fafe6", "offerCountry": "US", "offerType": "GENERIC", + "messageType": "GENERIC", "offerTerm": "${CREDIT_OFFERS_DS.total_payments}", "lander": "https://www.paypal.com/ppclander", "variables": { diff --git a/content/messages/US/long_term_multi_eqz.json b/content/messages/US/long_term_multi_eqz.json index 4eef7ec6b4..442f64b793 100644 --- a/content/messages/US/long_term_multi_eqz.json +++ b/content/messages/US/long_term_multi_eqz.json @@ -2,7 +2,8 @@ "meta": { "id": "d8dbfe8b-0bb8-44b1-ae07-6f32816fafe6", "offerCountry": "US", - "offerType": "LT_MQEZ", + "offerType": "PAY_LATER_LONG_TERM", + "messageType": "PLLT_MQ_EZ", "offerTerm": "${CREDIT_OFFERS_DS.total_payments}", "lander": "https://www.paypal.com/ppclander", "variables": { diff --git a/content/messages/US/long_term_multi_gtz.json b/content/messages/US/long_term_multi_gtz.json index cd14338274..c0e7b9cc94 100644 --- a/content/messages/US/long_term_multi_gtz.json +++ b/content/messages/US/long_term_multi_gtz.json @@ -2,7 +2,8 @@ "meta": { "id": "d8dbfe8b-0bb8-44b1-ae07-6f32816fafe6", "offerCountry": "US", - "offerType": "LT_MQGZ", + "offerType": "PAY_LATER_LONG_TERM", + "messageType": "PLLT_MQ_GZ", "offerTerm": "${CREDIT_OFFERS_DS.total_payments}", "lander": "https://www.paypal.com/ppclander", "variables": { diff --git a/content/messages/US/long_term_nq_eqz.json b/content/messages/US/long_term_nq_eqz.json index 78e95bfbca..71d8ae242e 100644 --- a/content/messages/US/long_term_nq_eqz.json +++ b/content/messages/US/long_term_nq_eqz.json @@ -2,7 +2,8 @@ "meta": { "id": "d8dbfe8b-0bb8-44b1-ae07-6f32816fafe6", "offerCountry": "US", - "offerType": "LT_NQEZ", + "offerType": "PAY_LATER_LONG_TERM", + "messageType": "PLLT_NQ_EZ", "offerTerm": "${CREDIT_OFFERS_DS.total_payments}", "lander": "https://www.paypal.com/ppclander", "variables": { diff --git a/content/messages/US/long_term_nq_gtz.json b/content/messages/US/long_term_nq_gtz.json index 0a3a25953d..a092b27bb6 100644 --- a/content/messages/US/long_term_nq_gtz.json +++ b/content/messages/US/long_term_nq_gtz.json @@ -2,7 +2,8 @@ "meta": { "id": "d8dbfe8b-0bb8-44b1-ae07-6f32816fafe6", "offerCountry": "US", - "offerType": "LT_NQGZ", + "offerType": "PAY_LATER_LONG_TERM", + "messageType": "PLLT_NQ_GZ", "offerTerm": "${CREDIT_OFFERS_DS.total_payments}", "lander": "https://www.paypal.com/ppclander", "variables": { diff --git a/content/messages/US/long_term_single_eqz.json b/content/messages/US/long_term_single_eqz.json index 0949541c25..f52e642389 100644 --- a/content/messages/US/long_term_single_eqz.json +++ b/content/messages/US/long_term_single_eqz.json @@ -2,7 +2,8 @@ "meta": { "id": "d8dbfe8b-0bb8-44b1-ae07-6f32816fafe6", "offerCountry": "US", - "offerType": "LT_SQEZ", + "offerType": "PAY_LATER_LONG_TERM", + "messageType": "PLLT_SQ_EZ", "offerTerm": "${CREDIT_OFFERS_DS.total_payments}", "lander": "https://www.paypal.com/ppclander", "variables": { diff --git a/content/messages/US/long_term_single_gtz.json b/content/messages/US/long_term_single_gtz.json index 8915106857..b0a980d691 100644 --- a/content/messages/US/long_term_single_gtz.json +++ b/content/messages/US/long_term_single_gtz.json @@ -2,7 +2,8 @@ "meta": { "id": "d8dbfe8b-0bb8-44b1-ae07-6f32816fafe6", "offerCountry": "US", - "offerType": "LT_SQGZ", + "offerType": "PAY_LATER_LONG_TERM", + "messageType": "PLLT_SQ_GZ", "offerTerm": "${CREDIT_OFFERS_DS.total_payments}", "lander": "https://www.paypal.com/ppclander", "variables": { diff --git a/content/messages/US/marks/generic_pay_later.json b/content/messages/US/marks/generic_pay_later.json index 1e68f65547..ce4c21e9c8 100644 --- a/content/messages/US/marks/generic_pay_later.json +++ b/content/messages/US/marks/generic_pay_later.json @@ -5,7 +5,8 @@ }, "id": "", "offerCountry": "US", - "offerType": "GENERIC_PL", + "offerType": "GENERIC", + "messageType": "GENERIC_PL", "lander": "https://www.paypal.com/credit-presentment/lander/modal" }, "headline": [["Pay in full or Pay Later", ["default", "xsmall"]]], diff --git a/content/messages/US/marks/generic_pay_later_bnpl.json b/content/messages/US/marks/generic_pay_later_bnpl.json index ad728ff4b6..beb6cdc476 100644 --- a/content/messages/US/marks/generic_pay_later_bnpl.json +++ b/content/messages/US/marks/generic_pay_later_bnpl.json @@ -5,7 +5,8 @@ }, "id": "", "offerCountry": "US", - "offerType": "GENERIC_PL_BNPL", + "offerType": "GENERIC", + "messageType": "GENERIC", "lander": "https://www.paypal.com/credit-presentment/lander/modal" }, "headline": [["Buy now, pay later", ["default", "xsmall"]]], diff --git a/content/messages/US/marks/generic_paypal.json b/content/messages/US/marks/generic_paypal.json index e8fb1ec404..85d0de3572 100644 --- a/content/messages/US/marks/generic_paypal.json +++ b/content/messages/US/marks/generic_paypal.json @@ -5,7 +5,8 @@ }, "id": "", "offerCountry": "US", - "offerType": "GENERIC_PAYPAL", + "offerType": "GENERIC", + "messageType": "GENERIC_PAYPAL", "lander": "https://www.paypal.com/credit-presentment/lander/modal" }, "headline": [["A safer, easier way to pay", ["default", "xsmall"]]], diff --git a/content/messages/US/marks/long_term_multi_eqz.json b/content/messages/US/marks/long_term_multi_eqz.json index 27e5d1cfa5..30453e8b05 100644 --- a/content/messages/US/marks/long_term_multi_eqz.json +++ b/content/messages/US/marks/long_term_multi_eqz.json @@ -2,7 +2,8 @@ "meta": { "id": "", "offerCountry": "US", - "offerType": "LT_MQEZ", + "offerType": "PAY_LATER_LONG_TERM", + "messageType": "PLLT_MQ_EZ", "offerTerm": "${CREDIT_OFFERS_DS.total_payments}", "lander": "https://www.paypal.com/credit-presentment/lander/modal", "variables": { diff --git a/content/messages/US/marks/long_term_multi_gtz.json b/content/messages/US/marks/long_term_multi_gtz.json index 3d6d1d9e35..13c4df15fe 100644 --- a/content/messages/US/marks/long_term_multi_gtz.json +++ b/content/messages/US/marks/long_term_multi_gtz.json @@ -2,7 +2,8 @@ "meta": { "id": "", "offerCountry": "US", - "offerType": "LT_MQGZ", + "offerType": "PAY_LATER_LONG_TERM", + "messageType": "PLLT_MQ_GZ", "offerTerm": "${CREDIT_OFFERS_DS.total_payments}", "lander": "https://www.paypal.com/credit-presentment/lander/modal", "variables": { diff --git a/content/messages/US/marks/long_term_nq_eqz.json b/content/messages/US/marks/long_term_nq_eqz.json index c96e1130d5..b252c3421f 100644 --- a/content/messages/US/marks/long_term_nq_eqz.json +++ b/content/messages/US/marks/long_term_nq_eqz.json @@ -2,7 +2,8 @@ "meta": { "id": "", "offerCountry": "US", - "offerType": "LT_NQEZ", + "offerType": "PAY_LATER_LONG_TERM", + "messageType": "PLLT_NQ_EZ", "offerTerm": "{total_payments}", "lander": "https://www.paypal.com/credit-presentment/lander/modal", "variables": { diff --git a/content/messages/US/marks/long_term_nq_gtz.json b/content/messages/US/marks/long_term_nq_gtz.json index af22371dab..8266daedf1 100644 --- a/content/messages/US/marks/long_term_nq_gtz.json +++ b/content/messages/US/marks/long_term_nq_gtz.json @@ -2,7 +2,8 @@ "meta": { "id": "d8dbfe8b-0bb8-44b1-ae07-6f32816fafe6", "offerCountry": "US", - "offerType": "LT_NQGZ", + "offerType": "PAY_LATER_LONG_TERM", + "messageType": "PLLT_NQ_GZ", "offerTerm": "${CREDIT_OFFERS_DS.total_payments}", "lander": "https://www.paypal.com/credit-presentment/lander/modal", "variables": { diff --git a/content/messages/US/marks/long_term_single_eqz.json b/content/messages/US/marks/long_term_single_eqz.json index 04b23f2fb5..5a4d2bf3d6 100644 --- a/content/messages/US/marks/long_term_single_eqz.json +++ b/content/messages/US/marks/long_term_single_eqz.json @@ -2,7 +2,8 @@ "meta": { "id": "", "offerCountry": "US", - "offerType": "LT_SQEZ", + "offerType": "PAY_LATER_LONG_TERM", + "messageType": "PLLT_SQ_EZ", "offerTerm": "{total_payments}", "lander": "https://www.paypal.com/credit-presentment/lander/modal", "variables": { diff --git a/content/messages/US/marks/long_term_single_gtz.json b/content/messages/US/marks/long_term_single_gtz.json index 0deebeac06..8e9b7a5db8 100644 --- a/content/messages/US/marks/long_term_single_gtz.json +++ b/content/messages/US/marks/long_term_single_gtz.json @@ -2,7 +2,8 @@ "meta": { "id": "", "offerCountry": "US", - "offerType": "LT_SQGZ", + "offerType": "PAY_LATER_LONG_TERM", + "messageType": "PLLT_SQ_GZ", "offerTerm": "{total_payments}", "lander": "https://www.paypal.com/credit-presentment/lander/modal", "variables": { diff --git a/content/messages/US/marks/purchase_protection.json b/content/messages/US/marks/purchase_protection.json index 405d704b99..c09fbf4218 100644 --- a/content/messages/US/marks/purchase_protection.json +++ b/content/messages/US/marks/purchase_protection.json @@ -6,6 +6,7 @@ "id": "", "offer_country_code": "US", "offerType": "PURCHASE_PROTECTION", + "messageType": "PURCHASE_PROTECTION", "lander": "https://www.paypal.com/us/digital-wallet/buyer-purchase-protection" }, "headline": [ diff --git a/content/messages/US/marks/short_term_nq.json b/content/messages/US/marks/short_term_nq.json index 146d48c343..e5fc7f26c3 100644 --- a/content/messages/US/marks/short_term_nq.json +++ b/content/messages/US/marks/short_term_nq.json @@ -2,7 +2,8 @@ "meta": { "id": "d8dbfe8b-0bb8-44b1-ae07-6f32816fafe6", "offerCountry": "US", - "offerType": "ST_NQ", + "offerType": "PAY_LATER_SHORT_TERM", + "messageType": "PLST_NQ", "offerTerm": "${CREDIT_OFFERS_DS.total_payments}", "lander": "https://www.paypal.com/credit-presentment/lander/modal", "variables": { diff --git a/content/messages/US/marks/short_term_q.json b/content/messages/US/marks/short_term_q.json index 3bb3e47877..4812d79c5b 100644 --- a/content/messages/US/marks/short_term_q.json +++ b/content/messages/US/marks/short_term_q.json @@ -2,7 +2,8 @@ "meta": { "id": "d8dbfe8b-0bb8-44b1-ae07-6f32816fafe6", "offerCountry": "US", - "offerType": "ST_SQ", + "offerType": "PAY_LATER_SHORT_TERM", + "messageType": "PLST_SQ", "offerTerm": "${CREDIT_OFFERS_DS.total_payments}", "lander": "https://www.paypal.com/credit-presentment/lander/modal", "variables": { diff --git a/content/messages/US/ppc_ezp_multi_eqz.json b/content/messages/US/ppc_ezp_multi_eqz.json index b934bf676e..0169f8b825 100644 --- a/content/messages/US/ppc_ezp_multi_eqz.json +++ b/content/messages/US/ppc_ezp_multi_eqz.json @@ -2,7 +2,8 @@ "meta": { "id": "caff9852-6625-49d9-bd41-ffa0ab9dfcdd", "offerCountry": "US", - "offerType": "PALA:MULTI:EQZ", + "offerType": "PAYPAL_CREDIT_INSTALLMENTS", + "messageType": "PALA:MULTI:EQZ", "offerTerm": "${CREDIT_OFFERS_DS.total_payments}", "lander": "https://www.paypal.com/us/webapps/mpp/credit-pala-easy-payments", "variables": { diff --git a/content/messages/US/ppc_ezp_multi_gtz.json b/content/messages/US/ppc_ezp_multi_gtz.json index d0ad93f775..006df8b6c7 100644 --- a/content/messages/US/ppc_ezp_multi_gtz.json +++ b/content/messages/US/ppc_ezp_multi_gtz.json @@ -2,7 +2,8 @@ "meta": { "id": "e3bd0fd2-863c-4958-8350-73c62642abae", "offerCountry": "US", - "offerType": "PALA:MULTI:GTZ", + "offerType": "PAYPAL_CREDIT_INSTALLMENTS", + "messageType": "PALA:MULTI:GTZ", "offerTerm": "${CREDIT_OFFERS_DS.total_payments}", "lander": "https://www.paypal.com/us/webapps/mpp/credit-pala-easy-payments", "variables": { diff --git a/content/messages/US/ppc_ezp_nq_eqz.json b/content/messages/US/ppc_ezp_nq_eqz.json index 554473e44e..4b6a33d082 100644 --- a/content/messages/US/ppc_ezp_nq_eqz.json +++ b/content/messages/US/ppc_ezp_nq_eqz.json @@ -2,7 +2,8 @@ "meta": { "id": "0e26560f-7c8c-44e6-85fa-7f577aad8690", "offerCountry": "US", - "offerType": "EZP:ANY:EQZ", + "offerType": "PAYPAL_CREDIT_INSTALLMENTS", + "messageType": "EZP:ANY:EQZ", "offerTerm": "${CREDIT_OFFERS_DS.total_payments}", "lander": "https://www.paypal.com/us/webapps/mpp/credit-easy-payments", "variables": { diff --git a/content/messages/US/ppc_ezp_nq_gtz.json b/content/messages/US/ppc_ezp_nq_gtz.json index 04be55a379..0608d1b326 100644 --- a/content/messages/US/ppc_ezp_nq_gtz.json +++ b/content/messages/US/ppc_ezp_nq_gtz.json @@ -2,7 +2,8 @@ "meta": { "id": "ff8a728f-0fdb-4fda-9387-78e3a368e480", "offerCountry": "US", - "offerType": "EZP:ANY:GTZ", + "offerType": "PAYPAL_CREDIT_INSTALLMENTS", + "messageType": "EZP:ANY:GTZ", "offerTerm": "${CREDIT_OFFERS_DS.total_payments}", "lander": "https://www.paypal.com/us/webapps/mpp/credit-easy-payments", "variables": { diff --git a/content/messages/US/ppc_ezp_single_eqz.json b/content/messages/US/ppc_ezp_single_eqz.json index 7891deb379..ef8c642e2b 100644 --- a/content/messages/US/ppc_ezp_single_eqz.json +++ b/content/messages/US/ppc_ezp_single_eqz.json @@ -2,7 +2,8 @@ "meta": { "id": "cc5f94fd-40a0-441a-b457-838e015c0404", "offerCountry": "US", - "offerType": "PALA:SINGLE:EQZ", + "offerType": "PAYPAL_CREDIT_INSTALLMENTS", + "messageType": "PALA:SINGLE:EQZ", "offerTerm": "${CREDIT_OFFERS_DS.total_payments}", "lander": "https://www.paypal.com/us/webapps/mpp/credit-pala-easy-payments", "variables": { diff --git a/content/messages/US/ppc_ezp_single_gtz.json b/content/messages/US/ppc_ezp_single_gtz.json index 53ea1ec7e2..55557cf16b 100644 --- a/content/messages/US/ppc_ezp_single_gtz.json +++ b/content/messages/US/ppc_ezp_single_gtz.json @@ -2,7 +2,8 @@ "meta": { "id": "15acf131-047d-4cf1-8afb-2de189fafa63", "offerCountry": "US", - "offerType": "PALA:SINGLE:GTZ", + "offerType": "PAYPAL_CREDIT_INSTALLMENTS", + "messageType": "PALA:MULTI:GTZ", "offerTerm": "${CREDIT_OFFERS_DS.total_payments}", "lander": "https://www.paypal.com/us/webapps/mpp/credit-pala-easy-payments", "variables": { diff --git a/content/messages/US/ppc_ni_nq.json b/content/messages/US/ppc_ni_nq.json index b2cb064075..5179da1d87 100644 --- a/content/messages/US/ppc_ni_nq.json +++ b/content/messages/US/ppc_ni_nq.json @@ -2,7 +2,8 @@ "meta": { "id": "d8dbfe8b-0bb8-44b1-ae07-6f32816fafe6", "offerCountry": "US", - "offerType": "NI", + "offerType": "PAYPAL_CREDIT_NO_INTEREST", + "messageType": "PPCNI_NQ", "offerTerm": "${CREDIT_OFFERS_DS.total_payments}", "lander": "https://www.paypal.com/ppclander", "variables": { diff --git a/content/messages/US/ppc_ni_nq_xb.json b/content/messages/US/ppc_ni_nq_xb.json index 54adcc1089..2c40abd309 100644 --- a/content/messages/US/ppc_ni_nq_xb.json +++ b/content/messages/US/ppc_ni_nq_xb.json @@ -2,7 +2,8 @@ "meta": { "id": "dd819621-1aa5-44b4-94a4-3b1b38b3e0a3", "offerCountry": "US", - "offerType": "NI:NON-US", + "offerType": "PAYPAL_CREDIT_NO_INTEREST", + "messageType": "PPCNI_NQ_XB", "offerTerm": "${CREDIT_OFFERS_DS.total_payments}", "lander": "https://www.paypal.com/ppclander", "variables": { diff --git a/content/messages/US/ppc_ni_q.json b/content/messages/US/ppc_ni_q.json index d6c729e12b..629e38a65a 100644 --- a/content/messages/US/ppc_ni_q.json +++ b/content/messages/US/ppc_ni_q.json @@ -2,7 +2,8 @@ "meta": { "id": "798319df-d18a-450c-bb70-3d628000ee80", "offerCountry": "US", - "offerType": "NIQ", + "offerType": "PAYPAL_CREDIT_NO_INTEREST", + "messageType": "PPCNI_SQ", "offerTerm": "${CREDIT_OFFERS_DS.total_payments}", "lander": "https://www.paypal.com/ppclander", "variables": { diff --git a/content/messages/US/ppc_ni_q_xb.json b/content/messages/US/ppc_ni_q_xb.json index c62e925d39..0ca1da6e7f 100644 --- a/content/messages/US/ppc_ni_q_xb.json +++ b/content/messages/US/ppc_ni_q_xb.json @@ -2,7 +2,8 @@ "meta": { "id": "b75dc1bf-9f50-4cfe-8e24-4b0fff983117", "offerCountry": "US", - "offerType": "NIQ:NON-US", + "offerType": "PAYPAL_CREDIT_NO_INTEREST", + "messageType": "PPCNI_SQ_XB", "offerTerm": "${CREDIT_OFFERS_DS.total_payments}", "lander": "https://www.paypal.com/ppclander", "variables": { diff --git a/content/messages/US/short_term_nq.json b/content/messages/US/short_term_nq.json index dce57a336d..1e024ad4a6 100644 --- a/content/messages/US/short_term_nq.json +++ b/content/messages/US/short_term_nq.json @@ -2,7 +2,8 @@ "meta": { "id": "dd36a466-2b98-4504-820c-958cbb6bd2c9", "offerCountry": "US", - "offerType": "GPLNQ", + "offerType": "PAY_LATER_SHORT_TERM", + "messageType": "PLST_NQ", "offerTerm": "${CREDIT_OFFERS_DS.total_payments}", "lander": "", "variables": { diff --git a/content/messages/US/short_term_q.json b/content/messages/US/short_term_q.json index 752049b74f..0d55c31be0 100644 --- a/content/messages/US/short_term_q.json +++ b/content/messages/US/short_term_q.json @@ -2,7 +2,8 @@ "meta": { "id": "46358059-fe5b-46fc-b13a-77afcfe1005d", "offerCountry": "US", - "offerType": "GPLQ", + "offerType": "PAY_LATER_SHORT_TERM", + "messageType": "PLST_SQ", "offerTerm": "${CREDIT_OFFERS_DS.total_payments}", "lander": "", "variables": { diff --git a/content/modals/GB/short_term.json b/content/modals/GB/short_term.json index 9a7afd95d9..3317558730 100644 --- a/content/modals/GB/short_term.json +++ b/content/modals/GB/short_term.json @@ -39,7 +39,7 @@ "Complete your purchase with the first payment today.", "Remaining payments are taken automatically." ], - "disclosure": "Pay in 3 is an unregulated credit agreement, so you will have fewer protections under this agreement than you would under a regulated credit agreement. Carefully consider whether the purchase is affordable and how you will make the repayments. Be aware of the possible impact of using Pay in 3 and of missing payments, including making other borrowing more difficult or more expensive. Pay in 3 eligibility is subject to status and approval. 18+ UK residents only. Available for purchases of {formattedMinAmount} to {formattedMaxAmount}. Terms and conditions apply. PayPal Pay in 3 is a trading name of PayPal UK Ltd, Whittaker House, Whittaker Avenue, Richmond-Upon-Thames, Surrey, United Kingdom, TW9 1EH.", + "disclosure": "Pay in 3 is an unregulated credit agreement, so you will have fewer protections under this agreement than you would under a regulated credit agreement. Carefully consider whether the purchase is affordable and how you will make the repayments. Be aware of the possible impact of using Pay in 3 and of missing payments, including making other borrowing more difficult or more expensive. Pay in 3 eligibility is subject to status and approval. 18+ UK residents only. Available for purchases of {formattedMinAmount} to {formattedMaxAmount}. Terms and conditions apply. PayPal Pay in 3 is a trading name of PayPal UK Ltd, 5 Fleet Place, London, United Kingdom, EC4M 7RD.", "learnMoreLink": [["Learn more about Pay in 3", ["https://www.paypal.com/uk/webapps/mpp/paypal-payin3/faq"]]] } } diff --git a/content/modals/GB/short_term_xo.json b/content/modals/GB/short_term_xo.json index 3c2afa1765..6096b66304 100644 --- a/content/modals/GB/short_term_xo.json +++ b/content/modals/GB/short_term_xo.json @@ -50,7 +50,7 @@ "buttonTextIneligible": "Back to Checkout", "link": "https://www.paypal.com/link/to/short-term-application" }, - "disclosure": "Pay in 3 is an unregulated credit agreement, so you will have fewer protections under this agreement than you would under a regulated credit agreement. Carefully consider whether the purchase is affordable and how you will make the repayments. Be aware of the possible impact of using Pay in 3 and of missing payments, including making other borrowing more difficult or more expensive. Pay in 3 eligibility is subject to status and approval. 18+ UK residents only. Available for purchases of {formattedMinAmount} to {formattedMaxAmount}. Terms and conditions apply. PayPal Pay in 3 is a trading name of PayPal UK Ltd, Whittaker House, Whittaker Avenue, Richmond-Upon-Thames, Surrey, United Kingdom, TW9 1EH.", + "disclosure": "Pay in 3 is an unregulated credit agreement, so you will have fewer protections under this agreement than you would under a regulated credit agreement. Carefully consider whether the purchase is affordable and how you will make the repayments. Be aware of the possible impact of using Pay in 3 and of missing payments, including making other borrowing more difficult or more expensive. Pay in 3 eligibility is subject to status and approval. 18+ UK residents only. Available for purchases of {formattedMinAmount} to {formattedMaxAmount}. Terms and conditions apply. PayPal Pay in 3 is a trading name of PayPal UK Ltd, 5 Fleet Place, London, United Kingdom, EC4M 7RD.", "learnMoreLink": [["Learn more about Pay in 3", ["https://www.paypal.com/uk/webapps/mpp/paypal-payin3/faq"]]] } } diff --git a/demo/accessibility/colorsdk.html b/demo/accessibility/colorsdk.html new file mode 100644 index 0000000000..b9cd06c60b --- /dev/null +++ b/demo/accessibility/colorsdk.html @@ -0,0 +1,98 @@ + + + + Messaging.js Dev Sandbox + + + + + + + +
+ + + + + diff --git a/demo/accessibility/flexsdk.html b/demo/accessibility/flexsdk.html new file mode 100644 index 0000000000..7aea169dfe --- /dev/null +++ b/demo/accessibility/flexsdk.html @@ -0,0 +1,125 @@ + + + + Messaging.js Dev Sandbox + + + + + + + + +
+ + + + diff --git a/docs/message-offer-types.md b/docs/message-types.md similarity index 52% rename from docs/message-offer-types.md rename to docs/message-types.md index fbedd577ed..af0f38c99e 100644 --- a/docs/message-offer-types.md +++ b/docs/message-types.md @@ -6,23 +6,23 @@ The following are abbreviations used in reference to various messages and files. ### **US (United States)** -| OfferType | PStudio Name | File Name | Message | +| messageType | PStudio Name | File Name | Message | | --------------- | -------------------------------- | -------------------------- | ------------------------------------------------------------------------------- | | GENERIC | Generic Message | generic | Pay Later - No Amount Message | -| GPLQ | Short Term - Q | short_term_q | Pay Later - Pay in 4, Qualifying Purchase | -| GPLNQ | Short Term - NQ | short_term_nq | Pay Later - Pay in 4, Non-Qualifying Purchase | -| LT_MQEZ | Long Term - MQEZ | long_term_multi_eqz | Pay Later - Pay Monthly, Multiple Qualifying Offers = 0% APR | -| LT_MQGZ | Long Term - MQGZ | long_term_multi_gtz | Pay Later - Pay Monthly, Multiple Qualifying Offers >0% APR | -| LT_SQEZ | Long Term - SQEZ | long_term_single_eqz | Pay Later - Pay Monthly, Single Qualifying Offer = 0% APR | -| LT_SQGZ | Long Term - SQGZ | long_term_single_gtz | Pay Later - Pay Monthly, Single Qualifying Offer >0% APR | -| LT_NQEZ | Long Term - NQEZ | long_term_nq_eqz | Pay Later - Pay Monthly, Non-Qualifying Offers = 0% APR | -| LT_NQGZ | Long Term - NQGZ | long_term_nq_gtz | Pay Later - Pay Monthly, Non-Qualifying Offers >0% APR | -| LT_MQEZ_RB | **TBD** - _Not currently in use_ | long_term_multi_eqz_mixed | Pay Later - Pay Monthly, Multiple Qualifying Offers with risk-based pricing | -| LT_SQEZ_RB | **TBD** - _Not currently in use_ | long_term_single_eqz_mixed | Pay Later - Pay Monthly, Single Qualifying Offers with risk-based pricing | -| NI | NI | ppc_ni_nq | PPC - No Interest, Non-Qualifying Purchase | -| NIQ | NIQ | ppc_nq_q | PPC - No Interest, Qualifying Purchase | -| NI:NON-US | NI NON-US | ppc_ni_nq_xb | No Interest, Non-US, Non-Qualifying Purchase | -| NIQ:NON-US | NIQ NON-US | ppc_ni_q_xb | No Interest, Non-US, Qualifying Purchase | +| PLST_SQ | Short Term - Q | short_term_q | Pay Later - Pay in 4, Qualifying Purchase | +| PLST_NQ | Short Term - NQ | short_term_nq | Pay Later - Pay in 4, Non-Qualifying Purchase | +| PLLT_MQ_EZ | Long Term - MQEZ | long_term_multi_eqz | Pay Later - Pay Monthly, Multiple Qualifying Offers = 0% APR | +| PLLT_MQ_GZ | Long Term - MQGZ | long_term_multi_gtz | Pay Later - Pay Monthly, Multiple Qualifying Offers >0% APR | +| PLLT_SQ_EZ | Long Term - SQEZ | long_term_single_eqz | Pay Later - Pay Monthly, Single Qualifying Offer = 0% APR | +| PLLT_SQ_GZ | Long Term - SQGZ | long_term_single_gtz | Pay Later - Pay Monthly, Single Qualifying Offer >0% APR | +| PLLT_NQ_EZ | Long Term - NQEZ | long_term_nq_eqz | Pay Later - Pay Monthly, Non-Qualifying Offers = 0% APR | +| PLLT_NQ_GZ | Long Term - NQGZ | long_term_nq_gtz | Pay Later - Pay Monthly, Non-Qualifying Offers >0% APR | +| PLLT_MQ_EZ_RB | **TBD** - _Not currently in use_ | long_term_multi_eqz_mixed | Pay Later - Pay Monthly, Multiple Qualifying Offers with risk-based pricing | +| PLLT_SQ_EZ_RB | **TBD** - _Not currently in use_ | long_term_single_eqz_mixed | Pay Later - Pay Monthly, Single Qualifying Offers with risk-based pricing | +| PPCNI_NQ | NI | ppc_ni_nq | PPC - No Interest, Non-Qualifying Purchase | +| PPCNI_SQ | NIQ | ppc_nq_q | PPC - No Interest, Qualifying Purchase | +| PPCNI_NQ_XB | NI NON-US | ppc_ni_nq_xb | No Interest, Non-US, Non-Qualifying Purchase | +| PPCNI_SQ_XB | NIQ NON-US | ppc_ni_q_xb | No Interest, Non-US, Qualifying Purchase | | EZP:ANY:EQZ | Easy Payments - AEZ | ppc_ezp_nq_eqz | PPC - Easy Payments, Non-Qualifying with APR equal to zero | | EZP:ANY:GTZ | Easy Payments - AGZ | ppc_ezp_nq_gqz | PPC - Easy Payments, Non-Qualifying with APR greater than zero | | PALA:SINGLE:EQZ | Easy Payments - SEZP | ppc_ezp_single_eqz | PayPal Credit - Easy Payments (Pay As Low As), with APR equal to zero | @@ -32,70 +32,70 @@ The following are abbreviations used in reference to various messages and files. **Note:** -- "Non-US" means Non-US Merchants with a majority US customer base. +- "\_XB" means Non-US Merchants with a majority US customer base. ### **DE (Germany)** -| OfferType | PStudio Name | File Name | Message | -| --------------- | --------------------------------- | --------------- | -------------------------------------------------------------------------------------------- | -| GPLQ:EQZ:NON-DE | DE Long Term - Q EQZ NON-DE | gplq_eqz-non-de | Pay Later - Ratenzahlung, Non-DE, Qualifying Purchase, 0% APR | -| GPLQ:GTZ:NON-DE | DE Long Term - Q GTZ NON-DE | gplq_gtz-non-de | Pay Later - Ratenzahlung, Non-DE, Qualifying Purchase, >0% APR | -| GPLQ:EQZ | DE Long Term - Q EQZ | gplq_eqz | Pay Later - Ratenzahlung, Qualifying Purchase, 0% APR | -| GPLQ:GTZ | DE Long Term - Q GTZ | gplq_gtz | Pay Later - Ratenzahlung, Non-Qualifying Offers, >0% APR | -| PI30Q:NON-DE | DE Pay In 1 - Q NON-DE | pi30q-non-de | Pay Later - Pay in 1, Non-DE, Qualifying Purchase | -| PI30Q | DE Pay In 1 - Q | pi30q | Pay Later - Pay in 1, Qualifying Purchase | -| GENERIC:NON-DE | DE Generic Message - NON-DE | generic-non-de | Pay Later - Non-DE, No Amount Message | -| GENERIC | DE Generic Message | generic | Pay Later - No Amount Message | -| PI30NQ:NON-DE | DE Pay In 1 - NQ NON-DE | pi30nq-non-de | Pay Later - Pay in 1, Non-DE, Non-Qualifying Purchase | -| PI30NQ | DE Pay In 1 - NQ | pi30nq | Pay Later - Pay in 1, Non-Qualifying Purchase | -| GPL:EQZ:NON-DE | DE Long Term - NQ EQZ NON-DE | gpl_eqz-non-de | Pay Later - Ratenzahlung, Non-DE, Non-Qualifying Purchase, 0% APR | -| GPL:GTZ:NON-DE | DE Long Term - NQ GTZ NON-DE | gpl_gtz-non-de | Pay Later - Ratenzahlung, Non-DE, Non-Qualifying Purchase, >0% APR | -| GPL:EQZ | DE Long Term - NQ EQZ | gpl_eqz | Pay Later - Ratenzahlung, Non-Qualifying Purchase, 0% APR | -| GPL:GTZ | DE Long Term - NQ GTZ | gpl_gtz | Pay Later - Ratenzahlung, Non-Qualifying Purchase, >0% APR | -| PI30:NON-DE | DE Pay In 1 - NQ NON-DE Threshold | pi30-non-de | Pay Later - Pay in 1, Non-DE, Non-Qualifying Purchase, when DE Ratenzahlung is not available | -| PI30 | DE Pay In 1 - NQ Threshold | pi30 | Pay Later - Pay in 1, Non-Qualifying Purchase, when DE Ratenzahlung is not available | +| messageType | PStudio Name | File Name | Message | +| ------------- | --------------------------------- | --------------- | -------------------------------------------------------------------------------------------- | +| PLLT_MQ_EZ_XB | DE Long Term - Q EQZ NON-DE | gplq_eqz-non-de | Pay Later - Ratenzahlung, Non-DE, Qualifying Purchase, 0% APR | +| PLLT_MQ_GZ_XB | DE Long Term - Q GTZ NON-DE | gplq_gtz-non-de | Pay Later - Ratenzahlung, Non-DE, Qualifying Purchase, >0% APR | +| PLLT_MQ_EZ | DE Long Term - Q EQZ | gplq_eqz | Pay Later - Ratenzahlung, Qualifying Purchase, 0% APR | +| PLLT_MQ_GZ | DE Long Term - Q GTZ | gplq_gtz | Pay Later - Ratenzahlung, Non-Qualifying Offers, >0% APR | +| PLP1_SQ_XB | DE Pay In 1 - Q NON-DE | pi30q-non-de | Pay Later - Pay in 1, Non-DE, Qualifying Purchase | +| PIP1_SQ | DE Pay In 1 - Q | pi30q | Pay Later - Pay in 1, Qualifying Purchase | +| GENERIC_XB | DE Generic Message - NON-DE | generic-non-de | Pay Later - Non-DE, No Amount Message | +| GENERIC | DE Generic Message | generic | Pay Later - No Amount Message | +| PLP1_NQ_XB | DE Pay In 1 - NQ NON-DE | pi30nq-non-de | Pay Later - Pay in 1, Non-DE, Non-Qualifying Purchase | +| PLP1_NQ | DE Pay In 1 - NQ | pi30nq | Pay Later - Pay in 1, Non-Qualifying Purchase | +| PLLT_NQ_EZ_XB | DE Long Term - NQ EQZ NON-DE | gpl_eqz-non-de | Pay Later - Ratenzahlung, Non-DE, Non-Qualifying Purchase, 0% APR | +| PLLT_NQ_GZ_XB | DE Long Term - NQ GTZ NON-DE | gpl_gtz-non-de | Pay Later - Ratenzahlung, Non-DE, Non-Qualifying Purchase, >0% APR | +| PLLT_NQ_EZ | DE Long Term - NQ EQZ | gpl_eqz | Pay Later - Ratenzahlung, Non-Qualifying Purchase, 0% APR | +| PLLT_NQ_EZ | DE Long Term - NQ GTZ | gpl_gtz | Pay Later - Ratenzahlung, Non-Qualifying Purchase, >0% APR | +| PLP1_NQ_XB | DE Pay In 1 - NQ NON-DE Threshold | pi30-non-de | Pay Later - Pay in 1, Non-DE, Non-Qualifying Purchase, when DE Ratenzahlung is not available | +| PLP1_NQ | DE Pay In 1 - NQ Threshold | pi30 | Pay Later - Pay in 1, Non-Qualifying Purchase, when DE Ratenzahlung is not available | **Note:** - Ratenzahlung in DE is the long term installments product. -- "Non-DE" means Non-DE Merchants with a majority DE customer base. +- "\_XB" means Non-DE Merchants with a majority DE customer base. ### **GB (or UK)** -| OfferType | PStudio Name | File Name | Message | -| --------- | ------------------ | --------- | --------------------------------------------- | -| PL | GB Short Term - NQ | pl | Pay Later - Pay in 3, Non-Qualifying Purchase | -| PLQ | GB Short Term - Q | plq | Pay Later - Pay in 3, Qualifying Purchase | +| messageType | PStudio Name | File Name | Message | +| ----------- | ------------------ | --------- | --------------------------------------------- | +| PLST_NQ | GB Short Term - NQ | pl | Pay Later - Pay in 3, Non-Qualifying Purchase | +| PLST_SQ | GB Short Term - Q | plq | Pay Later - Pay in 3, Qualifying Purchase | ### **FR (France)** -| OfferType | PStudio Name | File Name | Message | -| --------- | ------------------ | --------- | --------------------------------------------- | -| GPL | FR Short Term - NQ | gpl | Pay Later - Pay in 4, Non-Qualifying Purchase | -| GPLQ | FR Short Term - Q | gplq | Pay Later - Pay in 4, Qualifying Purchase | +| messageType | PStudio Name | File Name | Message | +| ----------- | ------------------ | --------- | --------------------------------------------- | +| PLST_NQ | FR Short Term - NQ | gpl | Pay Later - Pay in 4, Non-Qualifying Purchase | +| PLST_SQ | FR Short Term - Q | gplq | Pay Later - Pay in 4, Qualifying Purchase | ### **AU (Australia)** -| OfferType | PStudio Name | File Name | Message | -| --------- | ------------------ | --------- | --------------------------------------------- | -| GPL | AU Short Term - NQ | gpl | Pay Later - Pay in 4, Non-Qualifying Purchase | -| GPLQ | AU Short Term - Q | gplq | Pay Later - Pay in 4, Qualifying Purchase | +| messageType | PStudio Name | File Name | Message | +| ----------- | ------------------ | --------- | --------------------------------------------- | +| PLST_NQ | AU Short Term - NQ | gpl | Pay Later - Pay in 4, Non-Qualifying Purchase | +| PLST_SQ | AU Short Term - Q | gplq | Pay Later - Pay in 4, Qualifying Purchase | ### **IT (Italy)** -| OfferType | PStudio Name | File Name | Message | -| -------------------- | ------------------ | -------------------- | -------------------------------------------- | -| SHORT_TERM:NO_AMOUNT | IT Short Term - NA | short_term_no_amount | Pay Later, Pay in 3, No Amount | -| SHORT_TERM:Q | IT Short Term - Q | short_term_q | Pay Later, Pay in 3, Qualifying Purchase | -| SHORT_TERM:NQ | IT Short Term - NQ | short_term_nq | Pay Later, Pay in 3, Non-Qualifying Purchase | +| messageType | PStudio Name | File Name | Message | +| ----------- | ------------------ | -------------------- | -------------------------------------------- | +| PLST_NA | IT Short Term - NA | short_term_no_amount | Pay Later, Pay in 3, No Amount | +| PLST_SQ | IT Short Term - Q | short_term_q | Pay Later, Pay in 3, Qualifying Purchase | +| PLST_NQ | IT Short Term - NQ | short_term_nq | Pay Later, Pay in 3, Non-Qualifying Purchase | ### **ES (Spain)** -| OfferType | PStudio Name | File Name | Message | -| -------------------- | ------------------ | -------------------- | -------------------------------------------- | -| SHORT_TERM:NO_AMOUNT | ES Short Term - NA | short_term_no_amount | Pay Later, Pay in 3, No Amount | -| SHORT_TERM:Q | ES Short Term - Q | short_term_q | Pay Later, Pay in 3, Qualifying Purchase | -| SHORT_TERM:NQ | ES Short Term - NQ | short_term_nq | Pay Later, Pay in 3, Non-Qualifying Purchase | +| messageType | PStudio Name | File Name | Message | +| ----------- | ------------------ | -------------------- | -------------------------------------------- | +| PLST_NA | ES Short Term - NA | short_term_no_amount | Pay Later, Pay in 3, No Amount | +| PLST_SQ | ES Short Term - Q | short_term_q | Pay Later, Pay in 3, Qualifying Purchase | +| PLST_NQ | ES Short Term - NQ | short_term_nq | Pay Later, Pay in 3, Non-Qualifying Purchase | ## Modals diff --git a/package.json b/package.json index b7649adf9d..db0f143a31 100644 --- a/package.json +++ b/package.json @@ -41,6 +41,7 @@ "test:func:snapshots:ciupdate": "jest --verbose --config tests/functional/v2/jest.snapshotTests.config.js --updateSnapshot" }, "dependencies": { + "@axe-core/playwright": "^4.9.1", "@krakenjs/beaver-logger": "^5.0.0", "@krakenjs/belter": "^2.0.0", "@krakenjs/jsx-pragmatic": "^3.0.0", @@ -60,6 +61,7 @@ "@krakenjs/babel-config-grumbler": "^8.1.1", "@krakenjs/eslint-config-grumbler": "^8.1.1", "@krakenjs/webpack-config-grumbler": "^8.1.1", + "@playwright/test": "^1.46.0", "@semantic-release/changelog": "^6.0.1", "@semantic-release/exec": "^6.0.3", "@semantic-release/git": "^10.0.1", @@ -69,6 +71,7 @@ "@testing-library/jest-dom": "^4.1.0", "@testing-library/preact": "^2.0.0", "@testing-library/preact-hooks": "^1.0.6", + "@types/node": "^22.1.0", "babel-jest": "^27.5.1", "babel-plugin-module-resolver": "^4.1.0", "conventional-changelog-conventionalcommits": "^4.6.0", diff --git a/playwright.config.js b/playwright.config.js new file mode 100644 index 0000000000..0382c7fe17 --- /dev/null +++ b/playwright.config.js @@ -0,0 +1,60 @@ +// @ts-check +const { defineConfig, devices } = require('@playwright/test'); + +/** + * Read environment variables from file. + * https://github.com/motdotla/dotenv + */ +// require('dotenv').config({ path: path.resolve(__dirname, '.env') }); + +/** + * @see https://playwright.dev/docs/test-configuration + */ +module.exports = defineConfig({ + testDir: './tests/playwright/tests', + /* Fail the build on CI if you accidentally left test.only in the source code. */ + forbidOnly: !!process.env.CI, + /* Retry on CI only */ + retries: process.env.CI ? 2 : 0, + workers: 80, + /* Reporter to use. See https://playwright.dev/docs/test-reporters */ + reporter: 'html', + timeout: 5 * 60000, + /* Configure projects for major browsers */ + projects: [ + { + name: 'chromium', + use: { + ...devices['Desktop Chrome'] + } + }, + /* Test against mobile viewports. */ + { + name: 'Mobile Chrome', + use: { + ...devices['Pixel 5'] + } + }, + { + name: 'Google Chrome', + use: { + ...devices['Desktop Chrome'], + channel: 'chrome' + } + } + ], + webServer: [ + { + command: './.github/scripts/runServerV2.sh', + timeout: 120 * 1000, + reuseExistingServer: !process.env.CI + } + ], + use: { + baseURL: 'https://localhost.paypal.com:8080', + ignoreHTTPSErrors: true, + trace: 'on-first-retry', + bypassCSP: true, + headless: !!process.env.CI || undefined + } +}); diff --git a/src/components/modal/v2/parts/Calculator.jsx b/src/components/modal/v2/parts/Calculator.jsx index 5e1d35a6fe..e41aa53ed6 100644 --- a/src/components/modal/v2/parts/Calculator.jsx +++ b/src/components/modal/v2/parts/Calculator.jsx @@ -201,7 +201,7 @@ const Calculator = ({ } ${useNewCheckoutDesign === 'true' ? 'checkout' : ''}`} onSubmit={submit} > -

{!hasInitialAmount ? genericTitle || title : title}

+

{!hasInitialAmount ? genericTitle || title : title}