Skip to content

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

test(playwright): update voice and tool-result specs for shipped UI

Steven Enamakelca7f65a0739c
diff --git a/app/test/playwright/specs/aui-tool-result-elements.spec.ts b/app/test/playwright/specs/aui-tool-result-elements.spec.ts
index b27356d9b0..1e5f4b3dae 100644
--- a/app/test/playwright/specs/aui-tool-result-elements.spec.ts
+++ b/app/test/playwright/specs/aui-tool-result-elements.spec.ts
@@ -33,6 +33,8 @@
* generated document titles. They remain separate from grouped task insights.
*/
import { expect, type Locator, type Page, test } from '@playwright/test';
+import { mkdir, writeFile } from 'node:fs/promises';
+import path from 'node:path';
import {
resetMock,
@@ -49,6 +51,18 @@ import {
} from '../helpers/core-rpc';
const USER_ID = 'pw-aui-tool-result-elements';
+const GITHUB_REPOSITORY_ACTION = 'GITHUB_LIST_REPOSITORIES_FOR_THE_AUTHENTICATED_USER';
+
+function makeComposioTool(name: string) {
+ return {
+ type: 'function',
+ function: {
+ name,
+ description: 'List repositories for the authenticated user',
+ parameters: { type: 'object', properties: {} },
+ },
+ };
+}
async function openChat(page: Page): Promise<string> {
await bootAuthenticatedPage(page, USER_ID, '/chat');
@@ -152,6 +166,7 @@ test.describe('assistant-ui tool-result elements', () => {
'composioConnections',
JSON.stringify([{ id: 'conn-github', toolkit: 'github', status: 'ACTIVE' }])
);
+ await setMockBehavior('composioTools', JSON.stringify([makeComposioTool(GITHUB_REPOSITORY_ACTION)]));
});
// ── elements/code-diff.tsx ────────────────────────────────────────────
@@ -161,6 +176,11 @@ test.describe('assistant-ui tool-result elements', () => {
}) => {
const threadId = await openChat(page);
const PROMPT = 'AUI-DIFF-CASE raise the retry count and the timeout';
+ const actionDir = process.env.OPENHUMAN_ACTION_DIR;
+ if (!actionDir) throw new Error('The web E2E session did not provide OPENHUMAN_ACTION_DIR');
+ const fixturePath = path.join(actionDir, 'e2e/aui/diff-subject.ts');
+ await mkdir(path.dirname(fixturePath), { recursive: true });
+ await writeFile(fixturePath, 'const retries = 1;\nconst timeoutMs = 500;\n');
await scriptToolCall('AUI-DIFF-CASE', [
{
name: 'edit',
@@ -245,7 +265,7 @@ test.describe('assistant-ui tool-result elements', () => {
// (`ToolDataView.tsx:isFlatObjectArray`). `result` is one of the semantic
// keys it unwraps to before deciding, so this payload reaches the table.
await setMockBehavior(
- 'composioExecuteResponse_GITHUB_LIST_REPOS',
+ `composioExecuteResponse_${GITHUB_REPOSITORY_ACTION}`,
JSON.stringify({
result: [
{ repo_name: 'openhuman', open_issues: 42, archived: false },
@@ -254,11 +274,11 @@ test.describe('assistant-ui tool-result elements', () => {
})
);
await scriptToolCall('AUI-TABLE-CASE', [
- { name: 'GITHUB_LIST_REPOS', arguments: { limit: 2 } },
+ { name: GITHUB_REPOSITORY_ACTION, arguments: { limit: 2 } },
]);
await sendTurn(page, threadId, 'AUI-TABLE-CASE list my repositories');
- const card = await openToolCall(page, /GITHUB_LIST_REPOS|repositor/i);
+ const card = await openToolCall(page, /GITHUB_LIST_REPOSITORIES_FOR_THE_AUTHENTICATED_USER|repositor/i);
const table = card.locator('[data-slot="data-table"]').first();
await expect(table).toBeVisible({ timeout: 20_000 });
diff --git a/app/test/playwright/specs/settings-feature-preferences.spec.ts b/app/test/playwright/specs/settings-feature-preferences.spec.ts
index 08e18cb444..f77c1603d8 100644
--- a/app/test/playwright/specs/settings-feature-preferences.spec.ts
+++ b/app/test/playwright/specs/settings-feature-preferences.spec.ts
@@ -285,7 +285,7 @@ test.describe('Settings - Feature Preferences', () => {
test('persists the custom mascot voice override on the voice panel', async ({ page }) => {
await openAuthenticatedRoute(page, 'pw-settings-mascot-voice', '/settings/face');
- await expect(page.getByText('Mascot Voice')).toBeVisible();
+ await expect(page.getByRole('heading', { name: 'Voice', exact: true })).toBeVisible();
const customVoiceOption = page.locator(
'[data-testid="mascot-voice-select"] option[value="__custom__"]'
);
diff --git a/app/test/playwright/specs/voice-mode.spec.ts b/app/test/playwright/specs/voice-mode.spec.ts
index b83846433f..f0db40baab 100644
--- a/app/test/playwright/specs/voice-mode.spec.ts
+++ b/app/test/playwright/specs/voice-mode.spec.ts
@@ -83,11 +83,11 @@ test.describe('Voice mode integration', () => {
await expect(page.getByTestId('chat-message-input')).toBeVisible();
});
- test('legacy Human route redirects to the shipped chat microphone composer', async ({ page }) => {
+ test('Human route shows the shipped live voice controls', async ({ page }) => {
await page.goto('/#/human');
- await expect(page).toHaveURL(/#\/chat$/);
- await expect(page.getByRole('button', { name: 'Voice mode' })).toBeVisible();
- await expect(page.getByTestId('chat-message-input')).toBeVisible();
+ await expect(page).toHaveURL(/#\/human$/);
+ await expect(page.getByTestId('live-voice-controls')).toBeVisible();
+ await expect(page.getByTestId('live-voice-start')).toBeVisible();
});
test('mic failure never inserts a beep placeholder as a user message', async ({ page }) => {