mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-08-22 13:09:26 +00:00
[feature] Introduce disableNextEvent to hide next sun event (#3769)
Hello and thank you for wanting to contribute to the MagicMirror² project! **Please make sure that you have followed these 4 rules before submitting your Pull Request:** > 1. Base your pull requests against the `develop` branch. > 2. Include these infos in the description: > > - Does the pull request solve a **related** issue? No > - If so, can you reference the issue like this `Fixes #<issue_number>`? N/A > - What does the pull request accomplish? Use a list if needed. Introduce showNextEvent to show/hide next sun event > - If it includes major visual changes please add screenshots. >  > 3. Please run `npm run lint:prettier` before submitting so that > style issues are fixed. > 4. Don't forget to add an entry about your changes to > the CHANGELOG.md file. **Note**: Sometimes the development moves very fast. It is highly recommended that you update your branch of `develop` before creating a pull request to send us your changes. This makes everyone's lives easier (including yours) and helps us out on the development team. Thanks again and have a nice day! --------- Co-authored-by: BugHaver <43462320+lsaadeh@users.noreply.github.com>
This commit is contained in:
@@ -92,6 +92,9 @@ describe("Clock module", () => {
|
||||
it("should show the sun times", async () => {
|
||||
const elem = await helpers.waitForElement(".clock .digital .sun");
|
||||
expect(elem).not.toBeNull();
|
||||
|
||||
const elem2 = await helpers.waitForElement(".clock .digital .sun .fas.fa-sun");
|
||||
expect(elem2).not.toBeNull();
|
||||
});
|
||||
|
||||
it("should show the moon times", async () => {
|
||||
@@ -100,6 +103,21 @@ describe("Clock module", () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe("with showSunNextEvent disabled", () => {
|
||||
beforeAll(async () => {
|
||||
await helpers.startApplication("tests/configs/modules/clock/clock_showSunNoEvent.js");
|
||||
await helpers.getDocument();
|
||||
});
|
||||
|
||||
it("should show the sun times", async () => {
|
||||
const elem = await helpers.waitForElement(".clock .digital .sun");
|
||||
expect(elem).not.toBeNull();
|
||||
|
||||
const elem2 = document.querySelector(".clock .digital .sun .fas.fa-sun");
|
||||
expect(elem2).toBeNull();
|
||||
});
|
||||
});
|
||||
|
||||
describe("with showWeek config enabled", () => {
|
||||
beforeAll(async () => {
|
||||
await helpers.startApplication("tests/configs/modules/clock/clock_showWeek.js");
|
||||
|
Reference in New Issue
Block a user