Pick the sdc disk row by kind in the TrueNAS history spec

The spec took the first table row containing "sdc". The archive pool's
Health cell now carries the copied SMART alert for /dev/sdc, so that row
matched first and the spec opened the pool drawer instead of the disk's,
then timed out waiting for the sdc drawer. Select the disk row by its
storage kind, which is what the test means.
This commit is contained in:
rcourtman
2026-10-05 06:58:37 +01:00
parent d6ccdd6943
commit 206c352bef
@@ -119,7 +119,12 @@ test.describe("TrueNAS storage disk history", () => {
await expect(search).toBeVisible({ timeout: 60_000 });
await search.fill("sdc");
const diskRow = page.locator("tr").filter({ hasText: "sdc" }).first();
// The archive pool row also mentions /dev/sdc, because its Health cell
// carries the copied SMART alert, so pick the disk row by its kind.
const diskRow = page
.locator('tr[data-truenas-storage-kind="disk"]')
.filter({ hasText: "sdc" })
.first();
await expect(diskRow).toBeVisible();
await diskRow.getByRole("button").first().click();