Update some tests (#3024)

Co-authored-by: veeck <michael@veeck.de>
This commit is contained in:
Veeck
2023-02-07 00:03:08 +01:00
committed by GitHub
parent bf279d9a57
commit 1dc0a0d5b5
3 changed files with 13 additions and 7 deletions

View File

@@ -7,11 +7,8 @@ describe("Calendar module", () => {
* @param {string} cssClass css selector
*/
const doTest = async (cssClass) => {
await helpers.getElement(".calendar");
await helpers.getElement(".module-content");
const events = await global.page.locator(".event");
const elem = await events.locator(cssClass);
expect(elem).not.toBe(null);
let elem = await helpers.getElement(".calendar .module-content .event" + cssClass);
expect(await elem.isVisible()).toBe(true);
};
afterEach(async () => {
@@ -25,7 +22,7 @@ describe("Calendar module", () => {
});
it("has css class tomorrow", async () => {
await helpers.startApplication("tests/configs/modules/calendar/custom.js", "31 Dez 2029 12:30:00 GMT");
await helpers.startApplication("tests/configs/modules/calendar/custom.js", "31 Dec 2029 12:30:00 GMT");
await doTest(".tomorrow");
});
});