Skip to content

Commit 7d1e823

Browse files
author
veeck
committed
Add test for remoteFile option in compliments module
1 parent 8212d30 commit 7d1e823

4 files changed

Lines changed: 37 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ _This release is scheduled to be released on 2023-01-01._
1111

1212
### Added
1313

14+
- Added test for remoteFile option in compliments module
15+
1416
### Removed
1517

1618
### Updated
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"anytime": ["Remote compliment file works!"]
3+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/* MagicMirror² Test config compliments with remote file
2+
*
3+
* By Rejas
4+
* MIT Licensed.
5+
*/
6+
let config = {
7+
modules: [
8+
{
9+
module: "compliments",
10+
position: "middle_center",
11+
config: {
12+
remoteFile: "http://localhost:8080/tests/configs/data/compliments_test.json"
13+
}
14+
}
15+
]
16+
};
17+
18+
/*************** DO NOT EDIT THE LINE BELOW ***************/
19+
if (typeof module !== "undefined") {
20+
module.exports = config;
21+
}

tests/e2e/modules/compliments_spec.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,4 +85,15 @@ describe("Compliments module", () => {
8585
});
8686
});
8787
});
88+
89+
describe("remoteFile option", () => {
90+
beforeAll(async () => {
91+
helpers.startApplication("tests/configs/modules/compliments/compliments_remote.js");
92+
await helpers.getDocument();
93+
});
94+
95+
it("should show compliments from a remote file", async () => {
96+
await doTest(["Remote compliment file works!"]);
97+
});
98+
});
8899
});

0 commit comments

Comments
 (0)