mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-08-21 12:55:22 +00:00
improve waitForElement
This commit is contained in:
@@ -10,14 +10,16 @@ describe("Check configuration without modules", function () {
|
||||
});
|
||||
|
||||
it("Show the message MagicMirror title", function () {
|
||||
const elem = document.querySelector("#module_1_helloworld .module-content");
|
||||
expect(elem).not.toBe(null);
|
||||
expect(elem.textContent).toContain("Magic Mirror2");
|
||||
helpers.waitForElement("#module_1_helloworld .module-content").then((elem) => {
|
||||
expect(elem).not.toBe(null);
|
||||
expect(elem.textContent).toContain("Magic Mirror2");
|
||||
});
|
||||
});
|
||||
|
||||
it("Show the text Michael's website", function () {
|
||||
const elem = document.querySelector("#module_5_helloworld .module-content");
|
||||
expect(elem).not.toBe(null);
|
||||
expect(elem.textContent).toContain("www.michaelteeuw.nl");
|
||||
helpers.waitForElement("#module_5_helloworld .module-content").then((elem) => {
|
||||
expect(elem).not.toBe(null);
|
||||
expect(elem.textContent).toContain("www.michaelteeuw.nl");
|
||||
});
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user