chore: e2e tests for tool calling COMPASS-10197#7925
Open
Conversation
lerouxb
commented
Mar 30, 2026
|
|
||
| import { context } from '../helpers/test-runner-context'; | ||
|
|
||
| describe('MongoDB Assistant (with mocked backend)', function () { |
Member
Author
There was a problem hiding this comment.
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)
This comment was marked as outdated.
This comment was marked as outdated.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
lerouxb
commented
Mar 30, 2026
|
|
||
| await chat.stop(); | ||
|
|
||
| // chat.stop() fires the abort signal but returns immediately without |
Contributor
There was a problem hiding this comment.
haha wild, should we raise upstream?
gagik
approved these changes
Mar 30, 2026
gagik
reviewed
Mar 30, 2026
| const trimmedMessageBody = text.trim(); | ||
| if (trimmedMessageBody) { | ||
| await chat.stop(); | ||
| await stopChat(chat); |
Contributor
There was a problem hiding this comment.
future idea: have a thin wrapper around the chat object and have that be in the state instead
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.