cleanup and try to stabilize weather e2e tests (#3848)

The weather e2e tests are failing sometimes, failing is not really
reproducable.

After changing `updateDom(0)` to `updateDom(300)` in `weather.js` it
seems to work (we will se if it really works in the long term).

This PR contains some other weather e2e changes/cleanups/simplifying.
This commit is contained in:
Karsten Hassel
2025-07-20 08:23:52 +02:00
committed by GitHub
parent e7b669af34
commit 3fa2b96054
8 changed files with 28 additions and 30 deletions

View File

@@ -1,4 +1,4 @@
const { injectMockData } = require("../../utils/weather_mocker");
const { injectMockData, cleanupMockData } = require("../../utils/weather_mocker");
const helpers = require("./global-setup");
exports.getText = async (element, result) => {
@@ -13,7 +13,12 @@ exports.getText = async (element, result) => {
return true;
};
exports.startApp = async (configFileName, additionalMockData) => {
exports.startApplication = async (configFileName, additionalMockData) => {
await helpers.startApplication(injectMockData(configFileName, additionalMockData));
await helpers.getDocument();
};
exports.stopApplication = async () => {
await helpers.stopApplication();
cleanupMockData();
};