Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

test(human-page): update realtime mode tests for mascot-only stage\n\nThe page no longer embeds a chat rail, so the tap-and-speak composer that lived in that rail is gone. The tests are updated to reflect that when realtime is off there is no voice control at all, and when the show-both flag is on only a single realtime control appears.\n\nAuto-committed-on: macbook\n

Steven Enamakelcf89be295e6c
diff --git a/app/src/features/human/HumanPage.realtimeMode.test.tsx b/app/src/features/human/HumanPage.realtimeMode.test.tsx
index 62ce920ab1..4a7d7389ea 100644
--- a/app/src/features/human/HumanPage.realtimeMode.test.tsx
+++ b/app/src/features/human/HumanPage.realtimeMode.test.tsx
@@ -100,24 +100,27 @@ describe('HumanPage — voice entry point', () => {
expect(screen.queryByTestId('mic-composer-stub')).not.toBeInTheDocument();
});
- it('falls back to tap-and-speak when the realtime flag is off', async () => {
+ /**
+ * The page is a mascot-only stage now — it no longer embeds the chat rail, so
+ * there is no composer to fall back to. Push-to-talk lived in that rail's
+ * composer and submitted through its send path, so a
+ * `VITE_HUMAN_VOICE_REALTIME=false` build simply has no control to show here.
+ */
+ it('shows a mascot-only stage with no voice control when realtime is off', async () => {
flags.realtimeEnabled = false;
await renderPage();
- expect(screen.getByTestId('mic-composer-stub')).toBeInTheDocument();
expect(screen.queryByTestId('realtime-voice-controls-stub')).not.toBeInTheDocument();
+ expect(screen.queryByTestId('mic-composer-stub')).not.toBeInTheDocument();
});
- // Comparison mode keeps the two paths apart: the realtime control floats over
- // the mascot stage (outside the card), tap-and-speak stays in the card.
- it('shows both controls when the show-both flag is on, and not stacked', async () => {
+ // Comparison mode used to show the realtime control beside the chat rail's
+ // tap-and-speak composer. With the rail gone there is only the one control,
+ // and the assertion that matters is that show-both does not double it.
+ it('still shows a single realtime control when the show-both flag is on', async () => {
flags.showBoth = true;
await renderPage();
- expect(screen.getByTestId('realtime-voice-controls-stub')).toBeInTheDocument();
- expect(screen.getByTestId('mic-composer-stub')).toBeInTheDocument();
- // The card's slot stays empty — the realtime control is rendered outside it.
- expect(
- screen.getByTestId('conversations-stub').querySelector('[data-testid$="voice-controls-stub"]')
- ).toBeNull();
+ expect(screen.getAllByTestId('realtime-voice-controls-stub')).toHaveLength(1);
+ expect(screen.queryByTestId('mic-composer-stub')).not.toBeInTheDocument();
});
// Whichever mode is on, exactly one realtime control exists: the single-control