Add smoke test for anonymous chat access#291953
Merged
Conversation
Co-authored-by: bpasero <900690+bpasero@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Explore smoke test for testing Chat anonymous
Add smoke test for anonymous chat access
Jan 30, 2026
bpasero
approved these changes
Jan 31, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a smoke test to validate anonymous chat functionality and makes several supporting changes to enable reliable test execution.
Changes:
- Adds new smoke test for anonymous chat access that enables the
chat.allowAnonymousAccesssetting, sends a message, and verifies response completion - Adds
waitForResponse()andwaitForModelInFooter()methods to the Chat automation class for verifying chat behavior - Removes the Notification class from automation infrastructure and instead disables toast notifications during smoke tests at the source
- Disables chat session shutdown veto dialogs during smoke tests to prevent interference with test execution
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| test/smoke/src/areas/chat/chatAnonymous.test.ts | New smoke test that enables anonymous access, sends a chat message, and validates response |
| test/automation/src/chat.ts | Adds waitForResponse() and waitForModelInFooter() methods; removes Notification dependency |
| test/smoke/src/main.ts | Registers the new anonymous chat test (Insiders-only, Electron-only) |
| test/automation/src/workbench.ts | Removes Notification class from Chat constructor |
| test/automation/src/notification.ts | Deletes the Notification class entirely |
| test/automation/src/index.ts | Removes Notification export |
| src/vs/workbench/contrib/chat/electron-browser/chat.contribution.ts | Bypasses shutdown veto for smoke tests |
| src/vs/workbench/browser/parts/notifications/notificationsToasts.ts | Disables toast notifications during smoke tests |
Comments suppressed due to low confidence (1)
test/automation/src/chat.ts:54
- The waitForResponse method passes the retryCount parameter to waitForElement, but this parameter could be undefined. While waitForElement has a default value of 200 for retryCount, it's better to be explicit about the default behavior or document that undefined will use the default. Consider adding a comment explaining this parameter or providing a default value in the method signature.
async waitForResponse(retryCount?: number): Promise<void> {
// First wait for a response element to appear
await this.code.waitForElement(CHAT_RESPONSE, undefined, retryCount);
// Then wait for it to complete (not loading)
await this.code.waitForElement(CHAT_RESPONSE_COMPLETE, undefined, retryCount);
}
lszomoru
approved these changes
Jan 31, 2026
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.
Adds a smoke test to validate anonymous chat functionality by enabling
chat.allowAnonymousAccess, sending a message, and verifying a response is received.Changes
test/automation/src/chat.ts: AddedwaitForResponse()method with selectors for response elements (.interactive-response) and completion state (:not(.chat-response-loading))test/smoke/src/areas/chat/chatAnonymous.test.ts: New test that:chat.allowAnonymousAccesssettingtest/smoke/src/main.ts: Registered new test (Electron-only, matching existing chat tests)Example usage
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.