Files
MagicMirror/tests/e2e/modules/helloworld_spec.js
T

35 lines
981 B
JavaScript
Raw Normal View History

const { expect } = require("playwright/test");
2023-01-01 18:09:08 +01:00
const helpers = require("../helpers/global-setup");
2021-09-25 23:51:32 +02:00
describe("Test helloworld module", () => {
let page;
afterAll(async () => {
await helpers.stopApplication();
2021-09-25 23:51:32 +02:00
});
describe("helloworld set config text", () => {
2023-01-01 18:09:08 +01:00
beforeAll(async () => {
await helpers.startApplication("tests/configs/modules/helloworld/helloworld.js");
await helpers.getDocument();
page = helpers.getPage();
2021-09-25 23:51:32 +02:00
});
2023-01-01 18:09:08 +01:00
it("Test message helloworld module", async () => {
await expect(page.locator(".helloworld")).toContainText("Test HelloWorld Module");
2021-09-25 23:51:32 +02:00
});
});
describe("helloworld default config text", () => {
2023-01-01 18:09:08 +01:00
beforeAll(async () => {
await helpers.startApplication("tests/configs/modules/helloworld/helloworld_default.js");
await helpers.getDocument();
page = helpers.getPage();
2021-09-25 23:51:32 +02:00
});
2023-01-01 18:09:08 +01:00
it("Test message helloworld module", async () => {
await expect(page.locator(".helloworld")).toContainText("Hello World!");
2021-09-25 23:51:32 +02:00
});
});
});