feat(vela-ui): add placeholder push-to-talk control shell

This commit is contained in:
2026-04-08 20:04:32 +02:00
parent 0d5b53be00
commit 103bb11954
7 changed files with 204 additions and 8 deletions

View File

@@ -77,3 +77,30 @@ test('voice session shell can cancel an active mocked turn and start another one
await expect(page.getByTestId('assistant-response')).toHaveText(MOCKED_ASSISTANT_RESPONSE);
await expect(page.getByTestId('mocked-turn-status')).toHaveText('idle');
});
test('voice session shell supports a placeholder mic-control cycle before another mocked turn', async ({ page }) => {
await page.goto('/');
await expect(page.getByTestId('hydration-status')).toHaveText('ready');
await expect(page.getByTestId('mic-control-button')).toBeDisabled();
await page.getByTestId('connect-button').click();
await expect(page.getByTestId('connection-state')).toHaveText('connected');
await expect(page.getByTestId('gateway-session-state')).toHaveText('idle');
await expect(page.getByTestId('mic-control-button')).toBeEnabled();
await page.getByTestId('mic-control-button').dispatchEvent('mousedown');
await expect(page.getByTestId('mic-control-status')).toHaveText('holding');
await expect(page.getByTestId('gateway-session-state')).toHaveText('listening');
await expect(page.getByTestId('mocked-turn-button')).toBeDisabled();
await page.getByTestId('mic-control-button').dispatchEvent('mouseup');
await expect(page.getByTestId('mic-control-status')).toHaveText('idle');
await expect(page.getByTestId('gateway-session-state')).toHaveText('idle');
await expect(page.getByTestId('mocked-turn-button')).toBeEnabled();
await page.getByTestId('mocked-turn-button').click();
await expect(page.getByTestId('mocked-turn-status')).toHaveText('running');
await expect(page.getByTestId('assistant-response')).toHaveText(MOCKED_ASSISTANT_RESPONSE);
await expect(page.getByTestId('mocked-turn-status')).toHaveText('idle');
});