Files
MagicMirror/tests/e2e/modules_empty_spec.js
T

24 lines
782 B
JavaScript
Raw Normal View History

2022-10-07 19:16:37 +02:00
const helpers = require("./helpers/global-setup");
2021-09-25 22:12:53 +02:00
describe("Check configuration without modules", () => {
2022-10-04 10:15:24 +02:00
beforeAll(async () => {
await helpers.startApplication("tests/configs/without_modules.js");
2022-10-04 10:15:24 +02:00
await helpers.getDocument();
2021-09-25 22:12:53 +02:00
});
afterAll(async () => {
await helpers.stopApplication();
2021-09-25 22:12:53 +02:00
});
it("shows the message MagicMirror² title", async () => {
2022-10-04 10:15:24 +02:00
const elem = await helpers.waitForElement("#module_1_helloworld .module-content");
expect(elem).not.toBe(null);
expect(elem.textContent).toContain("MagicMirror²");
2021-09-25 22:12:53 +02:00
});
it("shows the url of michael's website", async () => {
2022-10-04 10:15:24 +02:00
const elem = await helpers.waitForElement("#module_5_helloworld .module-content");
expect(elem).not.toBe(null);
expect(elem.textContent).toContain("www.michaelteeuw.nl");
2021-09-25 22:12:53 +02:00
});
});