From eef1f16836d53a75a3d8f26d63cdb73af3eeb16d Mon Sep 17 00:00:00 2001 From: Maurice Date: Sat, 5 Sep 2026 12:56:06 +0200 Subject: [PATCH] test(e2e): locate the panel tabs by aria-label, the tab bar has a Plan button too --- client/e2e/ipad-scroll-1432.spec.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/client/e2e/ipad-scroll-1432.spec.ts b/client/e2e/ipad-scroll-1432.spec.ts index be5431c9c..c7cc854a9 100644 --- a/client/e2e/ipad-scroll-1432.spec.ts +++ b/client/e2e/ipad-scroll-1432.spec.ts @@ -44,7 +44,9 @@ test('#1432 iPad: places list is scrollable, not draggable', async ({ page }) => // An iPad is inside the 768-1023px band, where only one side panel is open at a // time so the map keeps a usable width (#2247). The places list is one tap away. - await page.getByRole('button', { name: 'Places' }).click() + // Located by the tab's own aria-label, not by role+name: the tab bar carries a + // "Plan" button of its own. + await page.locator('button[aria-label="Places"]').click() await expect(page.getByText('Place 1').first()).toBeVisible({ timeout: 20_000 }) // The context must really be the one from the bug report: coarse pointer, desktop @@ -79,7 +81,8 @@ test('#1432 iPad: places list is scrollable, not draggable', async ({ page }) => expect(['1', 'absent']).toContain(arrowOpacity) // 4. The iPad must still get the desktop shell — isMobile stayed width-based. One - // panel at a time (#2247), so opening Places closed the day plan. + // panel at a time (#2247), so opening Places closed the day plan and left its + // tab as the way back. await expect(page.locator('.leaflet-container')).toBeVisible() - await expect(page.getByRole('button', { name: 'Plan' })).toBeVisible() + await expect(page.locator('button[aria-label="Plan"]')).toBeVisible() })