2022-10-24 19:41:34 +02:00
|
|
|
const helpers = require("../helpers/global-setup");
|
|
|
|
const weatherHelper = require("../helpers/weather-setup");
|
2023-09-22 14:45:46 +02:00
|
|
|
const { cleanupMockData } = require("../../utils/weather_mocker");
|
2022-10-24 19:41:34 +02:00
|
|
|
|
|
|
|
describe("Weather module", () => {
|
|
|
|
afterEach(async () => {
|
|
|
|
await helpers.stopApplication();
|
2023-09-22 14:45:46 +02:00
|
|
|
await cleanupMockData();
|
2022-10-24 19:41:34 +02:00
|
|
|
});
|
|
|
|
|
|
|
|
describe("Current weather with sunrise", () => {
|
|
|
|
beforeAll(async () => {
|
|
|
|
await weatherHelper.startApp("tests/configs/modules/weather/currentweather_default.js", "13 Jan 2019 00:30:00 GMT");
|
|
|
|
});
|
|
|
|
|
|
|
|
it("should render sunrise", async () => {
|
|
|
|
await weatherHelper.getText(".weather .normal.medium span:nth-child(4)", "7:00 am");
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
describe("Current weather with sunset", () => {
|
|
|
|
beforeAll(async () => {
|
|
|
|
await weatherHelper.startApp("tests/configs/modules/weather/currentweather_default.js", "13 Jan 2019 12:30:00 GMT");
|
|
|
|
});
|
|
|
|
|
|
|
|
it("should render sunset", async () => {
|
|
|
|
await weatherHelper.getText(".weather .normal.medium span:nth-child(4)", "3:45 pm");
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|