Path: blob/main/extensions/copilot/test/e2e/newNotebook.stest.ts
13388 views
/*---------------------------------------------------------------------------------------------1* Copyright (c) Microsoft Corporation. All rights reserved.2* Licensed under the MIT License. See License.txt in the project root for license information.3*--------------------------------------------------------------------------------------------*/45import * as path from 'path';6import { ssuite, stest } from '../base/stest';7import { fetchConversationScenarios, Scenario } from './scenarioLoader';8import { generateScenarioTestRunner } from './scenarioTest';910(function () {11ssuite.skip({ title: 'newNotebook', subtitle: 'e2e', location: 'panel' }, (inputPath) => { //@Yoyokrazy, refactor for tool - debt1213const scenarioFolder = inputPath ?? path.join(__dirname, '..', 'test/scenarios/test-new-notebooks');14const scenarios: Scenario[] = fetchConversationScenarios(scenarioFolder);1516for (const scenario of scenarios) {17stest({ description: scenario[0].question.replace('/newNotebook ', ''), language: 'python' },18generateScenarioTestRunner(19scenario,20(accessor, question, userVisibleAnswer, rawResponse, index, turn, commands) => {21// TODO@rebornix: test if response contains the outline for notebook in a code block22for (const command of commands) {23if (command.command === 'github.copilot.newNotebook') {24return Promise.resolve({ success: true, errorMessage: '' });25}26}27return Promise.resolve({ success: false, errorMessage: 'Fail to parse newNotebook response' });28}29));30}31});32})();333435