diff --git a/docs/developer-guide/160-frontend-testing.md b/docs/developer-guide/160-frontend-testing.md index a4998b5..77356ff 100644 --- a/docs/developer-guide/160-frontend-testing.md +++ b/docs/developer-guide/160-frontend-testing.md @@ -210,6 +210,16 @@ test("My app test", async ({ assetsPage }) => { ### Running the test +To run all frontend tests, use: + +```sh +./gradlew npmTest +``` + +::::note +Avoid using the `npmTestUI` task without specifying a path, or you'll open a Playwright window for each project. +:::: + The best way to run and debug your tests in Playwright is by using the [Playwright UI mode](https://playwright.dev/docs/test-ui-mode) feature. You may consider adding a Gradle task to the `build.gradle` file in the component / app directory to open it: @@ -224,7 +234,7 @@ tasks.register('npmTestUI', Exec) { Then run it with: ```sh -gradle ui:component:or-:npmTestUI +./gradlew ui:component:or-:npmTestUI ``` Or simply run `npm test -- --ui` in the component / app directory.