Playwright test example#463
Conversation
0c9a3d2 to
314dbba
Compare
b4084e6 to
410bec8
Compare
tormi
left a comment
There was a problem hiding this comment.
Hi Marc, nice Playwright CI setup!
I recommend trying this workflow with DDEV and CircleCI as well. I created another experimental PR using yours as a base to try out: #467
Why consider this approach?
- The project already uses DDEV and CircleCI.
- Your workflow uses pure PHP/Node + MariaDB services, which is different from a local developer workflow.
- Matching local and CI reduces potential "works locally, fails in CI" issues.
…d improve test structure
|
Updates:
|
tormi
left a comment
There was a problem hiding this comment.
Minor:
Warning: Node.js 20 actions are deprecated. The following actions are running on Node.js 20 and may not work as expected: actions/checkout@v4, actions/upload-artifact@v4. Actions will be forced to run with Node.js 24 by default starting June 16th, 2026. Node.js 20 will be removed from the runner on September 16th, 2026. Please check if updated versions of these actions are available that support Node.js 24. To opt into Node.js 24 now, set the FORCE_JAVASCRIPT_ACTIONS_TO_NODE24=true environment variable on the runner or in your workflow file. Once Node.js 24 becomes the default, you can temporarily opt out by setting ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
0d35ce6 to
dc2c3fb
Compare
Seems like this is an issue with github actions itself, I have updated the action version to the latest and it still gets the error. |
tormi
left a comment
There was a problem hiding this comment.
Looking good, Node.js 20 actions are deprecated warning is gone. RTBC.
Ticket WQS-115
Changes
This pull request introduces Playwright for end-to-end (E2E) browser testing, including all necessary configuration and documentation updates. It adds Playwright test dependencies, a reusable Drupal test base, an example E2E test, and a GitHub Actions workflow for running Playwright tests in CI. It also updates DDEV configuration for local Playwright support and documents the new testing workflow.
Playwright E2E Testing Integration
playwright.config.ts) for multi-browser testing, parallelization, and CI compatibility.tests/helpers/drupal-test.ts) using@drupal/playwrightto provide Drupal-specific test helpers.tests/example.spec.ts) demonstrating basic Drupal page creation.Dependency and Environment Setup
package.jsonto add Playwright, TypeScript, Faker, and@drupal/playwrightas dependencies, and set"type": "module". [1] [2] [3].ddev/config.yamlto install Playwright browsers and set environment variables for Playwright tests. [1] [2]Continuous Integration
.github/workflows/playwright.yml) to run Playwright tests on pushes and pull requests, including playwright report upload.Documentation
README.mdwith clear instructions for running PHPUnit and Playwright tests, including setup, commands, and test structure.Testing
ddev startddev drush si standardddev npx playwright testnpx playwright show-reportAdditionally, check that the tests are running and passing in the CI (github actions): https://github.com/wunderio/drupal-project/actions/runs/26224491021/job/77167782032