mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-08-21 12:55:22 +00:00
Fix undefined error for showSunTime / showMoonTime in clock module (#3146)
Fixes #3143 and adds tests for showSunTime / showMoonTime
This commit is contained in:
@@ -71,11 +71,28 @@ describe("Clock module", () => {
|
||||
});
|
||||
|
||||
it("should not show the time when digital clock is shown", async () => {
|
||||
const elem = await document.querySelector(".clock .digital .time");
|
||||
const elem = document.querySelector(".clock .digital .time");
|
||||
expect(elem).toBe(null);
|
||||
});
|
||||
});
|
||||
|
||||
describe("with showSun/MoonTime enabled", () => {
|
||||
beforeAll(async () => {
|
||||
await helpers.startApplication("tests/configs/modules/clock/clock_showSunMoon.js");
|
||||
await helpers.getDocument();
|
||||
});
|
||||
|
||||
it("should show the sun times", async () => {
|
||||
const elem = await helpers.waitForElement(".clock .digital .sun");
|
||||
expect(elem).not.toBe(null);
|
||||
});
|
||||
|
||||
it("should show the moon times", async () => {
|
||||
const elem = await helpers.waitForElement(".clock .digital .moon");
|
||||
expect(elem).not.toBe(null);
|
||||
});
|
||||
});
|
||||
|
||||
describe("with showWeek config enabled", () => {
|
||||
beforeAll(async () => {
|
||||
await helpers.startApplication("tests/configs/modules/clock/clock_showWeek.js");
|
||||
|
Reference in New Issue
Block a user