2025-11-08 21:59:05 +01:00
|
|
|
const { expect } = require("playwright/test");
|
2023-01-01 18:09:08 +01:00
|
|
|
const helpers = require("./helpers/global-setup");
|
2021-09-23 22:52:32 +02:00
|
|
|
|
2022-09-20 23:43:06 +02:00
|
|
|
describe("Display of modules", () => {
|
2025-11-08 21:59:05 +01:00
|
|
|
let page;
|
|
|
|
|
|
2023-01-01 18:09:08 +01:00
|
|
|
beforeAll(async () => {
|
|
|
|
|
await helpers.startApplication("tests/configs/modules/display.js");
|
|
|
|
|
await helpers.getDocument();
|
2025-11-08 21:59:05 +01:00
|
|
|
page = helpers.getPage();
|
2021-09-23 22:52:32 +02:00
|
|
|
});
|
2026-01-24 13:15:15 +01:00
|
|
|
|
2022-09-20 23:43:06 +02:00
|
|
|
afterAll(async () => {
|
2022-05-27 19:46:28 +02:00
|
|
|
await helpers.stopApplication();
|
2021-09-23 22:52:32 +02:00
|
|
|
});
|
|
|
|
|
|
2023-01-01 18:09:08 +01:00
|
|
|
it("should show the test header", async () => {
|
2024-09-18 07:37:09 +02:00
|
|
|
// textContent returns lowercase here, the uppercase is realized by CSS, which therefore does not end up in textContent
|
2025-11-08 21:59:05 +01:00
|
|
|
await expect(page.locator("#module_0_helloworld .module-header")).toHaveText("test_header");
|
2021-09-23 22:52:32 +02:00
|
|
|
});
|
|
|
|
|
|
2023-01-01 18:09:08 +01:00
|
|
|
it("should show no header if no header text is specified", async () => {
|
2025-11-08 21:59:05 +01:00
|
|
|
await expect(page.locator("#module_1_helloworld .module-header")).toHaveText("undefined");
|
2021-09-23 22:52:32 +02:00
|
|
|
});
|
|
|
|
|
});
|