Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions defaultmodules/weather/forecast.njk
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,20 @@
<td class="bright weather-icon">
<span class="wi weathericon wi-{{ f.weatherType }}"></span>
</td>
<td class="align-right bright max-temp">{{ f.maxTemperature | roundValue | unit("temperature") | decimalSymbol }}</td>
<td class="align-right min-temp">{{ f.minTemperature | roundValue | unit("temperature") | decimalSymbol }}</td>
{% if config.showPrecipitationAmount %}
<td class="align-right bright precipitation-amount">{{ f.precipitationAmount | unit("precip", f.precipitationUnits) }}</td>
{% endif %}
{% if config.showPrecipitationProbability %}
<td class="align-right bright precipitation-prob">{{ f.precipitationProbability | unit('precip', '%') }}</td>
{% endif %}
<td class="align-right bright max-temp">{{ f.maxTemperature | roundValue | unit("temperature") | decimalSymbol }}</td>
{% if config.showUVIndex %}
<td class="align-right dimmed uv-index">
{{ f.uvIndex }}
<span class="wi dimmed weathericon wi-hot"></span>
</td>
{% endif %}
{% if config.showPrecipitationAmount %}
<td class="align-right bright precipitation-amount">{{ f.precipitationAmount | unit("precip", f.precipitationUnits) }}</td>
{% endif %}
{% if config.showPrecipitationProbability %}
<td class="align-right bright precipitation-prob">{{ f.precipitationProbability | unit('precip', '%') }}</td>
{% endif %}
</tr>
{% set currentStep = currentStep + 1 %}
{% endfor %}
Expand Down
6 changes: 3 additions & 3 deletions tests/e2e/modules/weather_forecast_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ 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);
});
}

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);
});
}
Expand Down Expand Up @@ -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);
});
}
Expand Down
Loading