Refactor calendar methods into util class (#3088)

Refactored some methods in calendar module:
- move methods into own file 
- dont call shorten method from titelTransform because why? just call
them after each other.
- added tests for util methods
- cleaned up other tests

---------

Co-authored-by: veeck <michael@veeck.de>
This commit is contained in:
Veeck
2023-04-09 12:49:50 +02:00
committed by GitHub
parent dee3cd3da7
commit 77f9c86774
11 changed files with 787 additions and 757 deletions

View File

@@ -25,7 +25,7 @@ describe("Compliments module", () => {
await helpers.getDocument();
});
it("Show anytime because if configure empty parts of day compliments and set anytime compliments", async () => {
it("shows anytime because if configure empty parts of day compliments and set anytime compliments", async () => {
await doTest(["Anytime here"]);
});
});
@@ -36,7 +36,7 @@ describe("Compliments module", () => {
await helpers.getDocument();
});
it("Show anytime compliments", async () => {
it("shows anytime compliments", async () => {
await doTest(["Anytime here"]);
});
});

View File

@@ -9,13 +9,13 @@ describe("Check configuration without modules", () => {
await helpers.stopApplication();
});
it("Show the message MagicMirror² title", async () => {
it("shows the message MagicMirror² title", async () => {
const elem = await helpers.waitForElement("#module_1_helloworld .module-content");
expect(elem).not.toBe(null);
expect(elem.textContent).toContain("MagicMirror²");
});
it("Show the url of michael's website", async () => {
it("shows the url of michael's website", async () => {
const elem = await helpers.waitForElement("#module_5_helloworld .module-content");
expect(elem).not.toBe(null);
expect(elem.textContent).toContain("www.michaelteeuw.nl");