Adds new config option to show weather forecast for every X hour
(default value is 1 which reflects the current behaviour)
Also adds tests for hourly forecast
Fixes#2996
Co-authored-by: veeck <michael@veeck.de>
Lots of small fixes and cleanups:
- only render something when there is a compliment
- cleanup naming
- use es6 notations
- use fetch instead of XMLHttpRequest in compliments
Co-authored-by: veeck <michael@veeck.de>
Co-authored-by: Karsten Hassel <hassel@gmx.de>
When trying to debug why the tests broke for
https://github.com/MichMich/MagicMirror/pull/2946 I found that the tests
does not wait for the app to start and close. So if the startup isn't
blocking that would fail.
So I added a callback for `close()` too and converted them to promises
for the `startApplication()` and `stopApplication()` and updated all the
e2e tests to await both. Will try to refactor all these callbacks to
promises in a later PR.
So finally I think this refactorin is ready to be reviewed :-)
DONE:
- [x] Removed all conversion functions for wind and temperature from
specific weatherproviders
- [x] Use internally only metric units: celsius for temperature, meters
per seconds for wind
- [x] Convert temp and wind into the configured units when displaying
data on the UI
- [x] look how beaufort calculation uses metrics, added knots as new
windunit
- [x] add more e2e tests
Checked providers:
- [x] Darksky
- [x] EnvCanada
- [x] OpenWeatherMap
- [x] SMHI provider
- [x] UK Met Office
- [x] UK Met Office DataHub
- [x] WeatherBit
- [x] WeatherFlow
- [x] WeatherGov
TODO in different tickets:
- check weatherproviders for usage of weatherEndpoint (as seen in
https://github.com/MichMich/MagicMirror-Documentation/issues/131) -> see
#2926
- cleanup precipations -> #2953
Co-authored-by: veeck <michael@veeck.de>
first PR for #2942
- added new electron tests for calendar which test new css classes from
https://github.com/MichMich/MagicMirror/pull/2939
- moved some compliments tests from `e2e` to `electron` because of date
mocking
- removed mock stuff from compliments module