From ab8845595748669dff674337216e54caa5da26c7 Mon Sep 17 00:00:00 2001 From: Jinjing <6427696+AmethystLiang@users.noreply.github.com> Date: Sun, 16 Aug 2026 21:52:04 -0700 Subject: [PATCH] test(e2e): fix dispatch contract and voice mic locator Point the release E2E contract at the renamed build step, and assert the relabeled microphone through the Voice pane combobox even when Radix leaves the listbox open. --- .../scripts/release-e2e-dispatch-contract.test.mjs | 5 ++--- tests/e2e/voice-microphone-selection.spec.ts | 13 ++++++++++--- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/config/scripts/release-e2e-dispatch-contract.test.mjs b/config/scripts/release-e2e-dispatch-contract.test.mjs index 7256a76bf62..4d4ebb4e3cf 100644 --- a/config/scripts/release-e2e-dispatch-contract.test.mjs +++ b/config/scripts/release-e2e-dispatch-contract.test.mjs @@ -36,12 +36,11 @@ describe('release E2E dispatch contract', () => { }) it('includes the paired-runtime web client in the shared E2E build artifact', () => { - const buildStep = e2eWorkflow.jobs.build.steps.find( - (step) => step.name === 'Build Electron app for E2E' - ) + const buildStep = e2eWorkflow.jobs.build.steps.find((step) => step.name === 'Build E2E outputs') expect(buildStep.run).toContain('electron-vite build --mode e2e') expect(buildStep.env.VITE_EXPOSE_STORE).toBe('true') expect(buildStep.run).toContain('pnpm run build:web-from-renderer') + expect(buildStep.run).toContain('pnpm run build:relay') }) }) diff --git a/tests/e2e/voice-microphone-selection.spec.ts b/tests/e2e/voice-microphone-selection.spec.ts index 135ddf8f205..29442f0d965 100644 --- a/tests/e2e/voice-microphone-selection.spec.ts +++ b/tests/e2e/voice-microphone-selection.spec.ts @@ -165,9 +165,16 @@ test.describe('Voice microphone selection', () => { state.dispatchDeviceChange() }) - await expect(microphone).toHaveText('AirPods') - await microphone.press('Space') - await expect(orcaPage.getByRole('option', { name: 'AirPods' })).toBeVisible() + // Why: a live devicechange can keep Radix's listbox open and drop the + // trigger's accessible name, so the Voice pane's only combobox is the + // stable handle — not name=Microphone. + const microphoneValue = orcaPage.getByRole('combobox') + await expect(microphoneValue).toHaveText('AirPods') + const airpodsOption = orcaPage.getByRole('option', { name: 'AirPods', exact: true }) + if ((await microphoneValue.getAttribute('aria-expanded')) !== 'true') { + await microphoneValue.press('Space') + } + await expect(airpodsOption).toBeVisible() await expect(orcaPage.getByRole('option', { name: 'AirPods (unavailable)' })).toHaveCount(0) await orcaPage.keyboard.press('Escape') await expect(readMicrophoneSettings(orcaPage)).resolves.toEqual({