Files
MagicMirror/tests/e2e/modules_display_spec.js
Karsten Hassel 5e0cd28980 update electron to v40, update node versions in workflows (#4018)
- remove param `--enable-features=UseOzonePlatform` in start electron
tests (as we did already in `package.json`)
- update node versions in github workflows, remove `22.21.1`, add `25.x`
- fix formatting in tests
- update dependencies including electron to v40

This is still a draft PR because most calendar electron tests are not
running which is caused by the electron update from `v39.3.0` to
`v40.0.0`. Maybe @KristjanESPERANTO has an idea ...

---------

Co-authored-by: Kristjan ESPERANTO <35647502+KristjanESPERANTO@users.noreply.github.com>
2026-01-24 06:15:15 -06:00

26 lines
823 B
JavaScript

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