From 1aba3572c6a43a6e99de1d4cfaf0326970fd4da1 Mon Sep 17 00:00:00 2001 From: Peter Mathis Date: Wed, 13 Nov 2024 08:22:59 +0100 Subject: [PATCH 1/2] mention playwright robottest browser setup --- docs/contributing/core/index.md | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/docs/contributing/core/index.md b/docs/contributing/core/index.md index 565f405b0e..951536b0a8 100644 --- a/docs/contributing/core/index.md +++ b/docs/contributing/core/index.md @@ -248,9 +248,17 @@ It takes 5-10 minutes to run the full unit test suite. If you run acceptance tests with the `--all` option, it will run tests in a real browser. This takes 30-40 minutes to run. This may repeatedly launch and close browser windows that gain focus, disrupting you from doing any other work. -If this happens, you can install the `chromedriver` OS package. -See https://developer.chrome.com/docs/chromedriver. -Then run `export ROBOT_BROWSER="headlesschrome"` and again run `bin/test --all`. +If this happens, you can use `headlesschrome` as testbrowser by setting an environment variable `export ROBOT_BROWSER="headlesschrome"` and again run `bin/test --all`. + +Since we use [Playwright](https://playwright.dev/) for our robottests you have to install it first. +`plone.app.robotframework` provides a script for that: + +```shell +# Install playwright browsers +./bin/rfbrowser init +``` + +After the browser resources are downloaded and initalized you can run the tests. ```shell # Run acceptance tests From 7465b18675396756db6517c978c0c80044c95479 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Wed, 13 Nov 2024 01:27:33 -0800 Subject: [PATCH 2/2] Apply suggestions from code review --- docs/contributing/core/index.md | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/docs/contributing/core/index.md b/docs/contributing/core/index.md index 951536b0a8..187e4af144 100644 --- a/docs/contributing/core/index.md +++ b/docs/contributing/core/index.md @@ -248,20 +248,29 @@ It takes 5-10 minutes to run the full unit test suite. If you run acceptance tests with the `--all` option, it will run tests in a real browser. This takes 30-40 minutes to run. This may repeatedly launch and close browser windows that gain focus, disrupting you from doing any other work. -If this happens, you can use `headlesschrome` as testbrowser by setting an environment variable `export ROBOT_BROWSER="headlesschrome"` and again run `bin/test --all`. +If this happens, you can use `headlesschrome` as the test browser. +First set an environment variable. -Since we use [Playwright](https://playwright.dev/) for our robottests you have to install it first. -`plone.app.robotframework` provides a script for that: +```shell +export ROBOT_BROWSER="headlesschrome" +``` + +Then run all tests again. + +```shell +bin/test --all +``` + +Plone uses [Playwright](https://playwright.dev/) to run robot tests. +`plone.app.robotframework` provides a script to install Playwrite browsers. ```shell -# Install playwright browsers ./bin/rfbrowser init ``` -After the browser resources are downloaded and initalized you can run the tests. +After the script downloads and initalizes browser resources, you can run the acceptance tests. ```shell -# Run acceptance tests ./bin/test --all ```