mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-08-27 00:16:44 +00:00
use expect where missing
This commit is contained in:
@@ -9,7 +9,7 @@ describe("Clock set to spanish language module", function () {
|
||||
await app.client.waitUntilWindowLoaded();
|
||||
const elem = await app.client.$(element);
|
||||
const txt = await elem.getText(element);
|
||||
return txt.match(regex);
|
||||
return expect(txt).toMatch(regex);
|
||||
};
|
||||
|
||||
beforeEach(function () {
|
||||
|
@@ -10,7 +10,7 @@ describe("Clock module", function () {
|
||||
await app.client.waitUntilWindowLoaded();
|
||||
const elem = await app.client.$(element);
|
||||
const txt = await elem.getText(element);
|
||||
return txt.match(regex);
|
||||
return expect(txt).toMatch(regex);
|
||||
};
|
||||
|
||||
beforeEach(function () {
|
||||
@@ -102,7 +102,7 @@ describe("Clock module", function () {
|
||||
await app.client.waitUntilWindowLoaded();
|
||||
const elem = await app.client.$(".clock .week");
|
||||
const txt = await elem.getText(".clock .week");
|
||||
return txt === weekToShow;
|
||||
return expect(txt).toBe(weekToShow);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -113,7 +113,7 @@ describe("Clock module", function () {
|
||||
});
|
||||
|
||||
it("should show the analog clock face", async () => {
|
||||
await app.client.waitUntilWindowLoaded(10000);
|
||||
await app.client.waitUntilWindowLoaded();
|
||||
const clock = await app.client.$$(".clockCircle");
|
||||
return expect(clock.length).toBe(1);
|
||||
});
|
||||
|
@@ -27,7 +27,7 @@ describe("Test helloworld module", function () {
|
||||
|
||||
it("Test message helloworld module", async function () {
|
||||
const elem = await app.client.$(".helloworld");
|
||||
return elem.getText(".helloworld") === "Test HelloWorld Module";
|
||||
return expect(await elem.getText(".helloworld")).toBe("Test HelloWorld Module");
|
||||
});
|
||||
});
|
||||
|
||||
@@ -39,7 +39,7 @@ describe("Test helloworld module", function () {
|
||||
|
||||
it("Test message helloworld module", async function () {
|
||||
const elem = await app.client.$(".helloworld");
|
||||
return elem.getText(".helloworld") === "Hello World!";
|
||||
return expect(await elem.getText(".helloworld")).toBe("Hello World!");
|
||||
});
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user