Skip to content

Commit 95fbec8

Browse files
author
veeck
committed
fix wrong condition and add test
1 parent e1498e5 commit 95fbec8

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

modules/default/weather/current.njk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
{% endif %}
6060
</span>
6161
{% endif %}
62-
{% if config.weatherType %}
62+
{% if current.weatherType %}
6363
<span class="light wi weathericon wi-{{ current.weatherType }}"></span>
6464
{% endif %}
6565
<span class="light bright">{{ current.temperature | roundValue | unit("temperature") | decimalSymbol }}</span>

tests/e2e/modules/weather_current_spec.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,16 @@ describe("Weather module", () => {
1818

1919
it("should render temperature with icon", async () => {
2020
await expect(weatherFunc.getText(".weather .large span.light.bright", "1.5°")).resolves.toBe(true);
21+
22+
const elem = await helpers.waitForElement(".weather .large span.weathericon");
23+
expect(elem).not.toBeNull();
2124
});
2225

2326
it("should render feels like temperature", async () => {
2427
// Template contains &nbsp; which renders as \xa0
2528
await expect(weatherFunc.getText(".weather .normal.medium.feelslike span.dimmed", "93.7\xa0 Feels like -5.6°")).resolves.toBe(true);
2629
});
30+
2731
it("should render humidity next to feels-like", async () => {
2832
await expect(weatherFunc.getText(".weather .normal.medium.feelslike span.dimmed .humidity", "93.7")).resolves.toBe(true);
2933
});

0 commit comments

Comments
 (0)