2021-09-23 22:52:32 +02:00
|
|
|
const helpers = require("./global-setup");
|
|
|
|
|
|
|
|
describe("Display of modules", function () {
|
|
|
|
beforeAll(function (done) {
|
2021-09-25 23:45:34 +02:00
|
|
|
helpers.startApplication("tests/configs/modules/display.js");
|
2021-10-22 22:49:10 +02:00
|
|
|
helpers.getDocument(done, 3000);
|
2021-09-23 22:52:32 +02:00
|
|
|
});
|
|
|
|
afterAll(function () {
|
2021-09-25 23:45:34 +02:00
|
|
|
helpers.stopApplication();
|
2021-09-23 22:52:32 +02:00
|
|
|
});
|
|
|
|
|
|
|
|
it("should show the test header", function () {
|
2021-09-24 23:39:12 +02:00
|
|
|
const elem = document.querySelector("#module_0_helloworld .module-header");
|
2021-09-23 22:52:32 +02:00
|
|
|
expect(elem).not.toBe(null);
|
2021-09-24 00:30:00 +02:00
|
|
|
// textContent gibt hier lowercase zurück, das uppercase wird durch css realisiert, was daher nicht in textContent landet
|
2021-09-23 22:52:32 +02:00
|
|
|
expect(elem.textContent).toBe("test_header");
|
|
|
|
});
|
|
|
|
|
|
|
|
it("should show no header if no header text is specified", function () {
|
2021-09-24 23:39:12 +02:00
|
|
|
const elem = document.querySelector("#module_1_helloworld .module-header");
|
2021-09-23 22:52:32 +02:00
|
|
|
expect(elem).not.toBe(null);
|
|
|
|
expect(elem.textContent).toBe("undefined");
|
|
|
|
});
|
|
|
|
});
|