Problem/Motivation
To cover the Drupal Core and contrib modules functionality by browser tests, many people prefer to use Playwright framework instead of Nightwatch.js or PHPUnit FunctionalJavascript frameworks.
But for now, Drupal doesn't support Playwright, so every project has to invent their own wheels to run Playwright tests in the Drupal.org CI infrastructure.
Here is one of that examples https://git.drupalcode.org/project/logger/-/merge_requests/13/diffs
So, the most simple way for now is just to use a NPM package @drupal/playwright and extend the .gitlab-ci.yml file with an additional job that runs Playwright tests.
Proposed resolution
To simplify using Playwright to write tests for Drupal Core and contrib, let's integrate the NPM package @drupal/playwright into the Drupal Core JS dev dependencies, and extend the .gitlab-ci.yml pipeline config with a preconfigured job, that can be triggered if the project has at least one of the Playwright tests.
Remaining tasks
User interface changes
Introduced terminology
API changes
Data model changes
Release notes snippet
Issue fork drupal-3638792
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
murzImplemented a draft of the implementation in the MR https://git.drupalcode.org/project/drupal/-/merge_requests/17839 - please review and give feedback about what we can improve there.