|
|
@ -225,7 +225,25 @@ describe("Init", () => { |
|
|
|
|
|
|
|
// TODO: Import Backup
|
|
|
|
|
|
|
|
// TODO: Disable Auth
|
|
|
|
it("Should disable & enable auth", async () => { |
|
|
|
await page.goto(baseURL + "/settings/security"); |
|
|
|
await click(page, "#disableAuth-btn"); |
|
|
|
await click(page, ".btn.btn-danger[data-bs-dismiss='modal']", 2); // Not a good way to do it
|
|
|
|
await page.waitForSelector("#enableAuth-btn", { timeout: 3000 }); |
|
|
|
await page.waitForSelector("#logout-btn", { |
|
|
|
hidden: true, |
|
|
|
timeout: 3000 |
|
|
|
}); |
|
|
|
|
|
|
|
const newPage = await browser.newPage(); |
|
|
|
await newPage.goto(baseURL); |
|
|
|
await newPage.waitForSelector("span.badge", { timeout: 3000 }); |
|
|
|
newPage.close(); |
|
|
|
|
|
|
|
await click(page, "#enableAuth-btn"); |
|
|
|
await login("admin", "admin123"); |
|
|
|
await page.waitForSelector("#disableAuth-btn", { timeout: 3000 }); |
|
|
|
}); |
|
|
|
|
|
|
|
it("Should clear all statistics", async () => { |
|
|
|
await page.goto(baseURL + "/settings/monitor-history"); |
|
|
|