Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions tests/configs/data/compliments_test.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"anytime": ["Remote compliment file works!"]
}
21 changes: 21 additions & 0 deletions tests/configs/modules/compliments/compliments_remote.js
Original file line number Diff line number Diff line change
@@ -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;
}
11 changes: 11 additions & 0 deletions tests/e2e/modules/compliments_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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!"]);
});
});
});