diff --git a/core/http/react-ui/e2e/import-form-ux-batch-d.spec.js b/core/http/react-ui/e2e/import-form-ux-batch-d.spec.js index 26fe2f0cc..30a74de89 100644 --- a/core/http/react-ui/e2e/import-form-ux-batch-d.spec.js +++ b/core/http/react-ui/e2e/import-form-ux-batch-d.spec.js @@ -52,10 +52,10 @@ async function enterPowerPreferences(page) { } // Backend dropdown trigger — the SearchableSelect button has -// `aria-haspopup="listbox"`. There's exactly one on the Power/Preferences -// page so the first match is stable. +// `aria-haspopup="listbox"`. The LanguageSwitcher in the sidebar uses the +// same attribute, so scope to the
content area to skip it. function backendTrigger(page) { - return page.locator('button[aria-haspopup="listbox"]').first() + return page.locator('main button[aria-haspopup="listbox"]').first() } async function selectBackend(page, name) { diff --git a/core/http/react-ui/e2e/import-form-ux-batch-e.spec.js b/core/http/react-ui/e2e/import-form-ux-batch-e.spec.js index ace9bb43a..8a20abc90 100644 --- a/core/http/react-ui/e2e/import-form-ux-batch-e.spec.js +++ b/core/http/react-ui/e2e/import-form-ux-batch-e.spec.js @@ -59,7 +59,10 @@ function chip(page, key) { } function backendTrigger(page) { - return page.locator('button[aria-haspopup="listbox"]').first() + // Scope to
: the LanguageSwitcher in the sidebar also uses + // aria-haspopup="listbox", so an unscoped .first() selector picks it + // instead of the backend dropdown. + return page.locator('main button[aria-haspopup="listbox"]').first() } test.describe('Import form UX — Batch E (modality chip row)', () => {