improve waitForElement

This commit is contained in:
Karsten Hassel
2022-01-13 21:12:15 +01:00
parent 42b80b18f8
commit 2cfafe7bfe
12 changed files with 129 additions and 108 deletions

View File

@@ -25,8 +25,9 @@ describe("App environment", function () {
});
it("should show the title MagicMirror²", function () {
const elem = document.querySelector("title");
expect(elem).not.toBe(null);
expect(elem.textContent).toBe("MagicMirror²");
helpers.waitForElement("title").then((elem) => {
expect(elem).not.toBe(null);
expect(elem.textContent).toBe("MagicMirror²");
});
});
});