it should render days and icons in weather forecast

This commit is contained in:
Felix Wiedenbach 2019-09-13 14:58:04 +02:00
parent fbceab707e
commit 11e144ca64

View File

@ -184,9 +184,27 @@ describe("Weather module", function() {
process.env.MM_CONFIG_FILE = "tests/configs/modules/weather/forecastweather_default.js"; process.env.MM_CONFIG_FILE = "tests/configs/modules/weather/forecastweather_default.js";
}); });
it("should render days", function() {}); it("should render days", async function() {
const weather = generateWeatherForecast();
await setup([weather, template]);
it("should render icon", function() {}); const days = ["Fri", "Sat", "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);
}
});
it("should render icons", async function() {
const weather = generateWeatherForecast();
await setup([weather, template]);
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);
}
});
it("should render max temperature", function() {}); it("should render max temperature", function() {});