mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-27 19:53:36 +00:00
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?
25 lines
871 B
JavaScript
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");
|
|
});
|
|
});
|