Add specific change-port test and fix the others

This commit is contained in:
rejas
2021-02-11 22:18:51 +01:00
parent 35f3b315a2
commit bdc4ed4d86
3 changed files with 58 additions and 13 deletions

View File

@@ -76,11 +76,11 @@ describe("Calendar module", function () {
});
});
describe("Basic auth", function () {
describe("Changed port", function () {
before(function () {
serverBasicAuth.listen(8010);
// Set config sample for use in test
process.env.MM_CONFIG_FILE = "tests/configs/modules/calendar/basic-auth.js";
process.env.MM_CONFIG_FILE = "tests/configs/modules/calendar/changed-port.js";
});
after(function (done) {
@@ -92,17 +92,23 @@ describe("Calendar module", function () {
});
});
describe("Basic auth", function () {
before(function () {
// Set config sample for use in test
process.env.MM_CONFIG_FILE = "tests/configs/modules/calendar/basic-auth.js";
});
it("should return TestEvents", function () {
return app.client.waitUntilTextExists(".calendar", "TestEvent", 10000);
});
});
describe("Basic auth by default", function () {
before(function () {
serverBasicAuth.listen(8011);
// Set config sample for use in test
process.env.MM_CONFIG_FILE = "tests/configs/modules/calendar/auth-default.js";
});
after(function (done) {
serverBasicAuth.close(done());
});
it("should return TestEvents", function () {
return app.client.waitUntilTextExists(".calendar", "TestEvent", 10000);
});
@@ -110,15 +116,10 @@ describe("Calendar module", function () {
describe("Basic auth backward compatibility configuration: DEPRECATED", function () {
before(function () {
serverBasicAuth.listen(8012);
// Set config sample for use in test
process.env.MM_CONFIG_FILE = "tests/configs/modules/calendar/old-basic-auth.js";
});
after(function (done) {
serverBasicAuth.close(done());
});
it("should return TestEvents", function () {
return app.client.waitUntilTextExists(".calendar", "TestEvent", 10000);
});