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

Add Playwright infrastructure for E2E tests #2733

Merged
merged 7 commits into from
Sep 6, 2024
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 15 additions & 5 deletions .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: End-to-end (e2e) Tests
name: End-to-end Tests

on:
# Run on all pull requests.
Expand All @@ -16,8 +16,8 @@ concurrency:

jobs:
test:
name: e2e against WordPress latest
runs-on: ubuntu-20.04
name: E2E against WordPress latest
runs-on: ubuntu-24.04

steps:
- name: Checkout code
Expand All @@ -29,22 +29,32 @@ jobs:
- name: Use desired version of NodeJS
uses: actions/[email protected]
with:
node-version: 16
node-version: 18
cache: npm

- name: Npm install
run: |
npm ci

- name: Install Playwright dependencies
run: |
npx playwright install chromium --with-deps

- name: Start up WordPress environment
run: |
npm run dev:start

- name: Running the tests
- name: Running E2E tests
run: |
npm run test:e2e -- --listTests > ~/.jest-e2e-tests
npm run test:e2e

- name: Running Playwright E2E tests
env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
run: |
npm run test:e2e:playwright

- name: Stop WordPress environment
run: |
npm run dev:stop
Expand Down
1 change: 1 addition & 0 deletions jest-e2e.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ const baseConfig = require( '@wordpress/scripts/config/jest-e2e.config' );

module.exports = {
...baseConfig,
testMatch: [ '**/tests/e2e/specs/**/*.[jt]s?(x)' ], // Prevent running Playwright tests.
testTimeout: 35000, // Increased timeout for E2E tests.
};
211 changes: 119 additions & 92 deletions package-lock.json

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

Loading
Loading