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 1 commit
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
14 changes: 11 additions & 3 deletions docs/contributing/core/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
stevepiercy marked this conversation as resolved.
Show resolved Hide resolved

Since we use [Playwright](https://playwright.dev/) for our robottests you have to install it first.
stevepiercy marked this conversation as resolved.
Show resolved Hide resolved
`plone.app.robotframework` provides a script for that:
stevepiercy marked this conversation as resolved.
Show resolved Hide resolved

```shell
# Install playwright browsers
stevepiercy marked this conversation as resolved.
Show resolved Hide resolved
./bin/rfbrowser init
```

After the browser resources are downloaded and initalized you can run the tests.
stevepiercy marked this conversation as resolved.
Show resolved Hide resolved

```shell
# Run acceptance tests
stevepiercy marked this conversation as resolved.
Show resolved Hide resolved
Expand Down
Loading