From f3e893fddbfc91ef155c55f845467238f98e72bc Mon Sep 17 00:00:00 2001 From: Felix Wiedenbach Date: Fri, 13 Sep 2019 15:08:44 +0200 Subject: [PATCH] it should render min and max temperatures --- tests/e2e/modules/weather_spec.js | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/tests/e2e/modules/weather_spec.js b/tests/e2e/modules/weather_spec.js index f80479eb..e2b3b7a9 100644 --- a/tests/e2e/modules/weather_spec.js +++ b/tests/e2e/modules/weather_spec.js @@ -206,9 +206,27 @@ describe("Weather module", function() { } }); - it("should render max temperature", function() {}); + it("should render max temperatures", async function() { + const weather = generateWeatherForecast(); + await setup([weather, template]); - it("should render min temperature", 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); + } + }); + + it("should render min temperatures", async function() { + const weather = generateWeatherForecast(); + await setup([weather, template]); + + 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); + } + }); it("should render fading of rows", function() {}); });