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): match both searching and searched tool card labels
Steven Enamakel58a773cc788d
diff --git a/app/test/e2e/specs/chat-multi-tool-round.spec.ts b/app/test/e2e/specs/chat-multi-tool-round.spec.tsindex 64befb9d2b..b0714a64c0 100644--- a/app/test/e2e/specs/chat-multi-tool-round.spec.ts+++ b/app/test/e2e/specs/chat-multi-tool-round.spec.ts@@ -90,7 +90,7 @@ describe('Chat multi-tool round', () => {console.log(`${LOG_PREFIX} Teardown complete`);});- it('T2.1 — agent calls tool 1 (file_read); timeline shows it', async () => {+ it('T2.1 — agent calls tool 1 (file_read); rendered card shows it', async () => {console.log(`${LOG_PREFIX} T2.1: navigating to /chat, opening new thread`);await navigateViaHash('/chat');await browser.waitUntil(async () => await chatMounted(), {@@ -129,10 +129,10 @@ describe('Chat multi-tool round', () => {it('T2.2 — agent calls tool 2 (grep); timeline shows 2 entries', async () => {console.log(`${LOG_PREFIX} T2.2: watching for grep in timeline`);await browser.waitUntil(- async () => (await renderedToolCards()).some(card => card.includes('Searching code')),+ async () => (await renderedToolCards()).some(card => /Search(?:ing|ed) code/.test(card)),{ timeout: 45_000, interval: 100, timeoutMsg: 'Rendered grep tool card never appeared' });- expect(await textExists('Searching code')).toBe(true);+ expect((await renderedToolCards()).some(card => /Search(?:ing|ed) code/.test(card))).toBe(true);});it('T2.3 — final answer renders after both tools complete', async () => {@@ -149,7 +149,7 @@ describe('Chat multi-tool round', () => {const cards = await renderedToolCards();const fileReadIndex = cards.findIndex(card => card.includes('Read file'));- const grepIndex = cards.findIndex(card => card.includes('Searching code'));+ const grepIndex = cards.findIndex(card => /Search(?:ing|ed) code/.test(card));expect(fileReadIndex).toBeGreaterThanOrEqual(0);expect(grepIndex).toBeGreaterThan(fileReadIndex);console.log(`${LOG_PREFIX} T2.5: passed`);diff --git a/app/test/e2e/specs/chat-tool-call-flow.spec.ts b/app/test/e2e/specs/chat-tool-call-flow.spec.tsindex a021a5981f..7b98fc981b 100644--- a/app/test/e2e/specs/chat-tool-call-flow.spec.ts+++ b/app/test/e2e/specs/chat-tool-call-flow.spec.ts@@ -71,7 +71,7 @@ describe('Chat tool-call lifecycle', () => {console.log(`${LOG_PREFIX} Teardown complete`);});- it('T1.1 — tool timeline entry (ToolTimelineBlock) renders during execution', async () => {+ it('T1.1 — rendered assistant UI tool card appears during the turn', async () => {console.log(`${LOG_PREFIX} T1.1: navigating to /chat and opening new thread`);await navigateViaHash('/chat');await browser.waitUntil(async () => await chatMounted(), {@@ -110,8 +110,8 @@ describe('Chat tool-call lifecycle', () => {expect(await textExists('Fetching example.com')).toBe(true);});- it('T1.2 — tool timeline entry shows tool name web_fetch', async () => {- console.log(`${LOG_PREFIX} T1.2: checking tool name in timeline`);+ it('T1.2 — rendered assistant UI tool card identifies the web fetch', async () => {+ console.log(`${LOG_PREFIX} T1.2: checking rendered tool card`);const cards = await renderedToolCards();expect(cards.some(card => card.includes('Fetching example.com'))).toBe(true);expect(await textExists('Fetching example.com')).toBe(true);diff --git a/app/test/playwright/specs/chat-multi-tool-round.spec.ts b/app/test/playwright/specs/chat-multi-tool-round.spec.tsindex bcd2a06f2c..f7a478ca61 100644--- a/app/test/playwright/specs/chat-multi-tool-round.spec.ts+++ b/app/test/playwright/specs/chat-multi-tool-round.spec.ts@@ -143,10 +143,10 @@ test.describe('Chat Multi Tool Round', () => {await expect(agentMessageText(page, CANARY_FINAL)).toBeVisible({ timeout: 50_000 });const cards = page.getByTestId('assistant-ui-tool-call');await expect(cards.filter({ hasText: 'Fetching example.com' })).toHaveCount(1);- await expect(cards.filter({ hasText: 'Searching the web' })).toHaveCount(1);+ await expect(cards.filter({ hasText: /Search(?:ing|ed) the web/ })).toHaveCount(1);const renderedCards = await cards.allTextContents();const fetchIndex = renderedCards.findIndex(text => text.includes('Fetching example.com'));- const searchIndex = renderedCards.findIndex(text => text.includes('Searching the web'));+ const searchIndex = renderedCards.findIndex(text => /Search(?:ing|ed) the web/.test(text));expect(fetchIndex).toBeGreaterThanOrEqual(0);expect(searchIndex).toBeGreaterThan(fetchIndex);await expect(agentMessageText(page, CANARY_FINAL)).toBeVisible();