diff --git a/CHANGELOG.md b/CHANGELOG.md index aa421222..9082f6c8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,8 @@ _This release is scheduled to be released on 2023-01-01._ ### Added +- Added test for remoteFile option in compliments module + ### Removed ### Updated diff --git a/tests/configs/data/compliments_test.json b/tests/configs/data/compliments_test.json new file mode 100644 index 00000000..fa1d0b9c --- /dev/null +++ b/tests/configs/data/compliments_test.json @@ -0,0 +1,3 @@ +{ + "anytime": ["Remote compliment file works!"] +} diff --git a/tests/configs/modules/compliments/compliments_remote.js b/tests/configs/modules/compliments/compliments_remote.js new file mode 100644 index 00000000..2b31f2cc --- /dev/null +++ b/tests/configs/modules/compliments/compliments_remote.js @@ -0,0 +1,21 @@ +/* MagicMirror² Test config compliments with remote file + * + * By Rejas + * MIT Licensed. + */ +let config = { + modules: [ + { + module: "compliments", + position: "middle_center", + config: { + remoteFile: "http://localhost:8080/tests/configs/data/compliments_test.json" + } + } + ] +}; + +/*************** DO NOT EDIT THE LINE BELOW ***************/ +if (typeof module !== "undefined") { + module.exports = config; +} diff --git a/tests/e2e/modules/compliments_spec.js b/tests/e2e/modules/compliments_spec.js index faf1d6c3..74797797 100644 --- a/tests/e2e/modules/compliments_spec.js +++ b/tests/e2e/modules/compliments_spec.js @@ -85,4 +85,15 @@ describe("Compliments module", () => { }); }); }); + + describe("remoteFile option", () => { + beforeAll(async () => { + helpers.startApplication("tests/configs/modules/compliments/compliments_remote.js"); + await helpers.getDocument(); + }); + + it("should show compliments from a remote file", async () => { + await doTest(["Remote compliment file works!"]); + }); + }); });