2021-10-05 10:03:35 +02:00
|
|
|
const fs = require("fs");
|
2021-10-03 12:16:55 +02:00
|
|
|
|
2021-10-05 10:03:35 +02:00
|
|
|
beforeAll(() => {
|
|
|
|
fs.rmdirSync("./data/test", {
|
|
|
|
recursive: true,
|
|
|
|
});
|
2021-10-03 12:16:55 +02:00
|
|
|
});
|
|
|
|
|
|
|
|
afterAll(() => {
|
2021-10-05 10:03:35 +02:00
|
|
|
|
2021-10-03 12:16:55 +02:00
|
|
|
});
|
|
|
|
|
|
|
|
describe("Very Simple Test", () => {
|
|
|
|
const title = "Uptime Kuma";
|
|
|
|
|
|
|
|
beforeAll(async () => {
|
|
|
|
await page.goto("http://127.0.0.1:3002");
|
|
|
|
});
|
|
|
|
|
|
|
|
it(`should be titled "${title}"`, async () => {
|
|
|
|
await expect(page.title()).resolves.toMatch(title);
|
|
|
|
});
|
2021-10-05 10:03:35 +02:00
|
|
|
|
|
|
|
it("Create an admin account", async () => {
|
|
|
|
await page.evaluate(() => document.);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
describe("Status Page", () => {
|
|
|
|
const title = "Uptime Kuma";
|
|
|
|
beforeAll(async () => {
|
|
|
|
await page.goto("http://127.0.0.1:3002/status");
|
|
|
|
});
|
|
|
|
it(`should be titled "${title}"`, async () => {
|
|
|
|
await expect(page.title()).resolves.toMatch(title);
|
|
|
|
});
|
2021-10-03 12:16:55 +02:00
|
|
|
});
|
|
|
|
|