The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
test(e2e): align wallet, tool-call, and gmail specs with current UI
Steven Enamakela641a7a035c0
diff --git a/app/test/e2e/specs/chat-harness-wallet-flow.spec.ts b/app/test/e2e/specs/chat-harness-wallet-flow.spec.tsindex f97d3fe5e6..cf7d249c1b 100644--- a/app/test/e2e/specs/chat-harness-wallet-flow.spec.ts+++ b/app/test/e2e/specs/chat-harness-wallet-flow.spec.ts@@ -16,21 +16,12 @@ async function clickRecoveryConsentCheckbox(): Promise<void> {if (!(await checkbox.isExisting())) {throw new Error('Recovery phrase consent checkbox not found');}+ await browser.waitUntil(async () => await checkbox.isEnabled(), {+ timeout: 10_000,+ timeoutMsg: 'Recovery phrase consent checkbox did not enable after revealing the phrase',+ });if (!(await checkbox.isSelected())) {- try {- await checkbox.click();- } catch (err) {- console.warn(- `[chat-harness-wallet-flow] checkbox click intercepted; applying DOM fallback: ${err}`- );- await browser.execute(() => {- const input = document.querySelector<HTMLInputElement>('#mnemonic-confirm-checkbox');- if (!input) return;- input.checked = true;- input.dispatchEvent(new Event('input', { bubbles: true }));- input.dispatchEvent(new Event('change', { bubbles: true }));- });- }+ await checkbox.click();}await browser.waitUntil(async () => await checkbox.isSelected(), {timeout: 5_000,@@ -59,9 +50,7 @@ describe('Chat harness — wallet flow', () => {this.timeout(90_000);await navigateViaHash('/settings/recovery-phrase');await browser.waitUntil(- async () =>- (await textExists('Save Recovery Phrase')) ||- (await textExists('Your wallet is already set up')),+ async () => (await textExists('Reveal recovery phrase')) || (await textExists('Copy to Clipboard')),{ timeout: 20_000, timeoutMsg: 'Recovery Phrase panel did not mount' });@@ -70,19 +59,27 @@ describe('Chat harness — wallet flow', () => {{});if (alreadyConfigured.ok && alreadyConfigured.result?.result?.configured === true) {- console.log(- '[chat-harness-wallet-flow] Wallet already configured after reset; verifying state'- );- } else {- await clickRecoveryConsentCheckbox();- await clickText('Save Recovery Phrase', 10_000);-- await browser.waitUntil(async () => await textExists('Recovery phrase saved'), {- timeout: 20_000,- timeoutMsg: 'wallet setup success message never rendered',- });+ throw new Error('Recovery Phrase setup test requires an unconfigured wallet after reset');}+ await clickText('Reveal recovery phrase', 10_000);+ await browser.waitUntil(async () => await textExists('Copy to Clipboard'), {+ timeout: 10_000,+ timeoutMsg: 'recovery phrase was not revealed',+ });+ await clickRecoveryConsentCheckbox();+ const saveButton = await browser.$('button*=Save Recovery Phrase');+ await browser.waitUntil(async () => await saveButton.isEnabled(), {+ timeout: 5_000,+ timeoutMsg: 'Save Recovery Phrase did not enable after consent was granted',+ });+ await clickText('Save Recovery Phrase', 10_000);++ await browser.waitUntil(async () => await textExists('Recovery phrase saved'), {+ timeout: 20_000,+ timeoutMsg: 'wallet setup success message never rendered',+ });+await browser.waitUntil(async () => {const status = await callOpenhumanRpc<{ result: { configured: boolean } }>(diff --git a/app/test/e2e/specs/chat-tool-call-flow.spec.ts b/app/test/e2e/specs/chat-tool-call-flow.spec.tsindex 74c565134b..281b1d84a1 100644--- a/app/test/e2e/specs/chat-tool-call-flow.spec.ts+++ b/app/test/e2e/specs/chat-tool-call-flow.spec.ts@@ -43,11 +43,11 @@ const FORCED_RESPONSES = [{ content: `Here is the fetched content: ${CANARY_FINAL}` },];-async function renderedToolCards(): Promise<string[]> {+async function renderedToolNames(): Promise<string[]> {return (await browser.execute(() =>- Array.from(- document.querySelectorAll<HTMLElement>('[data-testid="assistant-ui-tool-call"]')- ).map(card => card.innerText)+ Array.from(document.querySelectorAll<HTMLElement>('[data-testid="assistant-ui-tool-call"]'))+ .map(card => card.getAttribute('data-tool-name'))+ .filter((name): name is string => Boolean(name)))) as string[];}@@ -109,10 +109,10 @@ describe('Chat tool-call lifecycle', () => {).toBe(true);await browser.waitUntil(- async () => (await renderedToolCards()).some(card => card.includes('Fetching example.com')),+ async () => (await renderedToolNames()).includes('web_fetch'),{ timeout: 45_000, interval: 100, timeoutMsg: 'Rendered web_fetch tool card never appeared' });- expect(await textExists('Fetching example.com')).toBe(true);+ expect(await renderedToolNames()).toContain('web_fetch');});it('T1.2 — rendered assistant UI tool card identifies the web fetch', async () => {diff --git a/app/test/e2e/specs/gmail-flow.spec.ts b/app/test/e2e/specs/gmail-flow.spec.tsindex b746b6f62d..3a2f149d80 100644--- a/app/test/e2e/specs/gmail-flow.spec.ts+++ b/app/test/e2e/specs/gmail-flow.spec.ts@@ -34,6 +34,7 @@ import {clickNativeButton,clickText,dumpAccessibilityTree,+ getRequestLog,textExists,waitForText,} from '../helpers/element-helpers';@@ -47,6 +48,7 @@ import {} from '../helpers/shared-flows';import {clearRequestLog,+ getMockBehavior,resetMockBehavior,setMockBehavior,startMockServer,@@ -307,7 +309,34 @@ describe('Gmail Integration Flows', () => {.filter(key => key.includes('composio:connections')).forEach(key => window.localStorage.removeItem(key));});+ const seededConnections = JSON.parse(getMockBehavior().composioConnections ?? '[]');+ expect(seededConnections).toEqual([+ { id: 'c-gmail-disconnect', toolkit: 'gmail', status: 'ACTIVE' },+ ]);+ clearRequestLog();+ await browser.refresh();+ await waitForApp();await navigateToSkills();+ await browser.waitUntil(+ async () =>+ getRequestLog().some(+ request =>+ request.method === 'GET' &&+ request.url.startsWith('/agent-integrations/composio/connections') &&+ request.status === 200+ ),+ {+ timeout: 15_000,+ interval: 250,+ timeoutMsg: 'Connections page never fetched the seeded Composio connections list',+ }+ );+ const connectionRequest = getRequestLog().find(+ request =>+ request.method === 'GET' &&+ request.url.startsWith('/agent-integrations/composio/connections')+ );+ expect(connectionRequest?.status).toBe(200);await assertConnectorCardVisible('Gmail');const modal = await openConnectorModal('Gmail', 15_000, 'Connected');