grafana / iot-sitewise-datasource

IoT Sitewise
Apache License 2.0
19 stars 9 forks source link

chore: initial e2e tests #285

Closed tracy-french closed 4 months ago

tracy-french commented 4 months ago

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 https://github.com/grafana/iot-sitewise-datasource/issues/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 https://github.com/grafana/iot-sitewise-datasource/pull/286 is merged to test asset property selection.

tracy-french commented 4 months ago

Updated PR with GH action.

tracy-french commented 4 months ago

@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 @grafana/plugin-e2e. I'll write up a few of my thoughts about the package and drop them here for you.

tracy-french commented 4 months ago

@kevinwcyu All of your feedback has been addressed. Just running into the issues with the dev image and GCS.

tracy-french commented 4 months ago

@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 🤞.