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

Example: adding tests to verify the basic app #92

Merged
merged 7 commits into from
Sep 21, 2022
Merged

Conversation

mckn
Copy link
Contributor

@mckn mckn commented Sep 15, 2022

This should probably be good enough to verify that this app is working as expected. I renamed the test specs in the datasource to be consistent with the rest of the spec files in the repo.

Fixes: #53 #12

@mckn mckn added the enhancement New feature or request label Sep 15, 2022
@mckn mckn self-assigned this Sep 15, 2022
@mckn mckn mentioned this pull request Sep 15, 2022
9 tasks
@@ -2,7 +2,7 @@
"$schema": "https://raw.githubusercontent.com/grafana/grafana/master/docs/sources/developers/plugins/plugin.schema.json",
"type": "app",
"name": "Basic App",
"id": "basic-app",
"id": "grafana-basic-app",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Prefixing with grafana- to remove risk of colliding.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Isn't the prefix of a plugin id be the org name? Maybe swap it out for myOrg?

"id": "myorg-basic-app",

Copy link
Member

@academo academo left a comment

Choose a reason for hiding this comment

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

Nice! thanks for adding those tests.

Copy link
Collaborator

@jackw jackw left a comment

Choose a reason for hiding this comment

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

Awesome work @mckn! 🚀

Left a couple of nits.


describe('configurating app', () => {
beforeEach(() => {
cy.visit('http://localhost:3000/plugins/grafana-basic-app');
Copy link
Collaborator

Choose a reason for hiding this comment

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

We should be able to improve this with a flow to e2e package or some such.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I totally agree! Lets add it to the list to expose some kind of function that will fetch this based on the environment we are running the tests in.

@@ -2,7 +2,7 @@
"$schema": "https://raw.githubusercontent.com/grafana/grafana/master/docs/sources/developers/plugins/plugin.schema.json",
"type": "app",
"name": "Basic App",
"id": "basic-app",
"id": "grafana-basic-app",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Isn't the prefix of a plugin id be the org name? Maybe swap it out for myOrg?

"id": "myorg-basic-app",

mckn and others added 2 commits September 21, 2022 21:49
Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
@mckn mckn merged commit 6d7acd5 into master Sep 21, 2022
@mckn mckn deleted the mckn/basic-app-tests branch September 21, 2022 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

Successfully merging this pull request may close these issues.

Basic App Plugin: add integration tests
3 participants