MagicMirror/tests/e2e/modules_display_spec.js
Kristjan ESPERANTO d9f9f41e98
Add spell check (#3544)
I felt like adding a spell checker, but it's okay if you find it
superfluous. At least then we could fix the found spell issues.

What is still missing is an automatic integration so that the spell
checker does not have to be called manually. Would it perhaps make sense
to always do it before a release?
2024-09-18 07:37:09 +02:00

25 lines
871 B
JavaScript

const helpers = require("./helpers/global-setup");
describe("Display of modules", () => {
beforeAll(async () => {
await helpers.startApplication("tests/configs/modules/display.js");
await helpers.getDocument();
});
afterAll(async () => {
await helpers.stopApplication();
});
it("should show the test header", async () => {
const elem = await helpers.waitForElement("#module_0_helloworld .module-header");
expect(elem).not.toBeNull();
// textContent returns lowercase here, the uppercase is realized by CSS, which therefore does not end up in textContent
expect(elem.textContent).toBe("test_header");
});
it("should show no header if no header text is specified", async () => {
const elem = await helpers.waitForElement("#module_1_helloworld .module-header");
expect(elem).not.toBeNull();
expect(elem.textContent).toBe("undefined");
});
});