Skip to content

Commit

Permalink
Merge pull request #7669 from ampproject/fix/e2e-tests
Browse files Browse the repository at this point in the history
Fix navigation timeout errors in E2E tests
  • Loading branch information
westonruter committed Nov 3, 2023
2 parents 66b8668 + ee18f0a commit 7ddff31
Show file tree
Hide file tree
Showing 14 changed files with 177 additions and 149 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/build-test-measure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ jobs:
actions: write
env:
WP_BASE_URL: 'http://127.0.0.1:8890'
JEST_PUPPETEER_CONFIG: './tests/e2e/puppeteer.config.js'
strategy:
fail-fast: false
matrix:
Expand All @@ -222,6 +223,12 @@ jobs:
path: ~/.jest-cache
key: ${{ runner.os }}-jest-e2e-${{ matrix.part }}

- name: Setup puppeteer cache
uses: actions/cache@v3.3.2
with:
path: ~/.cache/puppeteer
key: ${{ runner.os }}-puppeteer

- name: Start Docker environment
run: npm run env:start:ci
env:
Expand Down
193 changes: 123 additions & 70 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@
"postcss-nested": "6.0.1",
"postcss-preset-env": "9.2.0",
"prettier": "3.0.3",
"puppeteer": "21.5.0",
"react-test-renderer": "18.2.0",
"rtlcss-webpack-plugin": "4.0.7",
"semver": "7.5.4",
Expand Down Expand Up @@ -134,12 +135,11 @@
"prepare": "husky install",
"start": "wp-scripts start",
"test": "npm-run-all --parallel test:*",
"test:e2e": "wp-scripts test-e2e --config=tests/e2e/jest.config.js",
"test:e2e": "cross-env JEST_PUPPETEER_CONFIG=./tests/e2e/puppeteer.config.js wp-scripts test-e2e --config=tests/e2e/jest.config.js",
"test:e2e:help": "npm run test:e2e -- --help",
"test:e2e:watch": "npm run test:e2e -- --watch",
"test:e2e:interactive": "npm run test:e2e -- --puppeteer-interactive",
"pretest:e2e:ci": "npx patch-package",
"test:e2e:ci": "cross-env WP_BASE_URL=http://127.0.0.1:8890 wp-scripts test-e2e --config=tests/e2e/jest-ci.config.js --runInBand",
"test:e2e:ci": "cross-env WP_BASE_URL=http://127.0.0.1:8890 JEST_PUPPETEER_CONFIG=./tests/e2e/puppeteer.config.js wp-scripts test-e2e --config=tests/e2e/jest-ci.config.js --runInBand",
"test:js": "wp-scripts test-unit-js --config=tests/js/jest.config.js",
"test:js:help": "wp-scripts test-unit-js --help",
"test:js:update-snapshots": "npm run test:js -- --updateSnapshot",
Expand Down
Loading

0 comments on commit 7ddff31

Please sign in to comment.