change getDocument, delay needed, now 2 tests moved

This commit is contained in:
Karsten Hassel
2021-09-24 23:39:12 +02:00
parent a1c7f20990
commit c0ce52abe3
8 changed files with 57 additions and 96 deletions

View File

@@ -3,21 +3,22 @@ let app = null;
describe("Display of modules", function () {
beforeAll(function (done) {
app = helpers.startApplication("tests/configs/modules/display.js", null, done);
app = helpers.startApplication("tests/configs/modules/display.js");
helpers.getDocument(done);
});
afterAll(function () {
helpers.stopApplication(app);
});
it("should show the test header", function () {
elem = document.querySelector("#module_0_helloworld .module-header");
const elem = document.querySelector("#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");
});
it("should show no header if no header text is specified", function () {
elem = document.querySelector("#module_1_helloworld .module-header");
const elem = document.querySelector("#module_1_helloworld .module-header");
expect(elem).not.toBe(null);
expect(elem.textContent).toBe("undefined");
});