From fc2753ef79da3c39501126a28cf5cb98cc19f320 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Thu, 8 Oct 2026 21:10:06 +0200 Subject: [PATCH] Let the delegated-write journey add through the empty list's control An empty measurement list carries its add action in the empty state, not the header, so the write-grant journey waited on a header button that never appeared. It takes whichever add control the page shows, the way the other add flows already do. --- e2e/v137-sharing-managed-profiles.spec.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/e2e/v137-sharing-managed-profiles.spec.ts b/e2e/v137-sharing-managed-profiles.spec.ts index 6cf1ffbd0..f4e225f74 100644 --- a/e2e/v137-sharing-managed-profiles.spec.ts +++ b/e2e/v137-sharing-managed-profiles.spec.ts @@ -503,13 +503,20 @@ test.describe.serial("scoped sharing browser journeys", () => { await expect(banner).toHaveAttribute("data-record-kind", "shared"); await page.goto("/measurements"); - await expect(page.locator('[data-slot="measurement-add"]')).toBeVisible(); + // An empty list carries its add action in the empty state rather than + // the header, so the write grant shows whichever of the two applies. + const addControl = page + .locator( + '[data-slot="measurement-add"], [data-slot="measurement-add-first"]', + ) + .first(); + await expect(addControl).toBeVisible(); const post = page.waitForResponse( (response) => response.request().method() === "POST" && new URL(response.url()).pathname === "/api/measurements", ); - await page.locator('[data-slot="measurement-add"]').click(); + await addControl.click(); await page.locator("#sys").fill("124"); await page.locator("#dia").fill("78"); await page.getByRole("button", { name: /^save$/i }).click();