2021-09-23 22:52:32 +02:00
|
|
|
const helpers = require("./global-setup");
|
|
|
|
|
2022-09-20 23:43:06 +02:00
|
|
|
describe("Display of modules", () => {
|
2022-10-04 10:15:24 +02:00
|
|
|
beforeAll(async () => {
|
2021-09-25 23:45:34 +02:00
|
|
|
helpers.startApplication("tests/configs/modules/display.js");
|
2022-10-04 10:15:24 +02:00
|
|
|
await helpers.getDocument();
|
2021-09-23 22:52:32 +02: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
|
|
|
});
|
|
|
|
|
2022-10-04 10:15:24 +02:00
|
|
|
it("should show the test header", async () => {
|
|
|
|
const elem = await helpers.waitForElement("#module_0_helloworld .module-header");
|
|
|
|
expect(elem).not.toBe(null);
|
|
|
|
// textContent gibt hier lowercase zurück, das uppercase wird durch css realisiert, was daher nicht in textContent landet
|
|
|
|
expect(elem.textContent).toBe("test_header");
|
2021-09-23 22:52:32 +02:00
|
|
|
});
|
|
|
|
|
2022-10-04 10:15:24 +02:00
|
|
|
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.toBe(null);
|
|
|
|
expect(elem.textContent).toBe("undefined");
|
2021-09-23 22:52:32 +02:00
|
|
|
});
|
|
|
|
});
|