diff --git a/packages/fx-core/src/component/deps-checker/internal/dotnetChecker.ts b/packages/fx-core/src/component/deps-checker/internal/dotnetChecker.ts index c1a05b780a2..ec14500f87b 100644 --- a/packages/fx-core/src/component/deps-checker/internal/dotnetChecker.ts +++ b/packages/fx-core/src/component/deps-checker/internal/dotnetChecker.ts @@ -28,11 +28,23 @@ export enum DotnetVersion { v31 = "3.1", v50 = "5.0", v60 = "6.0", + v70 = "7.0", + v80 = "8.0", + v90 = "9.0", + v10 = "10.0", } type DotnetSDK = { version: string; path: string }; const DotnetCoreSDKName = ".NET Core SDK"; const installVersion = isMacOS() && isArm64() ? DotnetVersion.v60 : DotnetVersion.v31; -const supportedVersions = [DotnetVersion.v31, DotnetVersion.v50, DotnetVersion.v60]; +const supportedVersions = [ + DotnetVersion.v31, + DotnetVersion.v50, + DotnetVersion.v60, + DotnetVersion.v70, + DotnetVersion.v80, + DotnetVersion.v90, + DotnetVersion.v10, +]; const installedNameWithVersion = `${DotnetCoreSDKName} (v${DotnetVersion.v31})`; export class DotnetChecker implements DepsChecker { diff --git a/packages/tests/src/commonlib/botValidator.ts b/packages/tests/src/commonlib/botValidator.ts index 40ec9e0633f..a91953a3baa 100644 --- a/packages/tests/src/commonlib/botValidator.ts +++ b/packages/tests/src/commonlib/botValidator.ts @@ -139,8 +139,10 @@ export class BotValidator { ); chai.assert.exists(response); if (runtime === Runtime.Node) { + // Support both "clientId" (lowercase) and "CLIENT_ID" (uppercase) for different samples + const actualBotId = response["clientId"] || response[BaseConfig.clientId]; chai.assert.equal( - response[BaseConfig.clientId], + actualBotId, this.ctx[EnvConstants.BOT_ID] as string, "bot ID should match" ); diff --git a/packages/tests/src/e2e/samples/ProvisionChefBot.tests.ts b/packages/tests/src/e2e/samples/ProvisionChefBot.tests.ts deleted file mode 100644 index 6cfe64e1c4c..00000000000 --- a/packages/tests/src/e2e/samples/ProvisionChefBot.tests.ts +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. - -/** - * @author Ivan Chen - */ - -import { TemplateProjectFolder } from "../../utils/constants"; -import { CaseFactory } from "./sampleCaseFactory"; -import { Executor } from "../../utils/executor"; -import * as fs from "fs-extra"; -import * as path from "path"; -import { expect } from "chai"; - -class ChefBotTestCase extends CaseFactory { - public override async onCreate( - appName: string, - testFolder: string, - sampleName: TemplateProjectFolder - ): Promise { - await Executor.openTemplateProject( - appName, - testFolder, - sampleName, - undefined, - "js/samples/04.ai-apps" - ); - } - public override async onAfterCreate(projectPath: string): Promise { - expect(fs.pathExistsSync(path.resolve(projectPath, "infra"))).to.be.true; - fs.mkdirSync(path.resolve(projectPath, "env"), { - recursive: true, - }); - const userFile = path.resolve(projectPath, "env", ".env.dev"); - const KEY = "SECRET_OPENAI_KEY=MY_OPENAI_API_KEY"; - fs.writeFileSync(userFile, KEY); - console.log(`add key ${KEY} to .env.dev file`); - } -} - -new ChefBotTestCase( - TemplateProjectFolder.ChefBot, - 25227103, - "ning.tang@microsoft.com" -).test(); diff --git a/packages/tests/src/e2e/samples/ProvisionNpmSearch.tests.ts b/packages/tests/src/e2e/samples/ProvisionNpmSearch.tests.ts deleted file mode 100644 index b9eadf7329f..00000000000 --- a/packages/tests/src/e2e/samples/ProvisionNpmSearch.tests.ts +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. - -/** - * @author Ivan Chen - */ - -import { TemplateProjectFolder } from "../../utils/constants"; -import { CaseFactory } from "./sampleCaseFactory"; - -class NpmSearchTestCase extends CaseFactory {} - -new NpmSearchTestCase( - TemplateProjectFolder.NpmSearch, - 15277471, - "qidon@microsoft.com", - ["bot"] -).test(); diff --git a/packages/tests/src/e2e/samples/ProvisionProactiveMessage.tests.ts b/packages/tests/src/e2e/samples/ProvisionProactiveMessage.tests.ts index 1a0a732f0d6..7cce8c77a66 100644 --- a/packages/tests/src/e2e/samples/ProvisionProactiveMessage.tests.ts +++ b/packages/tests/src/e2e/samples/ProvisionProactiveMessage.tests.ts @@ -16,12 +16,14 @@ class ProactiveMessagingTestCase extends CaseFactory { testFolder: string, sampleName: TemplateProjectFolder ): Promise { + // The sample has nodejs/ and python/ subdirectories + // Use the nodejs subfolder path directly as specified in samples-config downloadUrlInfo.dir await Executor.openTemplateProject( appName, testFolder, - sampleName, + "nodejs" as TemplateProjectFolder, undefined, - "samples" + `samples/${sampleName}` ); }