Debian Codegraph @

test/playwright/tests/logs.spec.mjs

raw
1 import {expect, test} from "@playwright/test";
2 import {login} from "../helpers/auth.mjs";
3
4 test("Logs page displays recent errors and allows refresh", async ({page}, testInfo) => {
5 const {enablePassword} = testInfo.project.use.rspamdPasswords;
6 await login(page, enablePassword);
7
8 await page.locator("#history_nav").click();
9 await expect(page.locator("#errorsLog")).toBeVisible();
10 const rowCount = await page.locator("#errorsLog tbody tr").count();
11 expect(rowCount).toBeGreaterThan(0);
12 await page.locator("#updateErrors").click();
13 await expect(page.locator("#errorsLog")).toBeVisible();
14 });