grafana / plugin-tools

Create Grafana plugins with ease.
https://grafana.com/developers/plugin-tools/
Apache License 2.0
58 stars 32 forks source link

Plugin E2E: Use api client when creating new datasources #1201

Closed sunker closed 3 weeks ago

sunker commented 1 month ago

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 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 ```
github-actions[bot] commented 1 month ago

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.

grafana-plugins-platform-bot[bot] commented 3 weeks ago

:rocket: PR was released in @grafana/create-plugin@5.7.5, @grafana/plugin-e2e@1.11.1 :rocket: