Skip to content

Commit

Permalink
Merge release/9.0.0 into trunk
Browse files Browse the repository at this point in the history
  • Loading branch information
mgascam committed Feb 26, 2025
2 parents 04e4611 + 0c03941 commit 6e67306
Show file tree
Hide file tree
Showing 298 changed files with 26,618 additions and 35,583 deletions.
3 changes: 1 addition & 2 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@
"wcpaySettings": true,
"page": true,
"browser": true,
"context": true,
"jestPuppeteer": true
"context": true
},
"settings": {
"react": {
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/e2e-pw/run-log-tests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ runs:
id: first_run_e2e_pw_tests
# Use +e to trap errors when running E2E tests.
shell: /bin/bash +e {0}
run: npm run test:e2e-pw-ci
run: npm run test:e2e-ci
- uses: actions/upload-artifact@v4
if: always()
with:
Expand Down
4 changes: 4 additions & 0 deletions .github/actions/e2e/atomic-prepare-and-run/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,9 @@ runs:
run: |
mkdir screenshots
- name: Install Playwright
shell: bash
run: npx playwright install chromium

- name: "Run tests, upload screenshots & logs"
uses: ./.github/actions/e2e/run-log-tests
16 changes: 7 additions & 9 deletions .github/actions/e2e/run-log-tests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,18 @@ runs:
# Use +e to trap errors when running E2E tests.
shell: /bin/bash +e {0}
run: |
npm run test:e2e -- --json --outputFile="$E2E_RESULT_FILEPATH" --NODE_ENV="$NODE_ENV"
npm run test:e2e-ci
if [[ -f "$E2E_RESULT_FILEPATH" ]]; then
E2E_NUM_FAILED_TEST_SUITES=$(cat "$E2E_RESULT_FILEPATH" | jq '.numFailedTestSuites')
E2E_NUM_FAILED_TEST_SUITES=$(cat "$E2E_RESULT_FILEPATH" | jq '.stats["unexpected"]')
echo "FIRST_RUN_FAILED_TEST_SUITES=$(echo $E2E_NUM_FAILED_TEST_SUITES)" >> $GITHUB_OUTPUT
if [[ ${E2E_NUM_FAILED_TEST_SUITES} -gt 0 ]]; then
echo "::notice::${E2E_NUM_FAILED_TEST_SUITES} test suite(s) failed in the first run but we will try (it) them again in the second run."
exit 0
fi
else
echo "FIRST_RUN_FAILED_TEST_SUITES=0" >> $GITHUB_OUTPUT
echo "::notice::${E2E_RESULT_FILEPATH} doesn't exist so results are unclear and we will not try again."
exit 1
exit 0
fi
# Retry failed E2E tests
Expand All @@ -30,18 +29,17 @@ runs:
shell: bash
# Filter failed E2E files from the result JSON file, and re-run them.
run: |
cat "$E2E_RESULT_FILEPATH" | jq '.testResults[] | select(.status == "failed") | .name' | xargs npm run test:e2e -- --NODE_ENV="$NODE_ENV"
npm run test:e2e-ci $(cat $E2E_RESULT_FILEPATH | jq -r '[.suites[] | (if has("suites") then .suites[] | .specs[] else .specs[] end) | select(.tests[].status == "unexpected") | .file] | unique | .[]')
# Archive screenshots if any
- name: Archive e2e test screenshots & logs
if: ${{ failure() }}
if: ${{ always() }}
uses: actions/upload-artifact@v4
with:
name: wp(${{ env.E2E_WP_VERSION }})-wc(${{ env.E2E_WC_VERSION }})-${{ env.E2E_GROUP }}-${{ env.E2E_BRANCH }}
path: |
screenshots
tests/e2e/screenshots
tests/e2e/docker/wordpress/wp-content/debug.log
playwright-report/
tests/e2e/test-results
${{ env.E2E_RESULT_FILEPATH }}
if-no-files-found: ignore
retention-days: 14
11 changes: 7 additions & 4 deletions .github/workflows/e2e-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ name: E2E Tests - Pull Request
on:
pull_request:
branches:
# - develop
# - trunk
- dev/10240-update-npm-scripts # [TODO] Remove this line after the branch is merged.
- develop
- trunk
workflow_dispatch:
workflow_call:
inputs:
Expand All @@ -28,7 +27,7 @@ env:
E2E_BLOG_TOKEN: ${{ secrets.E2E_BLOG_TOKEN }}
E2E_USER_TOKEN: ${{ secrets.E2E_USER_TOKEN }}
WC_E2E_SCREENSHOTS: 1
E2E_SLACK_CHANNEL: ${{ secrets.E2E_SLACK_CHANNEL }}
E2E_SLACK_CHANNEL_ID: ${{ secrets.E2E_SLACK_CHANNEL_ID }}
E2E_SLACK_TOKEN: ${{ secrets.E2E_SLACK_TOKEN }}
E2E_USE_LOCAL_SERVER: false
E2E_RESULT_FILEPATH: 'tests/e2e/results.json'
Expand Down Expand Up @@ -75,5 +74,9 @@ jobs:
- name: Setup E2E environment
uses: ./.github/actions/e2e/env-setup

- name: Install Playwright
shell: bash
run: npx playwright install chromium

- name: Run tests, upload screenshots & logs
uses: ./.github/actions/e2e/run-log-tests
4 changes: 2 additions & 2 deletions .github/workflows/e2e-pw-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ env:
E2E_BLOG_TOKEN: ${{ secrets.E2E_BLOG_TOKEN }}
E2E_USER_TOKEN: ${{ secrets.E2E_USER_TOKEN }}
WC_E2E_SCREENSHOTS: 1
E2E_SLACK_CHANNEL: ${{ secrets.E2E_SLACK_CHANNEL }}
E2E_SLACK_CHANNEL_ID: ${{ secrets.E2E_SLACK_CHANNEL_ID }}
E2E_SLACK_TOKEN: ${{ secrets.E2E_SLACK_TOKEN }}
E2E_USE_LOCAL_SERVER: false
E2E_RESULT_FILEPATH: 'tests/e2e/results.json'
Expand Down Expand Up @@ -71,4 +71,4 @@ jobs:
run: npx playwright install chromium

- name: Run tests, upload screenshots & logs
uses: ./.github/actions/e2e-pw/run-log-tests
uses: ./.github/actions/e2e/run-log-tests
10 changes: 9 additions & 1 deletion .github/workflows/e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ env:
E2E_BLOG_TOKEN: ${{ secrets.E2E_BLOG_TOKEN }}
E2E_USER_TOKEN: ${{ secrets.E2E_USER_TOKEN }}
WC_E2E_SCREENSHOTS: 1
E2E_SLACK_CHANNEL: ${{ secrets.E2E_SLACK_CHANNEL }}
E2E_SLACK_CHANNEL_ID: ${{ secrets.E2E_SLACK_CHANNEL_ID }}
E2E_SLACK_TOKEN: ${{ secrets.E2E_SLACK_TOKEN }}
E2E_USE_LOCAL_SERVER: false
E2E_RESULT_FILEPATH: 'tests/e2e/results.json'
Expand Down Expand Up @@ -64,6 +64,10 @@ jobs:
- name: Setup E2E environment
uses: ./.github/actions/e2e/env-setup

- name: Install Playwright
shell: bash
run: npx playwright install chromium

- name: Run tests, upload screenshots & logs
uses: ./.github/actions/e2e/run-log-tests

Expand Down Expand Up @@ -116,5 +120,9 @@ jobs:
- name: Setup E2E environment
uses: ./.github/actions/e2e/env-setup

- name: Install Playwright
shell: bash
run: npx playwright install chromium

- name: Run tests, upload screenshots & logs
uses: ./.github/actions/e2e/run-log-tests
2 changes: 1 addition & 1 deletion .github/workflows/e2e-tests-atomic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:

env:
WC_E2E_SCREENSHOTS: 1
E2E_SLACK_CHANNEL: ${{ secrets.E2E_SLACK_CHANNEL }}
E2E_SLACK_CHANNEL_ID: ${{ secrets.E2E_SLACK_CHANNEL_ID }}
E2E_SLACK_TOKEN: ${{ secrets.E2E_SLACK_TOKEN }}
E2E_WP_VERSION: 'nightly'
E2E_WC_VERSION: 'latest'
Expand Down
13 changes: 6 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -85,16 +85,15 @@ local.env
# Screenshots created locally when running e2e tests
tests/e2e/screenshots

# E2E Performance test results
# E2E test results
tests/e2e/reports

# E2E Playwright
/playwright-report/
/blob-report/
tests/e2e-pw/.auth/
tests/e2e-pw/test-results/
tests/e2e-pw/playwright/.cache/
tests/e2e-pw/tests/e2e-pw/.auth/*
tests/e2e/.auth/
tests/e2e/test-results/
tests/e2e/playwright/.cache/
tests/e2e/tests/e2e/.auth/*

# Slate docs
docs/rest-api/build/*

Expand Down
9 changes: 0 additions & 9 deletions .puppeteerrc.cjs

This file was deleted.

12 changes: 12 additions & 0 deletions assets/css/admin.css
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@
background-image: url( '../images/cards/visa.svg' );
}

.payment-method__brand--alipay {
background-image: url( '../images/payment-methods/alipay-logo.svg' );
}

.payment-method__brand--cartes_bancaires {
background-image: url( '../images/cards/cartes_bancaires.svg' );
}
Expand Down Expand Up @@ -135,6 +139,14 @@
background-image: url( '../images/payment-methods/klarna.svg' );
}

.payment-method__brand--grabpay {
background-image: url( '../images/payment-methods/grabpay.svg' );
}

.payment-method__brand--wechat_pay {
background-image: url( '../images/payment-methods/wechat-pay.svg' );
}

.wc_gateways tr[data-gateway_id='woocommerce_payments'] .payment-method__icon {
border: 1px solid #ddd;
border-radius: 2px;
Expand Down
42 changes: 42 additions & 0 deletions assets/images/payment-method-icons/grabpay.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions assets/images/payment-method-icons/wechat-pay.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/images/payment-methods/alipay-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
42 changes: 42 additions & 0 deletions assets/images/payment-methods/grabpay.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions assets/images/payment-methods/wechat-pay.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 0 additions & 7 deletions assets/images/payment-methods/woopay.svg

This file was deleted.

Loading

0 comments on commit 6e67306

Please sign in to comment.