2022-10-07 19:16:37 +02:00
|
|
|
const helpers = require("../helpers/global-setup");
|
2021-09-25 23:51:32 +02:00
|
|
|
|
2022-09-20 23:43:06 +02:00
|
|
|
describe("Test helloworld module", () => {
|
|
|
|
afterAll(async () => {
|
2022-05-27 19:46:28 +02:00
|
|
|
await helpers.stopApplication();
|
2021-09-25 23:51:32 +02:00
|
|
|
});
|
|
|
|
|
2022-09-20 23:43:06 +02:00
|
|
|
describe("helloworld set config text", () => {
|
2022-10-04 10:15:24 +02:00
|
|
|
beforeAll(async () => {
|
2022-10-29 22:34:17 +02:00
|
|
|
await helpers.startApplication("tests/configs/modules/helloworld/helloworld.js");
|
2022-10-04 10:15:24 +02:00
|
|
|
await helpers.getDocument();
|
2021-09-25 23:51:32 +02:00
|
|
|
});
|
|
|
|
|
2022-10-04 10:15:24 +02:00
|
|
|
it("Test message helloworld module", async () => {
|
|
|
|
const elem = await helpers.waitForElement(".helloworld");
|
|
|
|
expect(elem).not.toBe(null);
|
|
|
|
expect(elem.textContent).toContain("Test HelloWorld Module");
|
2021-09-25 23:51:32 +02:00
|
|
|
});
|
|
|
|
});
|
|
|
|
|
2022-09-20 23:43:06 +02:00
|
|
|
describe("helloworld default config text", () => {
|
2022-10-04 10:15:24 +02:00
|
|
|
beforeAll(async () => {
|
2022-10-29 22:34:17 +02:00
|
|
|
await helpers.startApplication("tests/configs/modules/helloworld/helloworld_default.js");
|
2022-10-04 10:15:24 +02:00
|
|
|
await helpers.getDocument();
|
2021-09-25 23:51:32 +02:00
|
|
|
});
|
|
|
|
|
2022-10-04 10:15:24 +02:00
|
|
|
it("Test message helloworld module", async () => {
|
|
|
|
const elem = await helpers.waitForElement(".helloworld");
|
|
|
|
expect(elem).not.toBe(null);
|
|
|
|
expect(elem.textContent).toContain("Hello World!");
|
2021-09-25 23:51:32 +02:00
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|