mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-21 17:19:01 +01:00
Add smoke test for anonymous chat access (#291953)
* Initial plan * Add smoke test for anonymous chat access Co-authored-by: bpasero <900690+bpasero@users.noreply.github.com> * fix * . * . * . * . * . * . * . --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: bpasero <900690+bpasero@users.noreply.github.com> Co-authored-by: Benjamin Pasero <benjamin.pasero@microsoft.com>
This commit is contained in:
37
test/smoke/src/areas/chat/chatAnonymous.test.ts
Normal file
37
test/smoke/src/areas/chat/chatAnonymous.test.ts
Normal file
@@ -0,0 +1,37 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { Application, Logger } from '../../../../automation';
|
||||
import { installAllHandlers } from '../../utils';
|
||||
|
||||
export function setup(logger: Logger) {
|
||||
describe('Chat Anonymous', () => {
|
||||
|
||||
// Shared before/after handling
|
||||
installAllHandlers(logger);
|
||||
|
||||
it('can send a chat message with anonymous access', async function () {
|
||||
const app = this.app as Application;
|
||||
|
||||
// Enable anonymous access
|
||||
await app.workbench.settingsEditor.addUserSetting('chat.allowAnonymousAccess', 'true');
|
||||
|
||||
// Open chat view
|
||||
await app.workbench.quickaccess.runCommand('workbench.action.chat.open');
|
||||
|
||||
// Wait for chat view to be visible
|
||||
await app.workbench.chat.waitForChatView();
|
||||
|
||||
// Send a message
|
||||
await app.workbench.chat.sendMessage('Hello');
|
||||
|
||||
// Wait for a response to complete
|
||||
await app.workbench.chat.waitForResponse();
|
||||
|
||||
// Wait for model name to appear in footer
|
||||
await app.workbench.chat.waitForModelInFooter('GPT-5 mini');
|
||||
});
|
||||
});
|
||||
}
|
||||
@@ -27,6 +27,7 @@ import { setup as setupLaunchTests } from './areas/workbench/launch.test';
|
||||
import { setup as setupTerminalTests } from './areas/terminal/terminal.test';
|
||||
import { setup as setupTaskTests } from './areas/task/task.test';
|
||||
import { setup as setupChatTests } from './areas/chat/chat.test';
|
||||
import { setup as setupChatAnonymousTests } from './areas/chat/chatAnonymous.test';
|
||||
import { setup as setupAccessibilityTests } from './areas/accessibility/accessibility.test';
|
||||
|
||||
const rootPath = path.join(__dirname, '..', '..', '..');
|
||||
@@ -406,5 +407,6 @@ describe(`VSCode Smoke Tests (${opts.web ? 'Web' : 'Electron'})`, () => {
|
||||
if (!opts.web && !opts.remote && quality !== Quality.Dev && quality !== Quality.OSS) { setupLocalizationTests(logger); }
|
||||
if (!opts.web && !opts.remote) { setupLaunchTests(logger); }
|
||||
if (!opts.web) { setupChatTests(logger); }
|
||||
if (!opts.web && quality === Quality.Insiders) { setupChatAnonymousTests(logger); }
|
||||
setupAccessibilityTests(logger, opts);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user