From 55f48c98c3be111337d4cfed09a78022c2c8ce0d Mon Sep 17 00:00:00 2001 From: Parman Mohammadalizadeh Date: Tue, 21 Apr 2026 23:20:29 +0330 Subject: [PATCH 1/2] fix(weather): reorder daily forecast columns (#4117) --- defaultmodules/weather/forecast.njk | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/defaultmodules/weather/forecast.njk b/defaultmodules/weather/forecast.njk index 1b28ed2d2f..fa160aa17d 100644 --- a/defaultmodules/weather/forecast.njk +++ b/defaultmodules/weather/forecast.njk @@ -21,20 +21,20 @@ - {{ f.maxTemperature | roundValue | unit("temperature") | decimalSymbol }} {{ f.minTemperature | roundValue | unit("temperature") | decimalSymbol }} - {% if config.showPrecipitationAmount %} - {{ f.precipitationAmount | unit("precip", f.precipitationUnits) }} - {% endif %} - {% if config.showPrecipitationProbability %} - {{ f.precipitationProbability | unit('precip', '%') }} - {% endif %} + {{ f.maxTemperature | roundValue | unit("temperature") | decimalSymbol }} {% if config.showUVIndex %} {{ f.uvIndex }} {% endif %} + {% if config.showPrecipitationAmount %} + {{ f.precipitationAmount | unit("precip", f.precipitationUnits) }} + {% endif %} + {% if config.showPrecipitationProbability %} + {{ f.precipitationProbability | unit('precip', '%') }} + {% endif %} {% set currentStep = currentStep + 1 %} {% endfor %} From 684d63effa26727b4c4aaa2532cdb1d0582f98db Mon Sep 17 00:00:00 2001 From: Parman Mohammadalizadeh Date: Tue, 21 Apr 2026 23:36:16 +0330 Subject: [PATCH 2/2] test(weather): use class selectors for temp cells in forecast e2e tests --- tests/e2e/modules/weather_forecast_spec.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/e2e/modules/weather_forecast_spec.js b/tests/e2e/modules/weather_forecast_spec.js index 435cc98ce5..57db7d5939 100644 --- a/tests/e2e/modules/weather_forecast_spec.js +++ b/tests/e2e/modules/weather_forecast_spec.js @@ -34,7 +34,7 @@ describe("Weather module: Weather Forecast", () => { const maxTemps = ["24.4°", "21.0°", "22.9°", "23.4°", "20.6°"]; for (const [index, temp] of maxTemps.entries()) { it(`should render max temperature ${temp}`, async () => { - const maxTempCell = page.locator(`.weather table.small tr:nth-child(${index + 1}) td:nth-child(3)`); + const maxTempCell = page.locator(`.weather table.small tr:nth-child(${index + 1}) td.max-temp`); await expect(maxTempCell).toHaveText(temp); }); } @@ -42,7 +42,7 @@ describe("Weather module: Weather Forecast", () => { const minTemps = ["15.3°", "13.6°", "13.8°", "13.9°", "10.9°"]; for (const [index, temp] of minTemps.entries()) { it(`should render min temperature ${temp}`, async () => { - const minTempCell = page.locator(`.weather table.small tr:nth-child(${index + 1}) td:nth-child(4)`); + const minTempCell = page.locator(`.weather table.small tr:nth-child(${index + 1}) td.min-temp`); await expect(minTempCell).toHaveText(temp); }); } @@ -107,7 +107,7 @@ describe("Weather module: Weather Forecast", () => { const temperatures = ["75_9°", "69_8°", "73_2°", "74_1°", "69_1°"]; for (const [index, temp] of temperatures.entries()) { it(`should render custom decimalSymbol = '_' for temp ${temp}`, async () => { - const tempCell = page.locator(`.weather table.small tr:nth-child(${index + 1}) td:nth-child(3)`); + const tempCell = page.locator(`.weather table.small tr:nth-child(${index + 1}) td.max-temp`); await expect(tempCell).toHaveText(temp); }); }