Skip to content

Commit 6e67306

Browse files
committed
Merge release/9.0.0 into trunk
2 parents 04e4611 + 0c03941 commit 6e67306

File tree

298 files changed

+26618
-35583
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

298 files changed

+26618
-35583
lines changed

.eslintrc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@
2121
"wcpaySettings": true,
2222
"page": true,
2323
"browser": true,
24-
"context": true,
25-
"jestPuppeteer": true
24+
"context": true
2625
},
2726
"settings": {
2827
"react": {

.github/actions/e2e-pw/run-log-tests/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ runs:
88
id: first_run_e2e_pw_tests
99
# Use +e to trap errors when running E2E tests.
1010
shell: /bin/bash +e {0}
11-
run: npm run test:e2e-pw-ci
11+
run: npm run test:e2e-ci
1212
- uses: actions/upload-artifact@v4
1313
if: always()
1414
with:

.github/actions/e2e/atomic-prepare-and-run/action.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,9 @@ runs:
2525
run: |
2626
mkdir screenshots
2727
28+
- name: Install Playwright
29+
shell: bash
30+
run: npx playwright install chromium
31+
2832
- name: "Run tests, upload screenshots & logs"
2933
uses: ./.github/actions/e2e/run-log-tests

.github/actions/e2e/run-log-tests/action.yml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,18 @@ runs:
99
# Use +e to trap errors when running E2E tests.
1010
shell: /bin/bash +e {0}
1111
run: |
12-
npm run test:e2e -- --json --outputFile="$E2E_RESULT_FILEPATH" --NODE_ENV="$NODE_ENV"
12+
npm run test:e2e-ci
1313
1414
if [[ -f "$E2E_RESULT_FILEPATH" ]]; then
15-
E2E_NUM_FAILED_TEST_SUITES=$(cat "$E2E_RESULT_FILEPATH" | jq '.numFailedTestSuites')
15+
E2E_NUM_FAILED_TEST_SUITES=$(cat "$E2E_RESULT_FILEPATH" | jq '.stats["unexpected"]')
1616
echo "FIRST_RUN_FAILED_TEST_SUITES=$(echo $E2E_NUM_FAILED_TEST_SUITES)" >> $GITHUB_OUTPUT
1717
if [[ ${E2E_NUM_FAILED_TEST_SUITES} -gt 0 ]]; then
1818
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."
1919
exit 0
2020
fi
2121
else
2222
echo "FIRST_RUN_FAILED_TEST_SUITES=0" >> $GITHUB_OUTPUT
23-
echo "::notice::${E2E_RESULT_FILEPATH} doesn't exist so results are unclear and we will not try again."
24-
exit 1
23+
exit 0
2524
fi
2625
2726
# Retry failed E2E tests
@@ -30,18 +29,17 @@ runs:
3029
shell: bash
3130
# Filter failed E2E files from the result JSON file, and re-run them.
3231
run: |
33-
cat "$E2E_RESULT_FILEPATH" | jq '.testResults[] | select(.status == "failed") | .name' | xargs npm run test:e2e -- --NODE_ENV="$NODE_ENV"
32+
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 | .[]')
3433
3534
# Archive screenshots if any
3635
- name: Archive e2e test screenshots & logs
37-
if: ${{ failure() }}
36+
if: ${{ always() }}
3837
uses: actions/upload-artifact@v4
3938
with:
4039
name: wp(${{ env.E2E_WP_VERSION }})-wc(${{ env.E2E_WC_VERSION }})-${{ env.E2E_GROUP }}-${{ env.E2E_BRANCH }}
4140
path: |
42-
screenshots
43-
tests/e2e/screenshots
44-
tests/e2e/docker/wordpress/wp-content/debug.log
41+
playwright-report/
42+
tests/e2e/test-results
4543
${{ env.E2E_RESULT_FILEPATH }}
4644
if-no-files-found: ignore
4745
retention-days: 14

.github/workflows/e2e-pull-request.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@ name: E2E Tests - Pull Request
33
on:
44
pull_request:
55
branches:
6-
# - develop
7-
# - trunk
8-
- dev/10240-update-npm-scripts # [TODO] Remove this line after the branch is merged.
6+
- develop
7+
- trunk
98
workflow_dispatch:
109
workflow_call:
1110
inputs:
@@ -28,7 +27,7 @@ env:
2827
E2E_BLOG_TOKEN: ${{ secrets.E2E_BLOG_TOKEN }}
2928
E2E_USER_TOKEN: ${{ secrets.E2E_USER_TOKEN }}
3029
WC_E2E_SCREENSHOTS: 1
31-
E2E_SLACK_CHANNEL: ${{ secrets.E2E_SLACK_CHANNEL }}
30+
E2E_SLACK_CHANNEL_ID: ${{ secrets.E2E_SLACK_CHANNEL_ID }}
3231
E2E_SLACK_TOKEN: ${{ secrets.E2E_SLACK_TOKEN }}
3332
E2E_USE_LOCAL_SERVER: false
3433
E2E_RESULT_FILEPATH: 'tests/e2e/results.json'
@@ -75,5 +74,9 @@ jobs:
7574
- name: Setup E2E environment
7675
uses: ./.github/actions/e2e/env-setup
7776

77+
- name: Install Playwright
78+
shell: bash
79+
run: npx playwright install chromium
80+
7881
- name: Run tests, upload screenshots & logs
7982
uses: ./.github/actions/e2e/run-log-tests

.github/workflows/e2e-pw-pull-request.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ env:
2727
E2E_BLOG_TOKEN: ${{ secrets.E2E_BLOG_TOKEN }}
2828
E2E_USER_TOKEN: ${{ secrets.E2E_USER_TOKEN }}
2929
WC_E2E_SCREENSHOTS: 1
30-
E2E_SLACK_CHANNEL: ${{ secrets.E2E_SLACK_CHANNEL }}
30+
E2E_SLACK_CHANNEL_ID: ${{ secrets.E2E_SLACK_CHANNEL_ID }}
3131
E2E_SLACK_TOKEN: ${{ secrets.E2E_SLACK_TOKEN }}
3232
E2E_USE_LOCAL_SERVER: false
3333
E2E_RESULT_FILEPATH: 'tests/e2e/results.json'
@@ -71,4 +71,4 @@ jobs:
7171
run: npx playwright install chromium
7272

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

.github/workflows/e2e-test.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ env:
1919
E2E_BLOG_TOKEN: ${{ secrets.E2E_BLOG_TOKEN }}
2020
E2E_USER_TOKEN: ${{ secrets.E2E_USER_TOKEN }}
2121
WC_E2E_SCREENSHOTS: 1
22-
E2E_SLACK_CHANNEL: ${{ secrets.E2E_SLACK_CHANNEL }}
22+
E2E_SLACK_CHANNEL_ID: ${{ secrets.E2E_SLACK_CHANNEL_ID }}
2323
E2E_SLACK_TOKEN: ${{ secrets.E2E_SLACK_TOKEN }}
2424
E2E_USE_LOCAL_SERVER: false
2525
E2E_RESULT_FILEPATH: 'tests/e2e/results.json'
@@ -64,6 +64,10 @@ jobs:
6464
- name: Setup E2E environment
6565
uses: ./.github/actions/e2e/env-setup
6666

67+
- name: Install Playwright
68+
shell: bash
69+
run: npx playwright install chromium
70+
6771
- name: Run tests, upload screenshots & logs
6872
uses: ./.github/actions/e2e/run-log-tests
6973

@@ -116,5 +120,9 @@ jobs:
116120
- name: Setup E2E environment
117121
uses: ./.github/actions/e2e/env-setup
118122

123+
- name: Install Playwright
124+
shell: bash
125+
run: npx playwright install chromium
126+
119127
- name: Run tests, upload screenshots & logs
120128
uses: ./.github/actions/e2e/run-log-tests

.github/workflows/e2e-tests-atomic.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66

77
env:
88
WC_E2E_SCREENSHOTS: 1
9-
E2E_SLACK_CHANNEL: ${{ secrets.E2E_SLACK_CHANNEL }}
9+
E2E_SLACK_CHANNEL_ID: ${{ secrets.E2E_SLACK_CHANNEL_ID }}
1010
E2E_SLACK_TOKEN: ${{ secrets.E2E_SLACK_TOKEN }}
1111
E2E_WP_VERSION: 'nightly'
1212
E2E_WC_VERSION: 'latest'

.gitignore

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -85,16 +85,15 @@ local.env
8585
# Screenshots created locally when running e2e tests
8686
tests/e2e/screenshots
8787

88-
# E2E Performance test results
88+
# E2E test results
8989
tests/e2e/reports
90-
91-
# E2E Playwright
9290
/playwright-report/
9391
/blob-report/
94-
tests/e2e-pw/.auth/
95-
tests/e2e-pw/test-results/
96-
tests/e2e-pw/playwright/.cache/
97-
tests/e2e-pw/tests/e2e-pw/.auth/*
92+
tests/e2e/.auth/
93+
tests/e2e/test-results/
94+
tests/e2e/playwright/.cache/
95+
tests/e2e/tests/e2e/.auth/*
96+
9897
# Slate docs
9998
docs/rest-api/build/*
10099

.puppeteerrc.cjs

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)