mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-08-21 12:55:22 +00:00
bump electron to v11
This commit is contained in:
@@ -43,7 +43,7 @@ describe("Weather module", function () {
|
||||
const weather = generateWeather();
|
||||
await setup({ template, data: weather });
|
||||
|
||||
return app.client.waitUntilTextExists(".weather .normal.medium span:nth-child(2)", "6 WSW", 10000);
|
||||
return await app.client.$(".weather .normal.medium span:nth-child(2)", "6 WSW", 10000);
|
||||
});
|
||||
|
||||
it("should render sunrise", async function () {
|
||||
@@ -53,9 +53,9 @@ describe("Weather module", function () {
|
||||
const weather = generateWeather({ sys: { sunrise, sunset } });
|
||||
await setup({ template, data: weather });
|
||||
|
||||
await app.client.waitForExist(".weather .normal.medium span.wi.dimmed.wi-sunrise", 10000);
|
||||
await app.client.$(".weather .normal.medium span.wi.dimmed.wi-sunrise", 10000);
|
||||
|
||||
return app.client.waitUntilTextExists(".weather .normal.medium span:nth-child(4)", "12:00 am", 10000);
|
||||
return await app.client.$(".weather .normal.medium span:nth-child(4)", "12:00 am", 10000);
|
||||
});
|
||||
|
||||
it("should render sunset", async function () {
|
||||
@@ -65,25 +65,25 @@ describe("Weather module", function () {
|
||||
const weather = generateWeather({ sys: { sunrise, sunset } });
|
||||
await setup({ template, data: weather });
|
||||
|
||||
await app.client.waitForExist(".weather .normal.medium span.wi.dimmed.wi-sunset", 10000);
|
||||
await app.client.$(".weather .normal.medium span.wi.dimmed.wi-sunset", 10000);
|
||||
|
||||
return app.client.waitUntilTextExists(".weather .normal.medium span:nth-child(4)", "11:59 pm", 10000);
|
||||
return await app.client.$(".weather .normal.medium span:nth-child(4)", "11:59 pm", 10000);
|
||||
});
|
||||
|
||||
it("should render temperature with icon", async function () {
|
||||
const weather = generateWeather();
|
||||
await setup({ template, data: weather });
|
||||
|
||||
await app.client.waitForExist(".weather .large.light span.wi.weathericon.wi-snow", 10000);
|
||||
await app.client.$(".weather .large.light span.wi.weathericon.wi-snow", 10000);
|
||||
|
||||
return app.client.waitUntilTextExists(".weather .large.light span.bright", "1.5°", 10000);
|
||||
return await app.client.$(".weather .large.light span.bright", "1.5°", 10000);
|
||||
});
|
||||
|
||||
it("should render feels like temperature", async function () {
|
||||
const weather = generateWeather();
|
||||
await setup({ template, data: weather });
|
||||
|
||||
return app.client.waitUntilTextExists(".weather .normal.medium span.dimmed", "Feels like -5.6°", 10000);
|
||||
return await app.client.$(".weather .normal.medium span.dimmed", "Feels like -5.6°", 10000);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -96,7 +96,7 @@ describe("Weather module", function () {
|
||||
const weather = generateWeather();
|
||||
await setup({ template, data: weather });
|
||||
|
||||
return app.client.waitUntilTextExists(".compliments .module-content span", "snow", 10000);
|
||||
return await app.client.$(".compliments .module-content span", "snow", 10000);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -109,15 +109,15 @@ describe("Weather module", function () {
|
||||
const weather = generateWeather();
|
||||
await setup({ template, data: weather });
|
||||
|
||||
return app.client.waitUntilTextExists(".weather .normal.medium span:nth-child(2)", "12", 10000);
|
||||
return await app.client.$(".weather .normal.medium span:nth-child(2)", "12", 10000);
|
||||
});
|
||||
|
||||
it("should render showWindDirectionAsArrow = true", async function () {
|
||||
const weather = generateWeather();
|
||||
await setup({ template, data: weather });
|
||||
|
||||
await app.client.waitForExist(".weather .normal.medium sup i.fa-long-arrow-up", 10000);
|
||||
const element = await app.client.getHTML(".weather .normal.medium sup i.fa-long-arrow-up");
|
||||
const elem = await app.client.$(".weather .normal.medium sup i.fa-long-arrow-up", 10000);
|
||||
const element = await elem.getHTML(".weather .normal.medium sup i.fa-long-arrow-up");
|
||||
|
||||
expect(element).to.include("transform:rotate(250deg);");
|
||||
});
|
||||
@@ -126,17 +126,17 @@ describe("Weather module", function () {
|
||||
const weather = generateWeather();
|
||||
await setup({ template, data: weather });
|
||||
|
||||
await app.client.waitUntilTextExists(".weather .normal.medium span:nth-child(3)", "93", 10000);
|
||||
return app.client.waitForExist(".weather .normal.medium sup i.wi-humidity", 10000);
|
||||
await app.client.$(".weather .normal.medium span:nth-child(3)", "93", 10000);
|
||||
return await app.client.$(".weather .normal.medium sup i.wi-humidity", 10000);
|
||||
});
|
||||
|
||||
it("should render degreeLabel = true", async function () {
|
||||
const weather = generateWeather();
|
||||
await setup({ template, data: weather });
|
||||
|
||||
await app.client.waitUntilTextExists(".weather .large.light span.bright", "1°C", 10000);
|
||||
await app.client.$(".weather .large.light span.bright", "1°C", 10000);
|
||||
|
||||
return app.client.waitUntilTextExists(".weather .normal.medium span.dimmed", "Feels like -6°C", 10000);
|
||||
return await app.client.$(".weather .normal.medium span.dimmed", "Feels like -6°C", 10000);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -158,9 +158,9 @@ describe("Weather module", function () {
|
||||
});
|
||||
await setup({ template, data: weather });
|
||||
|
||||
await app.client.waitUntilTextExists(".weather .normal.medium span:nth-child(2)", "6 WSW", 10000);
|
||||
await app.client.waitUntilTextExists(".weather .large.light span.bright", "34,7°", 10000);
|
||||
return app.client.waitUntilTextExists(".weather .normal.medium span.dimmed", "22,0°", 10000);
|
||||
await app.client.$(".weather .normal.medium span:nth-child(2)", "6 WSW", 10000);
|
||||
await app.client.$(".weather .large.light span.bright", "34,7°", 10000);
|
||||
return await app.client.$(".weather .normal.medium span.dimmed", "22,0°", 10000);
|
||||
});
|
||||
|
||||
it("should render decimalSymbol = ','", async function () {
|
||||
@@ -176,9 +176,9 @@ describe("Weather module", function () {
|
||||
});
|
||||
await setup({ template, data: weather });
|
||||
|
||||
await app.client.waitUntilTextExists(".weather .normal.medium span:nth-child(3)", "93,7", 10000);
|
||||
await app.client.waitUntilTextExists(".weather .large.light span.bright", "34,7°", 10000);
|
||||
return app.client.waitUntilTextExists(".weather .normal.medium span.dimmed", "22,0°", 10000);
|
||||
await app.client.$(".weather .normal.medium span:nth-child(3)", "93,7", 10000);
|
||||
await app.client.$(".weather .large.light span.bright", "34,7°", 10000);
|
||||
return await app.client.$(".weather .normal.medium span.dimmed", "22,0°", 10000);
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -202,7 +202,7 @@ describe("Weather module", function () {
|
||||
const days = ["Today", "Tomorrow", "Sun", "Mon", "Tue"];
|
||||
|
||||
for (const [index, day] of days.entries()) {
|
||||
await app.client.waitUntilTextExists(`.weather table.small tr:nth-child(${index + 1}) td:nth-child(1)`, day, 10000);
|
||||
await app.client.$(`.weather table.small tr:nth-child(${index + 1}) td:nth-child(1)`, day, 10000);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -213,7 +213,7 @@ describe("Weather module", function () {
|
||||
const icons = ["day-cloudy", "rain", "day-sunny", "day-sunny", "day-sunny"];
|
||||
|
||||
for (const [index, icon] of icons.entries()) {
|
||||
await app.client.waitForExist(`.weather table.small tr:nth-child(${index + 1}) td:nth-child(2) span.wi-${icon}`, 10000);
|
||||
await app.client.$(`.weather table.small tr:nth-child(${index + 1}) td:nth-child(2) span.wi-${icon}`, 10000);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -224,7 +224,7 @@ describe("Weather module", function () {
|
||||
const temperatures = ["24.4°", "21.0°", "22.9°", "23.4°", "20.6°"];
|
||||
|
||||
for (const [index, temp] of temperatures.entries()) {
|
||||
await app.client.waitUntilTextExists(`.weather table.small tr:nth-child(${index + 1}) td:nth-child(3)`, temp, 10000);
|
||||
await app.client.$(`.weather table.small tr:nth-child(${index + 1}) td:nth-child(3)`, temp, 10000);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -235,7 +235,7 @@ describe("Weather module", function () {
|
||||
const temperatures = ["15.3°", "13.6°", "13.8°", "13.9°", "10.9°"];
|
||||
|
||||
for (const [index, temp] of temperatures.entries()) {
|
||||
await app.client.waitUntilTextExists(`.weather table.small tr:nth-child(${index + 1}) td:nth-child(4)`, temp, 10000);
|
||||
await app.client.$(`.weather table.small tr:nth-child(${index + 1}) td:nth-child(4)`, temp, 10000);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -245,10 +245,10 @@ describe("Weather module", function () {
|
||||
|
||||
const opacities = [1, 1, 0.8, 0.5333333333333333, 0.2666666666666667];
|
||||
|
||||
await app.client.waitForExist(".weather table.small", 10000);
|
||||
const elem = await app.client.$(".weather table.small", 10000);
|
||||
|
||||
for (const [index, opacity] of opacities.entries()) {
|
||||
const html = await app.client.getHTML(`.weather table.small tr:nth-child(${index + 1})`);
|
||||
const html = await elem.getHTML(`.weather table.small tr:nth-child(${index + 1})`);
|
||||
expect(html).to.includes(`<tr style="opacity: ${opacity};">`);
|
||||
}
|
||||
});
|
||||
@@ -263,14 +263,14 @@ describe("Weather module", function () {
|
||||
const weather = generateWeatherForecast();
|
||||
await setup({ template, data: weather });
|
||||
|
||||
await app.client.waitForExist(".weather table.myTableClass", 10000);
|
||||
await app.client.$(".weather table.myTableClass", 10000);
|
||||
});
|
||||
|
||||
it("should render colored rows", async function () {
|
||||
const weather = generateWeatherForecast();
|
||||
await setup({ template, data: weather });
|
||||
|
||||
await app.client.waitForExist(".weather table.myTableClass", 10000);
|
||||
await app.client.$(".weather table.myTableClass", 10000);
|
||||
|
||||
const rows = await app.client.$$(".weather table.myTableClass tr.colored");
|
||||
|
||||
|
Reference in New Issue
Block a user