Fix precipitation styles (#3041)

They weren't applied to wrong classnames, this PR fixes that and also
expands the weather util tests

---------

Co-authored-by: veeck <michael@veeck.de>
This commit is contained in:
Veeck
2023-02-18 18:24:11 +01:00
committed by GitHub
parent 81244d961e
commit fb22a76796
8 changed files with 40 additions and 19 deletions

View File

@@ -44,18 +44,18 @@ describe("Weather module: Weather Hourly Forecast", () => {
for (const [index, amount] of amounts.entries()) {
if (amount) {
it(`should render precipitation amount ${amount}`, async () => {
await weatherFunc.getText(`.weather table.small tr:nth-child(${index + 1}) td.precipitationAmount`, amount);
await weatherFunc.getText(`.weather table.small tr:nth-child(${index + 1}) td.precipitation-amount`, amount);
});
}
}
});
describe("Shows precipitation propability", () => {
describe("Shows precipitation probability", () => {
const propabilities = [undefined, undefined, "12%", "36%", "44%"];
for (const [index, pop] of propabilities.entries()) {
if (pop) {
it(`should render propability ${pop}`, async () => {
await weatherFunc.getText(`.weather table.small tr:nth-child(${index + 1}) td.precipitationProbability`, pop);
it(`should render probability ${pop}`, async () => {
await weatherFunc.getText(`.weather table.small tr:nth-child(${index + 1}) td.precipitation-prob`, pop);
});
}
}