fix e2e tests not failing on errors, disable recurring-event-tests of calendar

This commit is contained in:
Karsten Hassel
2022-09-20 23:43:06 +02:00
parent e917f40542
commit fb96cc3c72
14 changed files with 412 additions and 333 deletions

View File

@@ -1,31 +1,32 @@
const fetch = require("fetch");
const helpers = require("./global-setup");
describe("App environment", function () {
beforeAll(function (done) {
describe("App environment", () => {
beforeAll((done) => {
helpers.startApplication("tests/configs/default.js");
helpers.getDocument(done);
});
afterAll(async function () {
afterAll(async () => {
await helpers.stopApplication();
});
it("get request from http://localhost:8080 should return 200", function (done) {
it("get request from http://localhost:8080 should return 200", (done) => {
fetch("http://localhost:8080").then((res) => {
done();
expect(res.status).toBe(200);
done();
});
});
it("get request from http://localhost:8080/nothing should return 404", function (done) {
it("get request from http://localhost:8080/nothing should return 404", (done) => {
fetch("http://localhost:8080/nothing").then((res) => {
expect(res.status).toBe(404);
done();
expect(res.status).toBe(404);
});
});
it("should show the title MagicMirror²", function () {
it("should show the title MagicMirror²", (done) => {
helpers.waitForElement("title").then((elem) => {
done();
expect(elem).not.toBe(null);
expect(elem.textContent).toBe("MagicMirror²");
});