-
Notifications
You must be signed in to change notification settings - Fork 10
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
chore: initial e2e tests #285
Conversation
92b0621
to
f7d1465
Compare
f7d1465
to
6770d56
Compare
4a302d6
to
3a06ed7
Compare
3a06ed7
to
6daa4f0
Compare
Updated PR with GH action. |
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.
@tracy-french, awesome work!
Most of the comments are just used to mark a place in the code to apply a preceding suggestion, so most of the comments are just duplicates.
Thanks for helping us get the initial e2e tests setup. I think you may be one of the first (possibly the first person) outside of Grafana to try out the new @grafana/plugin-e2e
package. Hopefully you found the docs helpful. As @grafana/plugin-e2e
and its docs are still a WIP, we'd welcome any feedback about it if you have any.
.github/workflows/e2e.yml
Outdated
- name: Upload artifacts | ||
uses: actions/upload-artifact@v4 | ||
if: ${{ (always() && steps.run-tests.outcome == 'success') || (failure() && steps.run-tests.outcome == 'failure') && github.event.organization.login != 'grafana' }} | ||
with: | ||
name: playwright-report-${{ matrix.GRAFANA_IMAGE.NAME }}-v${{ matrix.GRAFANA_IMAGE.VERSION }}-${{github.run_id}} | ||
path: playwright-report/ | ||
retention-days: 30 |
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.
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
if: ${{ (always() && steps.run-tests.outcome == 'success') || (failure() && steps.run-tests.outcome == 'failure') && github.event.organization.login != 'grafana' }} | |
with: | |
name: playwright-report-${{ matrix.GRAFANA_IMAGE.NAME }}-v${{ matrix.GRAFANA_IMAGE.VERSION }}-${{github.run_id}} | |
path: playwright-report/ | |
retention-days: 30 | |
- name: Publish report to GCS | |
if: ${{ (always() && steps.run-tests.outcome == 'success') || (failure() && steps.run-tests.outcome == 'failure') && github.event.organization.login == 'grafana' }} | |
uses: grafana/plugin-actions/publish-report@main | |
with: | |
grafana-version: ${{ matrix.GRAFANA_IMAGE.VERSION }} |
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.
This job appears to require additional configuration on the repo? https://github.com/grafana/iot-sitewise-datasource/actions/runs/8145135150/job/22260712602?pr=285#step:13:28.
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.
Looks like an issue with the GH action being run from a fork. I've asked for some clarification on this from the publish report action author. I'll let you know what the suggested action when they get back to me.
@kevinwcyu Thank you for your time and feedback! I will work on addressing all of your comments shortly! Exciting to be one of the first using |
9caef18
to
a21231f
Compare
@kevinwcyu All of your feedback has been addressed. Just running into the issues with the dev image and GCS. |
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.
LGTM. Tentatively approving as it should be ready once the docker-compose.yaml
file is updated and we figure out what to do with the publish report step (this will be on our end to figure out).
Nice catch on the Format
property having an incorrect id
.
.github/workflows/e2e.yml
Outdated
- name: Upload artifacts | ||
uses: actions/upload-artifact@v4 | ||
if: ${{ (always() && steps.run-tests.outcome == 'success') || (failure() && steps.run-tests.outcome == 'failure') && github.event.organization.login != 'grafana' }} | ||
with: | ||
name: playwright-report-${{ matrix.GRAFANA_IMAGE.NAME }}-v${{ matrix.GRAFANA_IMAGE.VERSION }}-${{github.run_id}} | ||
path: playwright-report/ | ||
retention-days: 30 |
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.
Looks like an issue with the GH action being run from a fork. I've asked for some clarification on this from the publish report action author. I'll let you know what the suggested action when they get back to me.
a21231f
to
515eddf
Compare
@kevinwcyu As the tests are now running on every version and we just have the GCS action left to handle, I'm going to merge this. Maybe we'll see the action succeed 🤞. |
What this PR does / why we need it: This change includes the initial e2e test setup and a confirmation test for the "Get property value" query (see #212). The initial implementation does not rely on a provisioned data source and instead mocks network requests.
The change also includes a GitHub action for running the tests on PR push (following guidance int Grafana testing guide).
Follow-up PRs will include:
The test added assumes the fix in #286 is merged to test asset property selection.