refactor web pagination and add partitioned events, flap/timeout showcase agents
This commit is contained in:
@@ -17,7 +17,7 @@ test("agents list links to detail", async ({ page }) => {
|
||||
await expect(page.locator("thead")).not.toContainText("asc");
|
||||
await expect(page.locator("thead")).not.toContainText("desc");
|
||||
await expect(page.locator("thead")).toContainText("↓");
|
||||
await expect(page.locator("body")).toContainText("checks 2");
|
||||
await expect(page.locator("body")).toContainText("checks 3");
|
||||
await expect(page.locator("body")).toContainText("warn 1");
|
||||
await expect(page.getByRole("button", { name: /Timezone: default/ })).toBeVisible();
|
||||
await page.getByRole("button", { name: /Timezone: default/ }).click();
|
||||
@@ -73,7 +73,7 @@ test("checks page lists rows", async ({ page }) => {
|
||||
await expect(page.locator("body")).toContainText("host-1");
|
||||
await expect(page.locator("body")).toContainText("disk ok");
|
||||
await page.getByRole("link", { name: "Events" }).last().click();
|
||||
await expect(page).toHaveURL(/\/checks\/disk\?tab=events$/);
|
||||
await expect(page).toHaveURL(/\/checks\/disk\?tab=events(?:&events_limit=\d+)?$/);
|
||||
await expect(page.locator("body")).toContainText("12");
|
||||
await expect(page.locator("thead").last()).not.toContainText("exit");
|
||||
});
|
||||
@@ -83,7 +83,6 @@ test("incidents filter renders", async ({ page }) => {
|
||||
await expect(page.locator("body")).toContainText("load high");
|
||||
await expect(page.locator("thead")).toContainText("HOST");
|
||||
await expect(page.locator("thead")).not.toContainText("agent_id");
|
||||
await expect(page.locator("thead")).toContainText("↓");
|
||||
await expect(page.locator("tbody")).toContainText("host-1");
|
||||
await expect(page.locator("tbody")).toContainText("agent_liveness");
|
||||
await expect(page.locator("tbody")).toContainText("agent is dead");
|
||||
@@ -91,10 +90,7 @@ test("incidents filter renders", async ({ page }) => {
|
||||
await expect(page).toHaveURL(/\/checks\/agent_liveness$/);
|
||||
await expect(page.locator("body")).toContainText("host-2");
|
||||
await page.goto("/incidents");
|
||||
await page.getByRole("button", { name: /^HOST/ }).click();
|
||||
await expect(page).toHaveURL(/\/incidents$/);
|
||||
await expect(page.locator("thead")).toContainText("↑");
|
||||
await page.getByRole("link", { name: "host-1" }).click();
|
||||
await page.getByRole("link", { name: "host-1" }).first().click();
|
||||
await expect(page).toHaveURL(/\/agents\/agent-1$/);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user