Skip to content

chore: e2e tests for tool calling COMPASS-10197#7925

Open
lerouxb wants to merge 8 commits intomainfrom
assistant-e2e
Open

chore: e2e tests for tool calling COMPASS-10197#7925
lerouxb wants to merge 8 commits intomainfrom
assistant-e2e

Conversation

@lerouxb
Copy link
Copy Markdown
Member

@lerouxb lerouxb commented Mar 30, 2026

COMPASS-10197

Just making a tool call, approving it and rejecting it for now. Will be adding ones like making sure we auto-reject tool calls if you turn off tool calls while the card is showing in a follow-up. ie. Once we have that functionality implemented ;)

The tests showed that our clearChat() e2e helper wasn't working. Or at least everywhere we called chat.stop() it wasn't doing enough. So I switched to using stopChat(chat) everywhere and extended stopChat(chat) to wait longer.


import { context } from '../helpers/test-runner-context';

describe('MongoDB Assistant (with mocked backend)', function () {
Copy link
Copy Markdown
Member Author

@lerouxb lerouxb Mar 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I moved these to mirror the grouping/naming we have for other existing AI e2e tests where the mocked ones (which are admittedly handy for testing error conditions) are separate from the real e2e ones. And then to leave space for the new ones.

(So this was actually a rename but then I reused the filename)

@codeowners-service-app codeowners-service-app bot requested a review from tculig March 30, 2026 10:31
@codeowners-service-app

This comment was marked as outdated.

This comment was marked as spam.

@lerouxb lerouxb requested review from gagik and removed request for paula-stacho and tculig March 30, 2026 13:21

await chat.stop();

// chat.stop() fires the abort signal but returns immediately without
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, claude. 😬

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

haha wild, should we raise upstream?

const trimmedMessageBody = text.trim();
if (trimmedMessageBody) {
await chat.stop();
await stopChat(chat);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

future idea: have a thin wrapper around the chat object and have that be in the state instead

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants