From cc0f0395adf3af558fe1bde25979d8118467a2f6 Mon Sep 17 00:00:00 2001 From: jonniebigodes Date: Thu, 8 Feb 2024 16:46:12 +0000 Subject: [PATCH 1/3] Docs: Test runner minor changes for plug and play support --- docs/writing-tests/test-runner.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/writing-tests/test-runner.md b/docs/writing-tests/test-runner.md index d83ae2af1143..6b3d85a94fd0 100644 --- a/docs/writing-tests/test-runner.md +++ b/docs/writing-tests/test-runner.md @@ -465,6 +465,16 @@ As the test runner is based on Playwright, you might need to use specific docker If you've enabled filtering tests with tags and provided similar tags to the `include` and `exclude` lists, the test-runner will execute the tests based on the `exclude` list and ignore the `include` list. To avoid this, make sure the tags provided to the `include` and `exclude` lists differ. +### The test runner doesn't support Yarn PnP + +If you've enabled the test-runner in a project running on a newer version of Yarn with Plug'n'Play (PnP) enabled, the test-runner might not work as expected and may generate the following error when running tests: + +```shell +PlaywrightError: jest-playwright-preset: Cannot find playwright package to use chromium +``` + +This is due to the test-runner using the community-maintained package [jest-playwright-preset](https://github.com/playwright-community/jest-playwright) that still needs to support this feature. To solve this, you can either switch the [`nodeLinker`](https://yarnpkg.com/features/linkers) setting to `node-modules` or install Playwright as a direct dependency in your project, followed by adding the browser binaries via the [`install`](https://playwright.dev/docs/browsers#install-browsers) command. + **Learn about other UI tests** - Test runner to automate test execution From ea0e539b39cd98d3210747c825f8c8fb98554e75 Mon Sep 17 00:00:00 2001 From: jonniebigodes Date: Fri, 9 Feb 2024 11:34:52 +0000 Subject: [PATCH 2/3] Update docs/writing-tests/test-runner.md Co-authored-by: Yann Braga --- docs/writing-tests/test-runner.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/writing-tests/test-runner.md b/docs/writing-tests/test-runner.md index 6b3d85a94fd0..294a51e5c12e 100644 --- a/docs/writing-tests/test-runner.md +++ b/docs/writing-tests/test-runner.md @@ -465,7 +465,11 @@ As the test runner is based on Playwright, you might need to use specific docker If you've enabled filtering tests with tags and provided similar tags to the `include` and `exclude` lists, the test-runner will execute the tests based on the `exclude` list and ignore the `include` list. To avoid this, make sure the tags provided to the `include` and `exclude` lists differ. -### The test runner doesn't support Yarn PnP +### The test runner doesn't support Yarn PnP out of the box + +or + +### Yarn PnP (Plug n' Play) support If you've enabled the test-runner in a project running on a newer version of Yarn with Plug'n'Play (PnP) enabled, the test-runner might not work as expected and may generate the following error when running tests: From 06f62341d78801c6541081a961c0116e71a56c82 Mon Sep 17 00:00:00 2001 From: jonniebigodes Date: Fri, 9 Feb 2024 13:05:31 +0000 Subject: [PATCH 3/3] change heading --- docs/writing-tests/test-runner.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/docs/writing-tests/test-runner.md b/docs/writing-tests/test-runner.md index 294a51e5c12e..40b50980517e 100644 --- a/docs/writing-tests/test-runner.md +++ b/docs/writing-tests/test-runner.md @@ -467,10 +467,6 @@ If you've enabled filtering tests with tags and provided similar tags to the `in ### The test runner doesn't support Yarn PnP out of the box -or - -### Yarn PnP (Plug n' Play) support - If you've enabled the test-runner in a project running on a newer version of Yarn with Plug'n'Play (PnP) enabled, the test-runner might not work as expected and may generate the following error when running tests: ```shell