@ -251,18 +251,20 @@ Each version of Playwright needs specific versions of browser binaries to operat
yarn playwright install chromium
yarn playwright install chromium
```
```
To run all tests in a headless Chromium browser and display results in the terminal. This assumes you have Grafana running on port 3000.
The following script starts a Grafana [development server](https://github.com/grafana/grafana/blob/main/scripts/grafana-server/start-server) (same server that is being used when running e2e tests in CI) on port 3001 and runs all the Playwright tests. The development server is provisioned with the [devenv](https://github.com/grafana/grafana/blob/main/contribute/developer-guide.md#add-data-sources) dashboards, data sources and apps.
```
```
yarn e2e:playwright
yarn e2e:playwright
```
```
The following script starts a Grafana [development server](https://github.com/grafana/grafana/blob/main/scripts/grafana-server/start-server) (same server that is being used when running e2e tests in Drone CI) on port 3001 and runs the Playwright tests. The development server is provisioned with the [devenv](https://github.com/grafana/grafana/blob/main/contribute/developer-guide.md#add-data-sources) dashboards, data sources and apps.
You can run against an arbitrary instance by setting the `GRAFANA_URL` environment variable:
@ -32,10 +32,12 @@ You can add Playwright end-to-end tests for plugins to the [`e2e-playwright/plug
- `yarn e2e:playwright` runs all Playwright tests. Optionally, you can provide the `--project mysql` argument to run tests in a specific project.
- `yarn e2e:playwright` runs all Playwright tests. Optionally, you can provide the `--project mysql` argument to run tests in a specific project.
The `yarn e2e:playwright`script assumes you have Grafana running on `localhost:3000`. You may change this with an environment variable:
The `yarn e2e:playwright`command starts a Grafana [development server](https://github.com/grafana/grafana/blob/main/scripts/grafana-server/start-server) on port 3001 and runs the Playwright tests.
`HOST=127.0.0.1 PORT=3001 yarn e2e:playwright`
You can run against an arbitrary instance by setting the `GRAFANA_URL` environment variable:
The `yarn e2e:playwright:server` starts a Grafana [development server](https://github.com/grafana/grafana/blob/main/scripts/grafana-server/start-server) on port 3001 and runs the Playwright tests.
Note this will not start a development server, so you must ensure that Grafana is running and accessible at the specified URL.
- You can provision the development server with the [devenv](https://github.com/grafana/grafana/blob/main/contribute/developer-guide.md#add-data-sources) dashboards, data sources, and apps.
- You can provision the development server with the [devenv](https://github.com/grafana/grafana/blob/main/contribute/developer-guide.md#add-data-sources) dashboards, data sources, and apps.