mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-27 17:01:08 -04:00
## [2.23.0] - 2023-04-04 Thanks to: @angeldeejay, @buxxi, @CarJem, @dariom, @DaveChild, @dWoolridge, @grenagit, @Hirschberger, @KristjanESPERANTO, @MagMar94, @naveensrinivasan, @nfogal, @psieg, @rajniszp, @retroflex, @SkySails and @tomzt. Special thanks to @khassel, @rejas and @sdetweil for taking over most (if not all) of the work on this release as project collaborators. This version would not be there without their effort. Thank you guys! You are awesome! ### Added - Added increments for hourly forecasts in weather module (#2996) - Added tests for hourly weather forecast - Added possibility to ignore MagicMirror repo in updatenotification module - Added Pirate Weather as new weather provider (#3005) - Added possibility to use your own templates in Alert module - Added error message if `<modulename>.js` file is missing in module folder to get a hint in the logs (#2403) - Added possibility to use environment variables in `config.js` (#1756) - Added option `pastDaysCount` to default calendar module to control of how many days past events should be displayed - Added thai language to alert module - Added option `sendNotifications` in clock module (#3056) ### Removed - Removed darksky weather provider - Removed unneeded (and unwanted) '.' after the year in calendar repeatingCountTitle (#2896) ### Updated - Use develop as target branch for dependabot - Update issue template, contributing doc and sample config - The weather modules clearly separates precipitation amount and probability (risk of rain/snow) - This requires all providers that only supports probability to change the config from `showPrecipitationAmount` to `showPrecipitationProbability`. - Update tests for weather and calendar module - Changed updatenotification module for MagicMirror repo only: Send only notifications for `master` if there is a tag on a newer commit - Update dates in Calendar widgets every minute - Cleanup jest coverage for patches - Update `stylelint` dependencies, switch to `stylelint-config-standard` and handle `stylelint` issues, update `main.css` matching new rules - Update Eslint config, add new rule and handle issue - Convert lots of callbacks to async/await - Revise require imports (#3071 and #3072) ### Fixed - Fix wrong day labels in envcanada forecast (#2987) - Fix for missing default class name prefix for customEvents in calendar - Fix electron flashing white screen on startup (#1919) - Fix weathergov provider hourly forecast (#3008) - Fix message display with HTML code into alert module (#2828) - Fix typo in french translation - Yr wind direction is no longer inverted - Fix async node_helper stopping electron start (#2487) - The wind direction arrow now points in the direction the wind is flowing, not into the wind (#3019) - Fix precipitation css styles and rounding value - Fix wrong vertical alignment of calendar title column when wrapEvents is true (#3053) - Fix empty news feed stopping the reload forever - Fix e2e tests (failed after async changes) by running calendar and newsfeed tests last - Lint: Use template literals instead of string concatenation - Fix default alert module to render HTML for title and message - Fix Open-Meteo wind speed units
84 lines
2.9 KiB
JavaScript
84 lines
2.9 KiB
JavaScript
const helpers = require("../helpers/global-setup");
|
|
const weatherFunc = require("../helpers/weather-functions");
|
|
|
|
describe("Weather module", () => {
|
|
afterAll(async () => {
|
|
await helpers.stopApplication();
|
|
});
|
|
|
|
describe("Current weather", () => {
|
|
describe("Default configuration", () => {
|
|
beforeAll(async () => {
|
|
await weatherFunc.startApp("tests/configs/modules/weather/currentweather_default.js", {});
|
|
});
|
|
|
|
it("should render wind speed and wind direction", async () => {
|
|
await weatherFunc.getText(".weather .normal.medium span:nth-child(2)", "12 WSW");
|
|
});
|
|
|
|
it("should render temperature with icon", async () => {
|
|
await weatherFunc.getText(".weather .large.light span.bright", "1.5°");
|
|
});
|
|
|
|
it("should render feels like temperature", async () => {
|
|
await weatherFunc.getText(".weather .normal.medium.feelslike span.dimmed", "Feels like -5.6°");
|
|
});
|
|
});
|
|
});
|
|
|
|
describe("Compliments Integration", () => {
|
|
beforeAll(async () => {
|
|
await weatherFunc.startApp("tests/configs/modules/weather/currentweather_compliments.js", {});
|
|
});
|
|
|
|
it("should render a compliment based on the current weather", async () => {
|
|
await weatherFunc.getText(".compliments .module-content span", "snow");
|
|
});
|
|
});
|
|
|
|
describe("Configuration Options", () => {
|
|
beforeAll(async () => {
|
|
await weatherFunc.startApp("tests/configs/modules/weather/currentweather_options.js", {});
|
|
});
|
|
|
|
it("should render windUnits in beaufort", async () => {
|
|
await weatherFunc.getText(".weather .normal.medium span:nth-child(2)", "6");
|
|
});
|
|
|
|
it("should render windDirection with an arrow", async () => {
|
|
const elem = await helpers.waitForElement(".weather .normal.medium sup i.fa-long-arrow-alt-down");
|
|
expect(elem).not.toBe(null);
|
|
expect(elem.outerHTML).toContain("transform:rotate(250deg);");
|
|
});
|
|
|
|
it("should render humidity", async () => {
|
|
await weatherFunc.getText(".weather .normal.medium span:nth-child(3)", "93.7");
|
|
});
|
|
|
|
it("should render degreeLabel for temp", async () => {
|
|
await weatherFunc.getText(".weather .large.light span.bright", "1°C");
|
|
});
|
|
|
|
it("should render degreeLabel for feels like", async () => {
|
|
await weatherFunc.getText(".weather .normal.medium.feelslike span.dimmed", "Feels like -6°C");
|
|
});
|
|
});
|
|
|
|
describe("Current weather with imperial units", () => {
|
|
beforeAll(async () => {
|
|
await weatherFunc.startApp("tests/configs/modules/weather/currentweather_units.js", {});
|
|
});
|
|
|
|
it("should render wind in imperial units", async () => {
|
|
await weatherFunc.getText(".weather .normal.medium span:nth-child(2)", "26 WSW");
|
|
});
|
|
|
|
it("should render temperatures in fahrenheit", async () => {
|
|
await weatherFunc.getText(".weather .large.light span.bright", "34,7°");
|
|
});
|
|
|
|
it("should render 'feels like' in fahrenheit", async () => {
|
|
await weatherFunc.getText(".weather .normal.medium.feelslike span.dimmed", "Feels like 21,9°");
|
|
});
|
|
});
|
|
});
|