From 16983e52f4bb428c407c63ae35bfe5bf85e462b4 Mon Sep 17 00:00:00 2001 From: Jamie Howard <48524071+jhoward1994@users.noreply.github.com> Date: Mon, 8 Apr 2024 15:18:10 +0100 Subject: [PATCH] chore(tests): allow unknown args in e2e (#20026) * chore(tests): allow unknown args in e2e * chore(tests): revert and specify debug as flag * chore: clean up * fix: pr feedback * chore: remove manual debug flag and document new playwright debugging process * chore: clean up --- docs/docs/guides/e2e/00-setup.md | 9 ++++++++- package.json | 1 - 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/docs/guides/e2e/00-setup.md b/docs/docs/guides/e2e/00-setup.md index 75eb9780b4..256b5adb9b 100644 --- a/docs/docs/guides/e2e/00-setup.md +++ b/docs/docs/guides/e2e/00-setup.md @@ -35,7 +35,6 @@ To run only one domain, meaning a top-level directory in e2e/tests such as "admi ```shell yarn test:e2e --domains admin -yarn test:e2e --domain admin ``` To run a specific file, you can pass arguments and options to playwright using `--` between the test:e2e options and the playwright options, such as: @@ -45,6 +44,14 @@ To run a specific file, you can pass arguments and options to playwright using ` yarn test:e2e --domains admin -- login.spec.ts ``` +To debug your tests with a browser instance and the playwright debugger, you can pass the +`--debug` option like this: + +```shell +yarn test:e2e --domains admin -- --debug +yarn test:e2e --domains admin -- login.spec.ts --debug +``` + ### Concurrency / parallellization By default, every domain is run with its own test app in parallel with the other domains. The tests within a domain are run in series, one at a time. diff --git a/package.json b/package.json index 286e023a74..348fc86074 100644 --- a/package.json +++ b/package.json @@ -54,7 +54,6 @@ "test:cli:debug": "node tests/scripts/run-cli-tests.js --debug", "test:e2e": "node tests/scripts/run-e2e-tests.js", "test:e2e:clean": "node tests/scripts/run-e2e-tests.js clean", - "test:e2e:debug": "node tests/scripts/run-e2e-tests.js --debug", "test:front": "cross-env IS_EE=true jest --config jest.config.front.js", "test:front:all": "cross-env IS_EE=true nx run-many --target=test:front --nx-ignore-cycles", "test:front:all:ce": "cross-env IS_EE=false nx run-many --target=test:front:ce --nx-ignore-cycles",