mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-10-18 02:03:31 +00:00
[weather] better null value handling for weather type (#3892)
As mentioned [here](https://github.com/MagicMirrorOrg/MagicMirror/pull/3878#issuecomment-3275344406) our weather module needs a bit better handling for null values in the type field. This pr adds this and cleans up the layout a little.
This commit is contained in:
@@ -18,12 +18,16 @@ describe("Weather module", () => {
|
||||
|
||||
it("should render temperature with icon", async () => {
|
||||
await expect(weatherFunc.getText(".weather .large span.light.bright", "1.5°")).resolves.toBe(true);
|
||||
|
||||
const elem = await helpers.waitForElement(".weather .large span.weathericon");
|
||||
expect(elem).not.toBeNull();
|
||||
});
|
||||
|
||||
it("should render feels like temperature", async () => {
|
||||
// Template contains which renders as \xa0
|
||||
await expect(weatherFunc.getText(".weather .normal.medium.feelslike span.dimmed", "93.7\xa0 Feels like -5.6°")).resolves.toBe(true);
|
||||
});
|
||||
|
||||
it("should render humidity next to feels-like", async () => {
|
||||
await expect(weatherFunc.getText(".weather .normal.medium.feelslike span.dimmed .humidity", "93.7")).resolves.toBe(true);
|
||||
});
|
||||
|
Reference in New Issue
Block a user