mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-27 19:53:36 +00:00
Add test for showTime parameter
This commit is contained in:
parent
8589d9c482
commit
c41fff8f5c
23
tests/configs/modules/clock/clock_showTime.js
Normal file
23
tests/configs/modules/clock/clock_showTime.js
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
/* Magic Mirror Test config for default clock module
|
||||||
|
*
|
||||||
|
* By Johan Hammar
|
||||||
|
* MIT Licensed.
|
||||||
|
*/
|
||||||
|
let config = require(process.cwd() + "/tests/configs/default.js").configFactory({
|
||||||
|
timeFormat: 12,
|
||||||
|
|
||||||
|
modules: [
|
||||||
|
{
|
||||||
|
module: "clock",
|
||||||
|
position: "middle_center",
|
||||||
|
config: {
|
||||||
|
showTime: false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
});
|
||||||
|
|
||||||
|
/*************** DO NOT EDIT THE LINE BELOW ***************/
|
||||||
|
if (typeof module !== "undefined") {
|
||||||
|
module.exports = config;
|
||||||
|
}
|
@ -85,6 +85,20 @@ describe("Clock module", function () {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
describe("with showTime config disabled", function () {
|
||||||
|
beforeAll(function () {
|
||||||
|
// Set config sample for use in test
|
||||||
|
process.env.MM_CONFIG_FILE = "tests/configs/modules/clock/clock_showTime.js";
|
||||||
|
});
|
||||||
|
|
||||||
|
it("should show not show the time when digital clock is shown", async function () {
|
||||||
|
await app.client.waitUntilWindowLoaded();
|
||||||
|
const digital = await app.client.$(".clock .digital");
|
||||||
|
const time = await digital.$$(".time");
|
||||||
|
return expect(time.length).toBe(0);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
describe("with showWeek config enabled", function () {
|
describe("with showWeek config enabled", function () {
|
||||||
beforeAll(function () {
|
beforeAll(function () {
|
||||||
// Set config sample for use in test
|
// Set config sample for use in test
|
||||||
|
Loading…
x
Reference in New Issue
Block a user