mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-28 04:02:12 +00:00
Add test module calendar fail basic auth
This commit is contained in:
parent
b129fe908c
commit
6802873cd1
44
tests/configs/modules/calendar/fail-basic-auth.js
Normal file
44
tests/configs/modules/calendar/fail-basic-auth.js
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
/* Magic Mirror Test calendar calendar
|
||||||
|
*
|
||||||
|
* This configuration is a wrong authentication
|
||||||
|
*
|
||||||
|
* By Rodrigo Ramírez Norambuena https://rodrigoramirez.com
|
||||||
|
* MIT Licensed.
|
||||||
|
*/
|
||||||
|
|
||||||
|
var config = {
|
||||||
|
port: 8080,
|
||||||
|
ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"],
|
||||||
|
|
||||||
|
language: "en",
|
||||||
|
timeFormat: 12,
|
||||||
|
units: "metric",
|
||||||
|
electronOptions: {
|
||||||
|
webPreferences: {
|
||||||
|
nodeIntegration: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
modules: [
|
||||||
|
{
|
||||||
|
module: "calendar",
|
||||||
|
position: "bottom_bar",
|
||||||
|
config: {
|
||||||
|
calendars: [
|
||||||
|
{
|
||||||
|
maximumNumberOfDays: 10000,
|
||||||
|
url: "http://localhost:8020/tests/configs/data/calendar_test.ics",
|
||||||
|
auth: {
|
||||||
|
user: "MagicMirror",
|
||||||
|
pass: "StairwayToHeaven",
|
||||||
|
method: "basic"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
};
|
||||||
|
|
||||||
|
/*************** DO NOT EDIT THE LINE BELOW ***************/
|
||||||
|
if (typeof module !== "undefined") {module.exports = config;}
|
@ -65,6 +65,17 @@ describe("Calendar module", function () {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
describe("Fail Basic auth", function() {
|
||||||
|
before(function() {
|
||||||
|
serverBasicAuth.listen(8020);
|
||||||
|
// Set config sample for use in test
|
||||||
|
process.env.MM_CONFIG_FILE = "tests/configs/modules/calendar/fail-basic-auth.js";
|
||||||
|
});
|
||||||
|
|
||||||
|
it("Should return No upcoming events", function () {
|
||||||
|
return app.client.waitUntilTextExists(".calendar", "No upcoming events.", 10000);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user