From cc0f0395adf3af558fe1bde25979d8118467a2f6 Mon Sep 17 00:00:00 2001 From: jonniebigodes Date: Thu, 8 Feb 2024 16:46:12 +0000 Subject: [PATCH] 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