mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-12-12 09:52:37 +00:00
[cosmetic] Weather module humidity positioning (#3330)
This PR adds an option to tweak the layout of the weather module. When set, the humidity appears alongside the temperature: 
This commit is contained in:
@@ -7,6 +7,7 @@ let config = {
|
||||
position: "bottom_bar",
|
||||
config: {
|
||||
location: "Munich",
|
||||
showHumidity: "feelslike",
|
||||
mockData: '"#####WEATHERDATA#####"'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ let config = {
|
||||
windUnits: "beaufort",
|
||||
showWindDirectionAsArrow: true,
|
||||
showSun: false,
|
||||
showHumidity: true,
|
||||
showHumidity: "wind",
|
||||
roundTemp: true,
|
||||
degreeLabel: true
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ let config = {
|
||||
location: "Munich",
|
||||
mockData: '"#####WEATHERDATA#####"',
|
||||
decimalSymbol: ",",
|
||||
showHumidity: true
|
||||
showHumidity: "wind"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -23,7 +23,11 @@ describe("Weather module", () => {
|
||||
});
|
||||
|
||||
it("should render feels like temperature", async () => {
|
||||
await expect(weatherFunc.getText(".weather .normal.medium.feelslike span.dimmed", "Feels like -5.6°")).resolves.toBe(true);
|
||||
// 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);
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -53,8 +57,8 @@ describe("Weather module", () => {
|
||||
expect(elem.outerHTML).toContain("transform:rotate(250deg)");
|
||||
});
|
||||
|
||||
it("should render humidity", async () => {
|
||||
await expect(weatherFunc.getText(".weather .normal.medium span:nth-child(3)", "93.7")).resolves.toBe(true);
|
||||
it("should render humidity next to wind", async () => {
|
||||
await expect(weatherFunc.getText(".weather .normal.medium .humidity", "93.7")).resolves.toBe(true);
|
||||
});
|
||||
|
||||
it("should render degreeLabel for temp", async () => {
|
||||
|
||||
Reference in New Issue
Block a user