mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-27 19:53:36 +00:00
Simplify weather-compliments test, increase timeWaitout for it
This commit is contained in:
parent
ef2fd16b69
commit
b46160bcbc
@ -15,7 +15,8 @@ describe("Weather module", function () {
|
||||
|
||||
async function setup(responses) {
|
||||
app = await helpers.startApplication({
|
||||
args: ["js/electron.js"]
|
||||
args: ["js/electron.js"],
|
||||
waitTimeout: 100000
|
||||
});
|
||||
|
||||
wdajaxstub.init(app.client, responses);
|
||||
@ -101,16 +102,7 @@ describe("Weather module", function () {
|
||||
const weather = generateWeather();
|
||||
await setup({ template, data: weather });
|
||||
|
||||
const wait = (time) => new Promise((resolve) => setTimeout(resolve, time));
|
||||
|
||||
var text = "";
|
||||
do {
|
||||
await wait(3000);
|
||||
elem = await app.client.$(".compliments");
|
||||
text = await elem.getText(".compliments .module-content span");
|
||||
} while (text === "");
|
||||
|
||||
return expect(text.trim()).to.equal("snow");
|
||||
return app.client.waitUntilTextExists(".compliments .module-content span", "snow");
|
||||
});
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user