2025-11-08 21:59:05 +01:00
|
|
|
const { expect } = require("playwright/test");
|
2025-05-16 16:04:18 +10:00
|
|
|
const helpers = require("../helpers/global-setup");
|
|
|
|
|
|
|
|
|
|
describe("Clock set to german language module", () => {
|
2025-11-08 21:59:05 +01:00
|
|
|
let page;
|
|
|
|
|
|
2025-05-16 16:04:18 +10:00
|
|
|
afterAll(async () => {
|
|
|
|
|
await helpers.stopApplication();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
describe("with showWeek config enabled", () => {
|
|
|
|
|
beforeAll(async () => {
|
|
|
|
|
await helpers.startApplication("tests/configs/modules/clock/de/clock_showWeek.js");
|
|
|
|
|
await helpers.getDocument();
|
2025-11-08 21:59:05 +01:00
|
|
|
page = helpers.getPage();
|
2025-05-16 16:04:18 +10:00
|
|
|
});
|
|
|
|
|
|
|
|
|
|
it("shows week with correct format", async () => {
|
|
|
|
|
const weekRegex = /^[0-9]{1,2}. Kalenderwoche$/;
|
2025-11-08 21:59:05 +01:00
|
|
|
await expect(page.locator(".clock .week")).toHaveText(weekRegex);
|
2025-05-16 16:04:18 +10:00
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
describe("with showWeek short config enabled", () => {
|
|
|
|
|
beforeAll(async () => {
|
|
|
|
|
await helpers.startApplication("tests/configs/modules/clock/de/clock_showWeek_short.js");
|
|
|
|
|
await helpers.getDocument();
|
2025-11-08 21:59:05 +01:00
|
|
|
page = helpers.getPage();
|
2025-05-16 16:04:18 +10:00
|
|
|
});
|
|
|
|
|
|
|
|
|
|
it("shows week with correct format", async () => {
|
|
|
|
|
const weekRegex = /^[0-9]{1,2}KW$/;
|
2025-11-08 21:59:05 +01:00
|
|
|
await expect(page.locator(".clock .week")).toHaveText(weekRegex);
|
2025-05-16 16:04:18 +10:00
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
});
|