Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

Match the History Resource button by its full name in E2E

rcourtman84539aad3569
diff --git a/tests/integration/tests/28-truenas-alert-resource-links.spec.ts b/tests/integration/tests/28-truenas-alert-resource-links.spec.ts
index 22a0dc5871..cd0430df87 100644
--- a/tests/integration/tests/28-truenas-alert-resource-links.spec.ts
+++ b/tests/integration/tests/28-truenas-alert-resource-links.spec.ts
@@ -214,10 +214,10 @@ test.describe("TrueNAS alert resource links", () => {
: page.locator("tr")
)
.filter({ hasText: "TrueNAS Main" })
- .filter({ has: page.getByRole("button", { name: "Resource" }) })
+ .filter({ has: page.getByRole("button", { name: /^Resource incidents for / }) })
.first();
await expect(alertItem).toBeVisible();
- await alertItem.getByRole("button", { name: "Resource" }).click();
+ await alertItem.getByRole("button", { name: /^Resource incidents for / }).click();
// Cross-link affordances into the retired standalone routes were removed
// with platform-first navigation; the canonical handoff is the resource
diff --git a/tests/integration/tests/36-vmware-alert-history-resource-incidents.spec.ts b/tests/integration/tests/36-vmware-alert-history-resource-incidents.spec.ts
index 42813dd9d4..a69b755c67 100644
--- a/tests/integration/tests/36-vmware-alert-history-resource-incidents.spec.ts
+++ b/tests/integration/tests/36-vmware-alert-history-resource-incidents.spec.ts
@@ -210,7 +210,7 @@ test.describe("VMware alert history resource incidents", () => {
await expect(historyItem).toContainText(
"VM vm-201 has VMware alarm VM replication fault (red)",
);
- await historyItem.getByRole("button", { name: "Resource" }).click();
+ await historyItem.getByRole("button", { name: /^Resource incidents for / }).click();
const incidentsHeading = page.getByRole("heading", {
name: "Resource incidents",