-
Notifications
You must be signed in to change notification settings - Fork 52
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
Conversation
examples/app-basic/src/plugin.json
Outdated
@@ -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", |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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",
There was a problem hiding this 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.
There was a problem hiding this 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'); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
examples/app-basic/cypress/integration/02-app-navigation.spec.ts
Outdated
Show resolved
Hide resolved
examples/app-basic/src/plugin.json
Outdated
@@ -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", |
There was a problem hiding this comment.
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",
Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
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