Ribbit-Network / ribbit-network-dashboard

The web dashboard for the world's largest crowdsourced network of open-source, low-cost, CO2 Gas Detection Sensors.
MIT License
17 stars 16 forks source link

Add basic unit tests #40

Closed keenanjohnson closed 2 years ago

keenanjohnson commented 3 years ago

Right now the project has no unit tests. We should add some basic tests :)

sriki18 commented 2 years ago

Hmm. We could probably split this into two problems, one for db tests and one for the dash app. The former should not be too hard - hard-code some queries and check data consistency. Dash app tests may be a little more involved (https://dash.plotly.com/testing). Am I missing anything?

keenanjohnson commented 2 years ago

Yeah I think those are the two major pieces right now. Probably something like a basic smoke test just to ensure the dash app runs for example would be key.

There are other things we could eventually test like that the plots auto update and the clicking behaviors work correctly, but those are of lesser value right now I think.

keenanjohnson commented 2 years ago

@all-contributors please add @abesto for his awesome test code!

allcontributors[bot] commented 2 years ago

@keenanjohnson

I've put up a pull request to add @abesto! :tada:

keenanjohnson commented 2 years ago

I've added the ability to trigger the actions manually above and it works great:

image

keenanjohnson commented 2 years ago

Per our discussion in #67 @abesto, I've created #70.