Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mention playwright robottest browser setup for local testing #1772

Merged
merged 3 commits into from
Nov 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 21 additions & 4 deletions docs/contributing/core/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -248,12 +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 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 the test browser.
First set an environment variable.

```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
./bin/rfbrowser init
```

After the script downloads and initalizes browser resources, you can run the acceptance tests.

```shell
# Run acceptance tests
./bin/test --all
```

Expand Down
Loading