The createDataSourceConfigPage fixture uses the grafana api to create a new data source. Currently it's calling the grafana api on behalf of the logged in user, which may not have permissions to create data sources.
This PR changes this so that creating data sources in now made on behalf of the grafanaAPICredentials provided in the playwright config. If no credentials have been provided, it will use the default admin:admin so this should not break tests for those who have not specified grafanaAPICredentials.
Which issue(s) this PR fixes:
Fixes #1202
Special notes for your reviewer:
📦 Published PR as canary version: Canary Versions
:sparkles: Test out this PR locally via:
```bash
npm install @grafana/create-plugin@5.5.4-canary.1201.9d5a0c6.0
npm install @grafana/plugin-e2e@1.8.4-canary.1201.9d5a0c6.0
# or
yarn add @grafana/create-plugin@5.5.4-canary.1201.9d5a0c6.0
yarn add @grafana/plugin-e2e@1.8.4-canary.1201.9d5a0c6.0
```
Hello! 👋 This repository uses Auto for releasing packages using PR labels.
✨ This PR can be merged and will trigger a new patch release.
NOTE: When merging a PR with the release label please avoid merging another PR. For further information see here.
What this PR does / why we need it:
The
createDataSourceConfigPage
fixture uses the grafana api to create a new data source. Currently it's calling the grafana api on behalf of the logged in user, which may not have permissions to create data sources.This PR changes this so that creating data sources in now made on behalf of the
grafanaAPICredentials
provided in the playwright config. If no credentials have been provided, it will use the default admin:admin so this should not break tests for those who have not specifiedgrafanaAPICredentials
.Which issue(s) this PR fixes:
Fixes #1202
Special notes for your reviewer:
📦 Published PR as canary version:
Canary Versions
:sparkles: Test out this PR locally via: ```bash npm install @grafana/create-plugin@5.5.4-canary.1201.9d5a0c6.0 npm install @grafana/plugin-e2e@1.8.4-canary.1201.9d5a0c6.0 # or yarn add @grafana/create-plugin@5.5.4-canary.1201.9d5a0c6.0 yarn add @grafana/plugin-e2e@1.8.4-canary.1201.9d5a0c6.0 ```