Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Flex-Test Accessibility Automation & Run Tests Only In chrome (DTCRCMERC-3553) #1143

Closed
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
10 changes: 5 additions & 5 deletions .github/workflows/snapshotCommit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,21 @@ jobs:
repository: ${{ github.event.workflow_run.head_repository.full_name }}

- name: Download Artifacts
uses: actions/github-script@v3.1.0
uses: actions/github-script@v7
with:
script: |
const fs = require('fs');
const { execSync } = require('child_process');

const artifacts = await github.actions.listWorkflowRunArtifacts({
const artifacts = await github.rest.actions.listWorkflowRunArtifacts({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: context.payload.workflow_run.id
});

await Promise.all(
artifacts.data.artifacts.map(async (artifact) => {
const download = await github.actions.downloadArtifact({
const download = await github.rest.actions.downloadArtifact({
owner: context.repo.owner,
repo: context.repo.repo,
artifact_id: artifact.id,
Expand Down Expand Up @@ -66,7 +66,7 @@ jobs:

- name: Reset Label
if: github.event.workflow_run.event == 'pull_request'
uses: actions/github-script@v3.1.0
uses: actions/github-script@v7
with:
# The workflow_run that comes along with the event drops the PR number for some reason
# so we have to pass the PR number from the original workflow as an artifact
Expand All @@ -75,7 +75,7 @@ jobs:

const pullNumber = Number(fs.readFileSync('./pull_number.txt', 'utf8')).toString();

await github.issues.removeLabel({
await github.rest.issues.removeLabel({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: pullNumber,
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/snapshotCompare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ jobs:
run: |
npm run test:func -- --testPathPattern "${{ matrix.testPathPattern }}"

- name: Collect Diffs and Upload to Imgur
run: |
./scripts/snapshot-tests/collect-diffs.sh
# - name: Collect Diffs and Upload to Imgur
# run: |
# ./scripts/snapshot-tests/collect-diffs.sh

compareSnapshotsV2:
name: Compare V2
Expand Down Expand Up @@ -101,6 +101,6 @@ jobs:
run: |
CONFIG_PATH=${{ matrix.testConfig }} npm run test:func:snapshots

- name: Collect Diffs and Upload to Imgur
run: |
./scripts/snapshot-tests/collect-diffs-v2.sh
# - name: Collect Diffs and Upload to Imgur
# run: |
# ./scripts/snapshot-tests/collect-diffs-v2.sh
2 changes: 1 addition & 1 deletion content/messages/US/ppc_ni_nq.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"headline": [
["Buy now. Pay over time.", ["default", "xsmall", "small"]],
[
["No Interest if paid in full in 6 months", ["on purchases of $99+.", "weak"]],
["No Interest if paid in full in 6 months", ["on purchases of {formattedMinAmount}+.", "weak"]],
["medium", "large", "xlarge"]
]
],
Expand Down
2 changes: 1 addition & 1 deletion content/messages/US/ppc_ni_nq_xb.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"headline": [
["Buy now. Pay over time.", ["default", "xsmall", "small"]],
[
["No Interest if paid in full in 6 months", ["on purchases of $99+", "weak"]],
["No Interest if paid in full in 6 months", ["on purchases of {formattedMinAmount}+", "weak"]],
["medium", "large", "xlarge"]
]
],
Expand Down
2 changes: 1 addition & 1 deletion content/messages/US/ppc_ni_q.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"headline": [
["Buy now. Pay over time.", ["default", "xsmall", "small"]],
[
["No Interest if paid in full in 6 months", ["on purchases of $99+.", "weak"]],
["No Interest if paid in full in 6 months", ["on purchases of {formattedMinAmount}+.", "weak"]],
["medium", "large", "xlarge"]
]
],
Expand Down
2 changes: 1 addition & 1 deletion content/messages/US/ppc_ni_q_xb.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"headline": [
["Buy now. Pay over time.", ["default", "xsmall", "small"]],
[
["No Interest if paid in full in 6 months", ["on purchases of $99+", "weak"]],
["No Interest if paid in full in 6 months", ["on purchases of {formattedMinAmount}+", "weak"]],
["medium", "large", "xlarge"]
]
],
Expand Down
6 changes: 3 additions & 3 deletions content/modals/US/legacy_ppc_ni.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
"title": "Buy now and pay over time with PayPal Credit",
"subtitle": "Subject to credit approval.",
"terms": {
"title": "No Interest if paid in full in 6 months on purchases of $99 or more",
"title": "No Interest if paid in full in 6 months on purchases of $149 or more",
"items": [
"Interest will be charged to your account from the purchase date if the balance is not paid in full within 6 months.",
"A minimum monthly payment is required and may or may not pay off the promotional purchase by the end of the 6 month period.",
"No interest will be charged on the purchase if you pay it off in full within 6 months. If you do not, interest will be charged on the purchase from the purchase date at the Purchase APR applicable to your account.",
"For New Accounts: Variable Purchase APR is {aprEntry.apr}%. The APR is accurate as of {aprEntry.formattedDate} and will vary with the market based on the Prime Rate (as defined in your credit card agreement). Minimum interest charge is $2.00.",
"Individual items that are less than $99 qualify for special financing when combined for a total of $99 or more in a single transaction.",
"Multiple separate transactions of less than $99 per transaction cannot be combined to meet the minimum purchase amount."
"Individual items that are less than $149 qualify for special financing when combined for a total of $149 or more in a single transaction.",
"Multiple separate transactions of less than $149 per transaction cannot be combined to meet the minimum purchase amount."
]
},
"instructions": {
Expand Down
55 changes: 55 additions & 0 deletions content/modals/US/long_term_df.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"meta": {
"product": "PAY_LATER_LONG_TERM",
"offerCountry": "US",
"useV5Design": "true",
"variables": {
"transaction_amount": "${eval(transaction_amount ? transaction_amount : '-')}",
"qualifying_offer": "${eval(CREDIT_OFFERS_DS.qualifying_offer ? CREDIT_OFFERS_DS.qualifying_offer : 'false')}",
"financing_code": "${CREDIT_OFFERS_DS.financing_code}",
"formattedPeriodicPayment": "${CREDIT_OFFERS_DS.formattedPeriodicPayment}",
"total_payments": "${CREDIT_OFFERS_DS.total_payments}",
"formattedMinAmount": "${CREDIT_OFFERS_DS.formattedMinAmount}",
"formattedMaxAmount": "${CREDIT_OFFERS_DS.formattedMaxAmount}",
"formattedTotalCost": "${CREDIT_OFFERS_DS.formattedTotalCost}",
"minAmount": "${CREDIT_OFFERS_DS.minAmount}",
"maxAmount": "${CREDIT_OFFERS_DS.maxAmount}",
"apr": "${CREDIT_OFFERS_DS.apr}",
"nominal_rate": "${CREDIT_OFFERS_DS.nominal_rate}"
}
},
"content": {
"headline": "Switch to Pay Monthly",
"subheadline": "Pay in installments, starting 1 month from today",
"calculator": {
"title": "Examples for your purchase",
"genericTitle": "How much is your purchase?",
"inputLabel": "Purchase amount",
"inputPlaceholder": "Enter amount",
"genericError": "Something went wrong. Please try again later."
},
"genericDisclaimer": "Terms vary based on purchase amount and your credit.",
"instructions": {
"instructionsHeadline": "How to switch",
"instructionsSubHeadline": [
"Apply for Pay Monthly. Switching is available for purchases of {formattedMinAmount} to {formattedMaxAmount}.",
"Choose a Pay Monthly plan. First payment due in 1 month with $0 due today.",
"Get money back in your PayPal balance and keep any rewards from your original purchase."
],
"instructionsIcons": {
"monogram-logo-icon": "<svg role=\"img\" aria-label=\"PayPal Monogram Logo\" width=\"24\" height=\"24\" viewBox=\"0 0 19 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"> <title>PayPal Monogram Logo</title> <path d=\"M17.636 6.76937C17.1326 6.12244 16.4843 5.60285 15.7432 5.2525C15.6796 3.90459 15.0994 2.63293 14.1231 1.70144C13.1467 0.769959 11.8492 0.250186 10.4998 0.25H4.87477C4.54028 0.250051 4.2154 0.361903 3.95177 0.567779C3.68814 0.773655 3.50089 1.06174 3.41977 1.38625L0.044773 14.8862C-0.0104995 15.1074 -0.0146531 15.3382 0.0326276 15.5612C0.0799083 15.7841 0.17738 15.9934 0.317639 16.173C0.457898 16.3527 0.637256 16.498 0.84209 16.598C1.04692 16.698 1.27185 16.75 1.49977 16.75H4.0779L3.79665 17.8862C3.74141 18.1072 3.73723 18.3379 3.7844 18.5607C3.83158 18.7835 3.92889 18.9927 4.06894 19.1723C4.20899 19.3519 4.3881 19.4973 4.5927 19.5974C4.7973 19.6975 5.022 19.7497 5.24977 19.75H8.2029C8.53707 19.7495 8.86152 19.6375 9.12476 19.4316C9.38801 19.2258 9.57499 18.9379 9.65602 18.6138L10.4998 15.25H13.4998C14.4834 15.25 15.4472 14.9736 16.2814 14.4524C17.1155 13.9313 17.7865 13.1863 18.2179 12.3023C18.6492 11.4183 18.8235 10.4309 18.721 9.45269C18.6184 8.47445 18.2432 7.54469 17.6379 6.76937H17.636ZM1.49977 15.25L4.87477 1.75H10.4998C11.3724 1.74975 12.2177 2.05381 12.8902 2.60979C13.5627 3.16577 14.0203 3.93887 14.1841 4.79594C13.9572 4.76598 13.7286 4.75064 13.4998 4.75H8.24977C7.91512 4.74984 7.59002 4.8616 7.3262 5.06749C7.06238 5.27338 6.87499 5.56159 6.79384 5.88625L4.45477 15.25H1.49977ZM14.156 6.30813C14.1485 6.34188 14.142 6.37562 14.1335 6.40937C13.9318 7.2205 13.4644 7.94081 12.8059 8.45559C12.1474 8.97037 11.3356 9.25002 10.4998 9.25H7.49977L8.24977 6.25H13.4998C13.7198 6.25012 13.9394 6.26957 14.156 6.30813ZM17.1335 10.9094C16.9318 11.7205 16.4644 12.4408 15.8059 12.9556C15.1474 13.4704 14.3356 13.75 13.4998 13.75H10.4998C10.1653 13.7501 9.8404 13.8619 9.57677 14.0678C9.31314 14.2737 9.12589 14.5617 9.04477 14.8862L8.20102 18.25H5.24977L7.12477 10.75H10.4998C11.653 10.7503 12.7741 10.3703 13.6894 9.66874C14.6046 8.9672 15.2629 7.98336 15.5623 6.86969C15.9009 7.09406 16.201 7.37171 16.451 7.69187C16.8038 8.13999 17.049 8.66314 17.1676 9.22098C17.2863 9.77882 17.2753 10.3565 17.1354 10.9094H17.1335Z\" fill=\"#003087\"/></svg>",
"pay-later-icon": "<svg role=\"img\" aria-label=\"Pay Later Icon\" width=\"24\" height=\"24\" viewBox=\"0 0 20 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"> <title>Pay Later Icon</title> <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M10.75 0.27963C10.5013 0.260211 10.2512 0.250265 10 0.25C8.07164 0.25 6.18657 0.821828 4.58319 1.89317C2.97982 2.96452 1.73013 4.48726 0.992179 6.26884C0.254225 8.05042 0.061142 10.0108 0.437348 11.9021C0.813554 13.7934 1.74215 15.5307 3.10571 16.8943C4.46927 18.2579 6.20656 19.1865 8.09787 19.5627C9.98919 19.9389 11.9496 19.7458 13.7312 19.0078C15.5127 18.2699 17.0355 17.0202 18.1068 15.4168C19.1782 13.8134 19.75 11.9284 19.75 10C19.7497 9.74531 19.7395 9.49166 19.7196 9.23957H18.2143C18.2147 9.24304 18.215 9.24652 18.2153 9.25H15.9513C15.7829 7.92936 15.1808 6.70201 14.2394 5.76062C13.298 4.81923 12.0706 4.2171 10.75 4.04875L10.75 0.27963ZM14.5 10C14.5 12.4853 12.4853 14.5 10 14.5C7.51472 14.5 5.5 12.4853 5.5 10C5.5 7.51472 7.51472 5.5 10 5.5C12.4853 5.5 14.5 7.51472 14.5 10ZM9.25 4.04875V1.78469C7.3301 1.96244 5.53283 2.80606 4.16945 4.16944C2.80606 5.53282 1.96244 7.3301 1.78469 9.25H4.04875C4.2171 7.92936 4.81923 6.70201 5.76062 5.76062C6.70201 4.81923 7.92936 4.2171 9.25 4.04875ZM4.04875 10.75H1.78469C1.96244 12.6699 2.80606 14.4672 4.16945 15.8306C5.53283 17.1939 7.3301 18.0376 9.25 18.2153V15.9513C7.92936 15.7829 6.70201 15.1808 5.76062 14.2394C4.81923 13.298 4.2171 12.0706 4.04875 10.75ZM10.75 15.9513V18.2153C12.6699 18.0376 14.4672 17.1939 15.8306 15.8306C17.1939 14.4672 18.0376 12.6699 18.2153 10.75H15.9513C15.7829 12.0706 15.1808 13.298 14.2394 14.2394C13.298 15.1808 12.0706 15.7829 10.75 15.9513Z\" fill=\"#003087\"/></svg>",
"refund-icon": "<svg role=\"img\" aria-label=\"Refund Icon\" width=\"24\" height=\"24\" viewBox=\"0 0 24 22\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"> <title>Refund Icon</title> <path d=\"M8.30668 4.03682C8.34442 4.12787 8.39974 4.21058 8.46948 4.28024C8.53913 4.34997 8.62185 4.40529 8.7129 4.44303C8.80394 4.48078 8.90154 4.5002 9.0001 4.5002C9.09866 4.5002 9.19626 4.48078 9.28731 4.44303C9.37835 4.40529 9.46107 4.34997 9.53073 4.28024L11.2501 2.55993V6.24162C11.25 6.24575 11.25 6.24988 11.25 6.25403C11.25 6.66615 11.5841 7.00024 11.9962 7.00024H16.0721C16.4843 7.00024 16.8184 6.66615 16.8184 6.25403C16.8184 5.8419 16.4843 5.50781 16.0721 5.50781H12.7501V2.55993L14.4695 4.28024C14.5392 4.34992 14.6219 4.4052 14.7129 4.44291C14.804 4.48062 14.9016 4.50003 15.0001 4.50003C15.0986 4.50003 15.1962 4.48062 15.2873 4.44291C15.3783 4.4052 15.461 4.34992 15.5307 4.28024C15.6004 4.21056 15.6557 4.12783 15.6934 4.03679C15.7311 3.94574 15.7505 3.84816 15.7505 3.74961C15.7505 3.65107 15.7311 3.55349 15.6934 3.46244C15.6557 3.3714 15.6004 3.28867 15.5307 3.21899L12.5307 0.218988C12.4611 0.149256 12.3784 0.0939368 12.2873 0.0561936C12.1963 0.0184504 12.0987 -0.000976562 12.0001 -0.000976562C11.9015 -0.000976562 11.8039 0.0184504 11.7129 0.0561936C11.6218 0.0939368 11.5391 0.149256 11.4695 0.218988L8.46948 3.21899C8.39974 3.28864 8.34442 3.37136 8.30668 3.46241C8.26894 3.55346 8.24951 3.65105 8.24951 3.74961C8.24951 3.84818 8.26894 3.94577 8.30668 4.03682Z\" fill=\"#003087\"/> <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M9.91661 11.9401C10.5333 11.528 11.2583 11.3081 12 11.3081C12.9946 11.3081 13.9484 11.7032 14.6517 12.4065C15.3549 13.1097 15.75 14.0635 15.75 15.0581C15.75 15.7998 15.5301 16.5248 15.118 17.1415C14.706 17.7582 14.1203 18.2388 13.4351 18.5227C12.7498 18.8065 11.9958 18.8807 11.2684 18.736C10.541 18.5914 9.8728 18.2342 9.34835 17.7098C8.8239 17.1853 8.46675 16.5171 8.32205 15.7897C8.17736 15.0623 8.25162 14.3083 8.53545 13.623C8.81928 12.9378 9.29993 12.3521 9.91661 11.9401ZM10.75 16.9289C11.12 17.1761 11.555 17.3081 12 17.3081C12.5967 17.3081 13.169 17.0711 13.591 16.6491C14.0129 16.2271 14.25 15.6548 14.25 15.0581C14.25 14.6131 14.118 14.1781 13.8708 13.8081C13.6236 13.4381 13.2722 13.1497 12.861 12.9794C12.4499 12.8091 11.9975 12.7645 11.561 12.8513C11.1246 12.9382 10.7237 13.1524 10.409 13.4671C10.0943 13.7818 9.88005 14.1827 9.79323 14.6192C9.70642 15.0556 9.75097 15.508 9.92127 15.9191C10.0916 16.3303 10.38 16.6817 10.75 16.9289Z\" fill=\"#003087\"/> <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M22.5 8.30811H1.5C1.30109 8.30811 1.11032 8.38712 0.96967 8.52778C0.829018 8.66843 0.75 8.85919 0.75 9.05811V21.0581C0.75 21.257 0.829018 21.4478 0.96967 21.5884C1.11032 21.7291 1.30109 21.8081 1.5 21.8081H22.5C22.6989 21.8081 22.8897 21.7291 23.0303 21.5884C23.171 21.4478 23.25 21.257 23.25 21.0581V9.05811C23.25 8.85919 23.171 8.66843 23.0303 8.52778C22.8897 8.38712 22.6989 8.30811 22.5 8.30811ZM18.1547 20.3081H5.84531C5.5935 19.4565 5.13263 18.6814 4.50467 18.0534C3.87671 17.4255 3.10162 16.9646 2.25 16.7128V13.4034C3.10162 13.1516 3.87671 12.6907 4.50467 12.0628C5.13263 11.4348 5.5935 10.6597 5.84531 9.80811H18.1547C18.4065 10.6597 18.8674 11.4348 19.4953 12.0628C20.1233 12.6907 20.8984 13.1516 21.75 13.4034V16.7128C20.8984 16.9646 20.1233 17.4255 19.4953 18.0534C18.8674 18.6814 18.4065 19.4565 18.1547 20.3081ZM21.75 11.8115C20.8504 11.4247 20.1334 10.7077 19.7466 9.80811H21.75V11.8115ZM4.25344 9.80811C3.86662 10.7077 3.14959 11.4247 2.25 11.8115V9.80811H4.25344ZM2.25 18.3047C3.14959 18.6915 3.86662 19.4085 4.25344 20.3081H2.25V18.3047ZM19.7466 20.3081C20.1334 19.4085 20.8504 18.6915 21.75 18.3047V20.3081H19.7466Z\" fill=\"#003087\"/></svg>"
}
},
"disclosure": [
"Pay Monthly is subject to consumer credit approval. Eligible purchases are available to switch within 30 days after the completed transaction. Payments may change based on shipping, taxes, updates to your purchase, or missed payments. Availability depends on the merchant and purchase type and may not be available for subscriptions or recurring payments. Pay Monthly is currently not available to residents of <span aria-hidden='true'>AK, CT, HI, NC, or NV</span><span class='sr-only'>Alaska, Connecticut, Hawaii, North Carolina, or Nevada</span>. You must be 18 years old or older to apply. Missed payments may have an impact on your credit score. The lender for Pay Monthly is WebBank. PayPal, Inc. (NMLS #910457): <span aria-hidden='true'>RI</span><span class='sr-only'>Rhode Island</span> Loan Broker Licensee. <span aria-hidden='true'>VT</span><span class='sr-only'>Vermont</span> Loan Solicitation Licensee. <span aria-hidden='true'>VT</span><span class='sr-only'>Vermont</span> residents:",
[
"Find more disclosures ",
"https://www.paypal.com/us/digital-wallet/ways-to-pay/buy-now-pay-later",
"Find more disclosures, opens new tab"
],
"by going to PayPal’s page on Pay Later."
]
}
}
6 changes: 3 additions & 3 deletions content/modals/US/v2_ppc_ni.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@
"instructions": [
"Apply now and get a decision in seconds.",
"Check out with PayPal and choose <strong>PayPal Credit</strong>.",
"No Interest if paid in full in 6 months on purchases of $99+"
"No Interest if paid in full in 6 months on purchases of {formattedMinAmount}+"
],
"terms": [
"Interest will be charged to your account from the purchase date if the balance is not paid in full within 6 months.",
"A minimum monthly payment is required and may or may not pay off the promotional purchase by the end of the 6 month period.",
"No interest will be charged on the purchase if you pay it off in full within 6 months. If you do not, interest will be charged on the purchase from the purchase date at the Purchase APR applicable to your account.",
"For New Accounts: Variable Purchase APR is {aprEntry.apr}%. The APR is accurate as of {aprEntry.formattedDate} and will vary with the market based on the Prime Rate (as defined in your credit card agreement). Minimum interest charge is $2.00.",
"Individual items that are less than $99 qualify for special financing when combined for a total of $99 or more in a single transaction.",
"Multiple separate transactions of less than $99 per transaction cannot be combined to meet the minimum purchase amount."
"Individual items that are less than {formattedMinAmount} qualify for special financing when combined for a total of {formattedMinAmount} or more in a single transaction.",
"Multiple separate transactions of less than {formattedMinAmount} per transaction cannot be combined to meet the minimum purchase amount."
],
"buttonText": "Apply Now",
"disclaimer": "Subject to credit approval",
Expand Down
2 changes: 1 addition & 1 deletion content/modals/US/v2_product_list.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"credit": [
{
"header": "PayPal Credit",
"body": "No Interest if paid in full in 6 months for purchases of $99+.",
"body": "No Interest if paid in full in 6 months for purchases of $149+.",
"viewName": "PAYPAL_CREDIT_NO_INTEREST"
}
]
Expand Down
Loading