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

PluginE2E: Added (app) plugin config fixture #795

Merged
merged 9 commits into from
Mar 13, 2024

Conversation

mckn
Copy link
Collaborator

@mckn mckn commented Mar 1, 2024

Description

Adding fixture to make it easier to test app configs pages. This is a thin abstraction and I need to verify this against older versions of Grafana prior to merging it.

Todo:

  • Adding missing test fixture
  • Figure out if we can get the plugin id in another way than to pass it in the test.

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

📦 Published PR as canary version: Canary Versions

✨ Test out this PR locally via:

npm install @grafana/plugin-e2e@0.20.0-canary.795.f5d5401.0
# or 
yarn add @grafana/plugin-e2e@0.20.0-canary.795.f5d5401.0

Copy link

github-actions bot commented Mar 1, 2024

Hello! 👋 This repository uses Auto for releasing packages using PR labels.

✨ This PR can be merged but will not trigger a new release. To trigger a new release add the release label before merging.
NOTE: When merging a PR with the release label please avoid merging another PR. For further information see here.

@mckn mckn requested a review from sunker March 1, 2024 08:30
@mckn mckn changed the title PluginE2E: Added (app) plugin config ficture PluginE2E: Added (app) plugin config fixture Mar 1, 2024
@mckn mckn self-assigned this Mar 1, 2024
@mckn mckn added minor Increment the minor version when merged release Create a release when this pr is merged labels Mar 1, 2024
@mckn mckn marked this pull request as ready for review March 11, 2024 19:14
@mckn mckn requested a review from a team as a code owner March 11, 2024 19:14
Copy link
Contributor

@sunker sunker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great! Just some open questions to you in the comments.

packages/plugin-e2e/src/api.ts Outdated Show resolved Hide resolved
const url = this.ctx.selectors.pages.Plugin.url(this.args.pluginId);
return super.navigate(url, options);
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know the Save button is not part of the app API. However, it's there when you scaffold a new app plugin and we have it in the examples repo. So maybe we should also expose a Save method here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking about this back and forth and it feels a bit weird to expose a save method if the plugin choose to name that button something else.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah it's a bit weird. 👍 If we decide to add a onOptionsChang method along with a save button to the app config api, we can add a save button here too.

@mckn mckn requested a review from sunker March 12, 2024 15:17
Copy link
Contributor

@sunker sunker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@mckn mckn removed the release Create a release when this pr is merged label Mar 13, 2024
@mckn mckn merged commit 2adba68 into main Mar 13, 2024
23 checks passed
@mckn mckn deleted the mckn/adding-plugin-config-page branch March 13, 2024 09:32
@grafana-plugins-platform-bot
Copy link

🚀 PR was released in @grafana/plugin-e2e@0.21.0 🚀

@grafana-plugins-platform-bot grafana-plugins-platform-bot bot added the released This issue/pull request has been released. label Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
minor Increment the minor version when merged released This issue/pull request has been released.
Projects
Development

Successfully merging this pull request may close these issues.

2 participants