diff --git a/.eslintrc.json b/.eslintrc.json index d21952753f..5bcc487e97 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -8,6 +8,7 @@ "plugins": ["prettier"], "rules": { "prettier/prettier": "error" - } + }, + "root": true } diff --git a/.gitignore b/.gitignore index 7f2ab38b1a..1635c14d55 100644 --- a/.gitignore +++ b/.gitignore @@ -384,6 +384,9 @@ experimental/generator-dotnet-yeoman/node_modules # Allow the root-level /packages/ directory or it gets confused with NuGet directories !/[Pp]ackages/* +# Allow the packages directory under tests +!/tests/unit/[Pp]ackages/* + # Ignore correct yarn files (no zero install support) .yarn/* !.yarn/patches diff --git a/build/yaml/templates/component-template.yml b/build/yaml/templates/component-template.yml index bd27ea611e..935cd64a04 100644 --- a/build/yaml/templates/component-template.yml +++ b/build/yaml/templates/component-template.yml @@ -31,7 +31,6 @@ stages: - job: build_test_dotnet displayName: Build and test .csproj with dotnet steps: - - template: dotnet-install-sdk-steps.yml - template: dotnet-build-test-steps.yml - stage: stage_package_nuget @@ -44,7 +43,6 @@ stages: condition: eq(variables.ComponentType, 'codeExtension') steps: - template: nuget-versioning-steps.yml - - template: dotnet-install-sdk-steps.yml - template: dotnet-package-steps.yml - template: nuget-signing-steps.yml - job: job_pack_nuspec diff --git a/build/yaml/templates/dotnet-build-test-steps.yml b/build/yaml/templates/dotnet-build-test-steps.yml index cf6901e5b2..6a6c0e7bc5 100644 --- a/build/yaml/templates/dotnet-build-test-steps.yml +++ b/build/yaml/templates/dotnet-build-test-steps.yml @@ -1,4 +1,14 @@ steps: +- task: UseDotNet@2 + displayName: 'Use .Net Core sdk 2.1.x' + inputs: + version: 2.1.x + +- task: UseDotNet@2 + displayName: 'Use .Net Core sdk 3.1.x' + inputs: + version: 3.1.x + - task: DotNetCoreCLI@2 displayName: 'Run `dotnet restore`' inputs: diff --git a/build/yaml/templates/dotnet-install-sdk-steps.yml b/build/yaml/templates/dotnet-install-sdk-steps.yml deleted file mode 100644 index 772e09f578..0000000000 --- a/build/yaml/templates/dotnet-install-sdk-steps.yml +++ /dev/null @@ -1,10 +0,0 @@ -steps: -- task: UseDotNet@2 - displayName: 'Use .Net Core sdk 2.1.x' - inputs: - version: 2.1.x - -- task: UseDotNet@2 - displayName: 'Use .Net Core sdk 3.1.x' - inputs: - version: 3.1.x diff --git a/build/yaml/templates/dotnet-package-steps.yml b/build/yaml/templates/dotnet-package-steps.yml index 49e0a39302..106b8caa7e 100644 --- a/build/yaml/templates/dotnet-package-steps.yml +++ b/build/yaml/templates/dotnet-package-steps.yml @@ -1,4 +1,9 @@ steps: +- task: UseDotNet@2 + displayName: 'Use .Net Core sdk 2.1.x' + inputs: + version: 2.1.x + - task: DotNetCoreCLI@2 displayName: 'Run `dotnet publish`' inputs: diff --git a/build/yaml/templates/npm-versioning-steps.yml b/build/yaml/templates/npm-versioning-steps.yml index 9cb7e95fb1..bfbe667d56 100644 --- a/build/yaml/templates/npm-versioning-steps.yml +++ b/build/yaml/templates/npm-versioning-steps.yml @@ -13,7 +13,7 @@ steps: $deploymentRing = $deploymentRingOverride; } - if ($deploymentRing.ToLowerInvariant() -eq "rc") { + if (($deploymentRing.ToLowerInvariant() -eq "rc") -or ($deploymentRing.ToLowerInvariant() -eq "preview")) { $releaseCandidateNumber = "$env:RELEASECANDIDATENUMBER"; "Release Candidate Number = $releaseCandidateNumber"; diff --git a/build/yaml/templates/nuget-signing-steps.yml b/build/yaml/templates/nuget-signing-steps.yml index 5e08c14ebe..269af981c7 100644 --- a/build/yaml/templates/nuget-signing-steps.yml +++ b/build/yaml/templates/nuget-signing-steps.yml @@ -2,11 +2,6 @@ # Extra steps are required to sign the binaries of the code extensions. steps: -- task: UseDotNet@2 - displayName: 'Use .Net Core sdk 2.1.x' - inputs: - version: 2.1.x - - task: CopyFiles@2 displayName: 'Copy packages to Signing' inputs: diff --git a/build/yaml/templates/nuget-versioning-steps.yml b/build/yaml/templates/nuget-versioning-steps.yml index 1e9f430aa5..9192584a46 100644 --- a/build/yaml/templates/nuget-versioning-steps.yml +++ b/build/yaml/templates/nuget-versioning-steps.yml @@ -13,7 +13,7 @@ steps: $deploymentRing = $deploymentRingOverride; } - if ($deploymentRing.ToLowerInvariant() -eq "rc") { + if (($deploymentRing.ToLowerInvariant() -eq "rc") -or ($deploymentRing.ToLowerInvariant() -eq "preview")) { $releaseCandidateNumber = "$env:RELEASECANDIDATENUMBER"; "Release Candidate Number = $releaseCandidateNumber"; diff --git a/generators/generator-bot-adaptive/package.json b/generators/generator-bot-adaptive/package.json index 98ca42a60a..83c684f825 100644 --- a/generators/generator-bot-adaptive/package.json +++ b/generators/generator-bot-adaptive/package.json @@ -1,6 +1,6 @@ { "name": "@microsoft/generator-bot-adaptive", - "version": "1.0.0", + "version": "1.1.0", "description": "Yeoman generator for creating a base bot built on the Azure Bot Framework and the Adaptive stack.", "keywords": [ "microsoft", diff --git a/generators/generator-bot-adaptive/platforms.js b/generators/generator-bot-adaptive/platforms.js index 621dd9b47a..bb01da0bf2 100644 --- a/generators/generator-bot-adaptive/platforms.js +++ b/generators/generator-bot-adaptive/platforms.js @@ -3,12 +3,12 @@ const dotnet = { name: 'dotnet', - defaultSdkVersion: '4.13.2', + defaultSdkVersion: '4.14.0', }; const js = { name: 'js', - defaultSdkVersion: '4.13.4-preview', + defaultSdkVersion: '4.14.0-preview.rc1', }; module.exports = { dotnet, js }; diff --git a/generators/generator-bot-adaptive/test/dotnet-functions.test.js b/generators/generator-bot-adaptive/test/dotnet-functions.test.js index 04cb7cd664..03791be1b7 100644 --- a/generators/generator-bot-adaptive/test/dotnet-functions.test.js +++ b/generators/generator-bot-adaptive/test/dotnet-functions.test.js @@ -125,7 +125,7 @@ describe(`generator-bot-adaptive --platform ${platform} --integration ${integrat { botName, packageReferences: '', - sdkVersion: '4.13.2', + sdkVersion: '4.14.0', } ); diff --git a/generators/generator-bot-adaptive/test/dotnet-webapp.test.js b/generators/generator-bot-adaptive/test/dotnet-webapp.test.js index b3a99461ab..21d6271ac2 100644 --- a/generators/generator-bot-adaptive/test/dotnet-webapp.test.js +++ b/generators/generator-bot-adaptive/test/dotnet-webapp.test.js @@ -106,7 +106,7 @@ describe(`generator-bot-adaptive --platform ${platform} --integration ${integrat { botName, packageReferences: '', - sdkVersion: '4.13.2', + sdkVersion: '4.14.0', } ); diff --git a/generators/generator-bot-adaptive/test/js-functions.test.js b/generators/generator-bot-adaptive/test/js-functions.test.js index c3c990981a..0d0ed536b5 100644 --- a/generators/generator-bot-adaptive/test/js-functions.test.js +++ b/generators/generator-bot-adaptive/test/js-functions.test.js @@ -107,10 +107,10 @@ describe(`generator-bot-adaptive --platform ${platform} --integration ${integrat }, dependencies: { 'cross-env': 'latest', - 'botbuilder-ai-luis': '4.13.4-preview', - 'botbuilder-ai-qna': '4.13.4-preview', + 'botbuilder-ai-luis': '4.14.0-preview.rc1', + 'botbuilder-ai-qna': '4.14.0-preview.rc1', 'botbuilder-dialogs-adaptive-runtime-integration-azure-functions': - '4.13.4-preview', + '4.14.0-preview.rc1', }, }; diff --git a/generators/generator-bot-adaptive/test/js-webapp.test.js b/generators/generator-bot-adaptive/test/js-webapp.test.js index 2028572509..679d2f74dc 100644 --- a/generators/generator-bot-adaptive/test/js-webapp.test.js +++ b/generators/generator-bot-adaptive/test/js-webapp.test.js @@ -86,10 +86,10 @@ describe(`generator-bot-adaptive --platform ${platform} --integration ${integrat }, dependencies: { 'cross-env': 'latest', - 'botbuilder-ai-luis': '4.13.4-preview', - 'botbuilder-ai-qna': '4.13.4-preview', + 'botbuilder-ai-luis': '4.14.0-preview.rc1', + 'botbuilder-ai-qna': '4.14.0-preview.rc1', 'botbuilder-dialogs-adaptive-runtime-integration-express': - '4.13.4-preview', + '4.14.0-preview.rc1', }, }; diff --git a/generators/generator-bot-core-assistant/generators/app/index.js b/generators/generator-bot-core-assistant/generators/app/index.js index b19b308c8c..e94d490605 100644 --- a/generators/generator-bot-core-assistant/generators/app/index.js +++ b/generators/generator-bot-core-assistant/generators/app/index.js @@ -12,11 +12,11 @@ const packageReferences = { [platforms.dotnet.name]: [ { name: 'Microsoft.Bot.Components.HelpAndCancel', - version: '1.0.0', + version: '1.1.0-preview.0', }, ], [platforms.js.name]: [ - { name: '@microsoft/bot-components-helpandcancel', version: 'latest' }, + { name: '@microsoft/bot-components-helpandcancel', version: 'next' }, ], }; diff --git a/generators/generator-bot-core-assistant/package.json b/generators/generator-bot-core-assistant/package.json index 22944a9a4b..4409105f09 100644 --- a/generators/generator-bot-core-assistant/package.json +++ b/generators/generator-bot-core-assistant/package.json @@ -1,6 +1,6 @@ { "name": "@microsoft/generator-bot-core-assistant", - "version": "1.0.0", + "version": "1.1.0", "description": "Yeoman generator for creating an assistant-style bot with NLP built on the Azure Bot Framework.", "keywords": [ "microsoft", @@ -24,7 +24,7 @@ "lint": "eslint -c ../../.eslintrc.json ." }, "dependencies": { - "@microsoft/generator-bot-adaptive": "workspace:^1.0.0", + "@microsoft/generator-bot-adaptive": "workspace:^1.1.0-preview.0", "yeoman-generator": "^2.0.5", "yeoman-test": "^1.9.1" }, diff --git a/generators/generator-bot-core-language/generators/app/index.js b/generators/generator-bot-core-language/generators/app/index.js index e831c00de2..4e8f46b514 100644 --- a/generators/generator-bot-core-language/generators/app/index.js +++ b/generators/generator-bot-core-language/generators/app/index.js @@ -12,16 +12,16 @@ const packageReferences = { [platforms.dotnet.name]: [ { name: 'Microsoft.Bot.Components.HelpAndCancel', - version: '1.0.0', + version: '1.1.0-preview.0', }, { name: 'Microsoft.Bot.Components.Welcome', - version: '1.0.0', + version: '1.1.0-preview.0', }, ], [platforms.js.name]: [ - { name: '@microsoft/bot-components-helpandcancel', version: 'latest' }, - { name: '@microsoft/bot-components-welcome', version: 'latest' }, + { name: '@microsoft/bot-components-helpandcancel', version: 'next' }, + { name: '@microsoft/bot-components-welcome', version: 'next' }, ], }; diff --git a/generators/generator-bot-core-language/package.json b/generators/generator-bot-core-language/package.json index 5cecb71f13..72a347e11d 100644 --- a/generators/generator-bot-core-language/package.json +++ b/generators/generator-bot-core-language/package.json @@ -1,6 +1,6 @@ { "name": "@microsoft/generator-bot-core-language", - "version": "1.0.0", + "version": "1.1.0", "description": "Yeoman generator for creating a simple conversational bot with NLP built on the Azure Bot Framework.", "keywords": [ "microsoft", @@ -26,7 +26,7 @@ "lint": "eslint -c ../../.eslintrc.json ." }, "dependencies": { - "@microsoft/generator-bot-adaptive": "workspace:^1.0.0", + "@microsoft/generator-bot-adaptive": "workspace:^1.1.0", "yeoman-generator": "^2.0.5", "yeoman-test": "^1.9.1" }, diff --git a/generators/generator-bot-core-qna/package.json b/generators/generator-bot-core-qna/package.json index 9692356e3e..2acfcfa686 100644 --- a/generators/generator-bot-core-qna/package.json +++ b/generators/generator-bot-core-qna/package.json @@ -1,6 +1,6 @@ { "name": "@microsoft/generator-bot-core-qna", - "version": "1.0.0", + "version": "1.1.0", "description": "Yeoman generator for creating a bot and connecting to a QnA Maker knowledge base.", "keywords": [ "microsoft", @@ -23,7 +23,7 @@ "lint": "eslint -c ../../.eslintrc.json ." }, "dependencies": { - "@microsoft/generator-bot-adaptive": "workspace:^1.0.0", + "@microsoft/generator-bot-adaptive": "workspace:^1.1.0-preview.0", "yeoman-generator": "^2.0.5", "yeoman-test": "^1.9.1" }, diff --git a/generators/generator-bot-empty/package.json b/generators/generator-bot-empty/package.json index a4cdb7f0ff..7bbd901cf6 100644 --- a/generators/generator-bot-empty/package.json +++ b/generators/generator-bot-empty/package.json @@ -1,6 +1,6 @@ { "name": "@microsoft/generator-bot-empty", - "version": "1.0.0", + "version": "1.1.0", "description": "Yeoman generator for creating an empty bot built on the Azure Bot Framework.", "keywords": [ "microsoft", @@ -26,7 +26,7 @@ "lint": "eslint -c ../../.eslintrc.json ." }, "dependencies": { - "@microsoft/generator-bot-adaptive": "workspace:^1.0.0", + "@microsoft/generator-bot-adaptive": "workspace:^1.1.0-preview.0", "yeoman-generator": "^2.0.5", "yeoman-test": "^1.9.1" }, diff --git a/generators/generator-bot-enterprise-assistant/generators/app/index.js b/generators/generator-bot-enterprise-assistant/generators/app/index.js index 33ed5d2b6f..2ed01c6b0e 100644 --- a/generators/generator-bot-enterprise-assistant/generators/app/index.js +++ b/generators/generator-bot-enterprise-assistant/generators/app/index.js @@ -36,7 +36,7 @@ module.exports = class extends BaseGenerator { { isPlugin: true, name: 'Microsoft.Bot.Builder.AI.Orchestrator', - version: '4.13.2', + version: '4.14.0', }, ], modifyApplicationSettings: (appSettings) => { diff --git a/generators/generator-bot-enterprise-assistant/package.json b/generators/generator-bot-enterprise-assistant/package.json index c7f51f4dc0..1232ba3204 100644 --- a/generators/generator-bot-enterprise-assistant/package.json +++ b/generators/generator-bot-enterprise-assistant/package.json @@ -1,6 +1,6 @@ { "name": "@microsoft/generator-bot-enterprise-assistant", - "version": "1.0.0", + "version": "1.1.0", "description": "Yeoman generator for creating an enterprise assistant, with a root bot and two skills built on the Azure Bot Framework.", "keywords": [ "microsoft", @@ -25,9 +25,9 @@ "lint": "eslint -c ../../.eslintrc.json ." }, "dependencies": { - "@microsoft/generator-bot-adaptive": "workspace:^1.0.0", - "@microsoft/generator-bot-enterprise-calendar": "workspace:^1.0.0", - "@microsoft/generator-bot-enterprise-people": "workspace:^1.0.0", + "@microsoft/generator-bot-adaptive": "workspace:^1.1.0-preview.0", + "@microsoft/generator-bot-enterprise-calendar": "workspace:^1.1.0-preview.0", + "@microsoft/generator-bot-enterprise-people": "workspace:^1.1.0-preview.0", "uuid": "^8.3.2", "yeoman-generator": "^2.0.5", "yeoman-test": "^1.9.1" diff --git a/generators/generator-bot-enterprise-calendar/generators/app/index.js b/generators/generator-bot-enterprise-calendar/generators/app/index.js index 64202cef42..586eb8dc6d 100644 --- a/generators/generator-bot-enterprise-calendar/generators/app/index.js +++ b/generators/generator-bot-enterprise-calendar/generators/app/index.js @@ -16,7 +16,7 @@ module.exports = class extends BaseGenerator { { isPlugin: true, name: 'Microsoft.Bot.Components.Graph', - version: '1.0.0', + version: '1.1.0-preview.0', }, ], modifyApplicationSettings: (appSettings) => { diff --git a/generators/generator-bot-enterprise-calendar/package.json b/generators/generator-bot-enterprise-calendar/package.json index 419f85cefa..cd491abfdf 100644 --- a/generators/generator-bot-enterprise-calendar/package.json +++ b/generators/generator-bot-enterprise-calendar/package.json @@ -1,6 +1,6 @@ { "name": "@microsoft/generator-bot-enterprise-calendar", - "version": "1.0.0", + "version": "1.1.0", "description": "Yeoman generator for creating an Adaptive bot built on the Azure Bot Framework using the Calendar template.", "keywords": [ "microsoft", @@ -24,7 +24,7 @@ "lint": "eslint ." }, "dependencies": { - "@microsoft/generator-bot-adaptive": "workspace:^1.0.0", + "@microsoft/generator-bot-adaptive": "workspace:^1.1.0-preview.0", "yeoman-generator": "^2.0.5", "yeoman-test": "^1.9.1" }, diff --git a/generators/generator-bot-enterprise-people/generators/app/index.js b/generators/generator-bot-enterprise-people/generators/app/index.js index d85abc8a14..2fde064d9f 100644 --- a/generators/generator-bot-enterprise-people/generators/app/index.js +++ b/generators/generator-bot-enterprise-people/generators/app/index.js @@ -16,7 +16,7 @@ module.exports = class extends BaseGenerator { { isPlugin: true, name: 'Microsoft.Bot.Components.Graph', - version: '1.0.0', + version: '1.1.0-preview.0', }, ], modifyApplicationSettings: (appSettings) => { diff --git a/generators/generator-bot-enterprise-people/package.json b/generators/generator-bot-enterprise-people/package.json index 7e8b5bb1f8..446e84f18b 100644 --- a/generators/generator-bot-enterprise-people/package.json +++ b/generators/generator-bot-enterprise-people/package.json @@ -1,6 +1,6 @@ { "name": "@microsoft/generator-bot-enterprise-people", - "version": "1.0.0", + "version": "1.1.0", "description": "Yeoman generator for creating an Adaptive bot built on the Azure Bot Framework using the People template.", "keywords": [ "microsoft", @@ -24,7 +24,7 @@ "lint": "eslint -c ../../.eslintrc.json ." }, "dependencies": { - "@microsoft/generator-bot-adaptive": "workspace:^1.0.0", + "@microsoft/generator-bot-adaptive": "workspace:^1.1.0-preview.0", "yeoman-generator": "^2.0.5", "yeoman-test": "^1.9.1" }, diff --git a/package.json b/package.json index 7a69ff9c32..33608161e5 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,8 @@ "packages/*", "packages/*/js", "skills/declarative/*", - "testing/*" + "tests/**/js", + "!tests/functional" ], "scripts": { "lint": "yarn workspaces foreach run lint" diff --git a/packages/AdaptiveCards/Microsoft.Bot.Components.AdaptiveCards.csproj b/packages/AdaptiveCards/Microsoft.Bot.Components.AdaptiveCards.csproj index ebcd529718..07be44f462 100644 --- a/packages/AdaptiveCards/Microsoft.Bot.Components.AdaptiveCards.csproj +++ b/packages/AdaptiveCards/Microsoft.Bot.Components.AdaptiveCards.csproj @@ -8,7 +8,7 @@ Microsoft.Bot.Components.AdaptiveCards https://github.com/microsoft/botframework-components/tree/main/packages/AdaptiveCards - 1.0.0 + 1.1.0 Composer triggers and actions for working with Adaptive Cards. Composer triggers and actions for working with Adaptive Cards. true @@ -20,7 +20,7 @@ - + diff --git a/packages/Graph/Microsoft.Bot.Components.Graph.csproj b/packages/Graph/Microsoft.Bot.Components.Graph.csproj index 7e09985822..7c15909684 100644 --- a/packages/Graph/Microsoft.Bot.Components.Graph.csproj +++ b/packages/Graph/Microsoft.Bot.Components.Graph.csproj @@ -7,7 +7,7 @@ Microsoft.Bot.Components.Graph - 1.0.0 + 1.1.0 Custom actions for the MS Graph API for Bot Framework bots. A set of custom actions for working with the Microsoft Graph API from Bot Framework Composer. https://github.com/Microsoft/botframework-components/tree/main/packages/Graph @@ -20,7 +20,7 @@ - + all diff --git a/packages/HelpAndCancel/Microsoft.Bot.Components.HelpAndCancel.nuspec b/packages/HelpAndCancel/Microsoft.Bot.Components.HelpAndCancel.nuspec index dd564f2118..b23ac3a951 100644 --- a/packages/HelpAndCancel/Microsoft.Bot.Components.HelpAndCancel.nuspec +++ b/packages/HelpAndCancel/Microsoft.Bot.Components.HelpAndCancel.nuspec @@ -2,7 +2,7 @@ Microsoft.Bot.Components.HelpAndCancel - 1.0.0 + 1.1.0 Microsoft Microsoft © Microsoft Corporation. All rights reserved. @@ -13,7 +13,7 @@ Contains Adaptive Dialog assets to support Help and Cancel conversational flows in a bot built on the Azure Bot Framework. msbot-component msbot-content conversationalcore helpintent cancelintent preview - + diff --git a/packages/HelpAndCancel/package.json b/packages/HelpAndCancel/package.json index 72ba223afc..ab2a9a19b8 100644 --- a/packages/HelpAndCancel/package.json +++ b/packages/HelpAndCancel/package.json @@ -1,6 +1,6 @@ { "name": "@microsoft/bot-components-helpandcancel", - "version": "1.0.0", + "version": "1.1.0", "description": "Contains Adaptive Dialog assets to support Help and Cancel conversational flows in a bot built on the Azure Bot Framework.", "keywords": [ "microsoft", diff --git a/packages/Teams/dotnet/Actions/SendMessageToTeamsChannel.cs b/packages/Teams/dotnet/Actions/SendMessageToTeamsChannel.cs index 912b8beecf..9f65d59452 100644 --- a/packages/Teams/dotnet/Actions/SendMessageToTeamsChannel.cs +++ b/packages/Teams/dotnet/Actions/SendMessageToTeamsChannel.cs @@ -2,7 +2,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. using System; +using System.Linq; using System.Runtime.CompilerServices; +using System.Security.Claims; using System.Threading; using System.Threading.Tasks; using AdaptiveExpressions.Properties; @@ -118,23 +120,52 @@ public SendMessageToTeamsChannel([CallerFilePath] string callerPath = "", [Calle teamsChannelId = dc.Context.Activity.TeamsGetChannelId(); } - if (!(dc.Context.Adapter is BotFrameworkAdapter)) + Tuple result; + + // Check for legacy adapter + if (dc.Context.Adapter is BotFrameworkAdapter) + { + // TeamsInfo.SendMessageToTeamsChannelAsync requires AppCredentials + var credentials = dc.Context.TurnState.Get()?.Credentials as MicrosoftAppCredentials; + if (credentials == null) + { + throw new InvalidOperationException($"Missing credentials as {nameof(MicrosoftAppCredentials)} in {nameof(IConnectorClient)} from TurnState"); + } + + // The result comes back as a tuple, which is used to set the two properties (if present). + result = await TeamsInfo.SendMessageToTeamsChannelAsync(dc.Context, activity, teamsChannelId, credentials, cancellationToken: cancellationToken).ConfigureAwait(false); + } + else if (dc.Context.Adapter is CloudAdapterBase) { - throw new InvalidOperationException($"{Kind} is not supported by the current adapter."); + // Retrieve the bot appid from TurnState's ClaimsIdentity + string appId; + if (dc.Context.TurnState.Get(BotAdapter.BotIdentityKey) is ClaimsIdentity botIdentity) + { + // Apparently 'version' is sometimes empty, which will result in no id returned from GetAppIdFromClaims + appId = JwtTokenValidation.GetAppIdFromClaims(botIdentity.Claims); + if (string.IsNullOrEmpty(appId)) + { + appId = botIdentity.Claims.FirstOrDefault(claim => claim.Type == AuthenticationConstants.AudienceClaim)?.Value; + } + + if (string.IsNullOrEmpty(appId)) + { + throw new InvalidOperationException($"Missing AppIdClaim in ClaimsIdentity."); + } + } + else + { + throw new InvalidOperationException($"Missing {BotAdapter.BotIdentityKey} in {nameof(ITurnContext)} TurnState."); + } + + // The result comes back as a tuple, which is used to set the two properties (if present). + result = await TeamsInfo.SendMessageToTeamsChannelAsync(dc.Context, activity, teamsChannelId, appId, cancellationToken: cancellationToken).ConfigureAwait(false); } - - // TODO: this will NOT work with certificate app credentials - - // TeamsInfo.SendMessageToTeamsChannelAsync requires AppCredentials - var credentials = dc.Context.TurnState.Get()?.Credentials as MicrosoftAppCredentials; - if (credentials == null) + else { - throw new InvalidOperationException($"Missing credentials as {nameof(MicrosoftAppCredentials)} in {nameof(IConnectorClient)} from TurnState"); + throw new InvalidOperationException($"The adapter does not support {nameof(SendMessageToTeamsChannel)}."); } - // The result comes back as a tuple, which is used to set the two properties (if present). - var result = await TeamsInfo.SendMessageToTeamsChannelAsync(dc.Context, activity, teamsChannelId, credentials, cancellationToken: cancellationToken).ConfigureAwait(false); - if (ConversationReferenceProperty != null) { dc.State.SetValue(ConversationReferenceProperty.GetValue(dc.State), result.Item1); diff --git a/packages/Teams/dotnet/Microsoft.Bot.Components.Teams.csproj b/packages/Teams/dotnet/Microsoft.Bot.Components.Teams.csproj index d333f2f004..60f5b87f7b 100644 --- a/packages/Teams/dotnet/Microsoft.Bot.Components.Teams.csproj +++ b/packages/Teams/dotnet/Microsoft.Bot.Components.Teams.csproj @@ -3,7 +3,7 @@ netstandard2.0 Microsoft.Bot.Components.Teams - 1.0.0 + 1.1.0 This library implements .NET support for adaptive dialogs with Microsoft Teams This library implements .NET support for adaptive dialogs with Microsoft Teams https://github.com/Microsoft/botframework-components/tree/main/packages/Teams/dotnet @@ -35,7 +35,7 @@ - + diff --git a/packages/Teams/js/package.json b/packages/Teams/js/package.json index 3dafdda466..1dc2ed2a17 100644 --- a/packages/Teams/js/package.json +++ b/packages/Teams/js/package.json @@ -2,7 +2,7 @@ "name": "@microsoft/bot-components-teams", "author": "Microsoft Corp.", "description": "Rule system for the Microsoft BotBuilder adaptive dialog system, with integration specific to Microsoft Teams.", - "version": "1.0.0", + "version": "1.1.0", "license": "MIT", "keywords": [ "msbot-component", @@ -29,28 +29,31 @@ "main": "lib/index.js", "types": "lib/index.d.ts", "peerDependencies": { - "adaptive-expressions": "~4.13.4", - "botbuilder": "~4.13.4", - "botbuilder-dialogs": "~4.13.4", - "botbuilder-dialogs-adaptive": "~4.13.4-preview", - "botbuilder-dialogs-adaptive-runtime-core": "~4.13.4-preview", - "botbuilder-dialogs-declarative": "~4.13.4-preview", - "botbuilder-stdlib": "~4.13.4-internal", + "adaptive-expressions": "~4.14.0", + "botbuilder": "~4.14.0", + "botbuilder-dialogs": "~4.14.0", + "botbuilder-dialogs-adaptive": "~4.14.0-preview", + "botbuilder-dialogs-adaptive-runtime-core": "~4.14.0-preview", + "botbuilder-dialogs-declarative": "~4.14.0-preview", + "botbuilder-stdlib": "~4.14.0-internal", + "botframework-connector": "~4.14.0", "lodash": "^4.17.21" }, "devDependencies": { "@tsconfig/recommended": "^1.0.1", "@types/lodash": "^4.14.168", - "@typescript-eslint/eslint-plugin": "latest", - "@typescript-eslint/parser": "latest", - "adaptive-expressions": "4.13.4", - "botbuilder": "4.13.4", - "botbuilder-dialogs": "4.13.4", - "botbuilder-dialogs-adaptive": "4.13.4-preview", - "botbuilder-dialogs-adaptive-runtime-core": "4.13.4-preview", - "botbuilder-dialogs-declarative": "4.13.4-preview", - "botbuilder-stdlib": "4.13.4-internal", - "eslint": "latest", + "@typescript-eslint/eslint-plugin": "^4.28.2", + "@typescript-eslint/parser": "^4.28.2", + "adaptive-expressions": "4.14.0", + "botbuilder": "4.14.0", + "botbuilder-dialogs": "4.14.0", + "botbuilder-dialogs-adaptive": "4.14.0-preview", + "botbuilder-dialogs-adaptive-runtime-core": "4.14.0-preview", + "botbuilder-dialogs-declarative": "4.14.0-preview", + "botbuilder-stdlib": "4.14.0-internal", + "botframework-connector": "4.14.0", + "eslint": "^7.30.0", + "eslint-plugin-prettier": "latest", "lodash": "^4.17.21", "rimraf": "^3.0.2", "typescript": "^4.0.5" diff --git a/packages/Teams/js/src/actions/actionHelpers.ts b/packages/Teams/js/src/actions/actionHelpers.ts index 60e118e449..32dfc8fe38 100644 --- a/packages/Teams/js/src/actions/actionHelpers.ts +++ b/packages/Teams/js/src/actions/actionHelpers.ts @@ -35,10 +35,10 @@ export function getValue( * BotFrameworkAdapter and TestAdapter contain them, so we just need to make sure that dc.context.adapter contains * an adapter with the appropriate auth methods. */ -export interface HasAuthMethods { - getUserToken: typeof BotFrameworkAdapter.prototype.getUserToken; - getSignInLink: typeof BotFrameworkAdapter.prototype.getSignInLink; -} +export type HasAuthMethods = Pick< + BotFrameworkAdapter, + 'getUserToken' | 'getSignInLink' +>; /** * Test to assert val has required auth methods. @@ -55,3 +55,27 @@ export const testAdapterHasAuthMethods: Test = ( tests.isFunc((val as BotFrameworkAdapter).getSignInLink)) ); }; + +/** + * This is similar to HasAuthMethods, but purely for testing since TestAdapter does not have + * createConnectorClient, but BotFrameworkAdapter does. + */ +export type HasCreateConnectorClientMethod = Pick< + BotFrameworkAdapter, + 'createConnectorClient' +>; + +/** + * Test to assert val has required createConnectorClient method. + * + * @param {any} val Usually context.adapter. + * @returns {Assertion} Asserts that val has required createConnectorClient method. + */ +export const testAdapterHasCreateConnectorClientMethod: Test = ( + val: unknown +): val is HasCreateConnectorClientMethod => { + return ( + val instanceof BotFrameworkAdapter || + tests.isFunc((val as BotFrameworkAdapter).createConnectorClient) + ); +}; diff --git a/packages/Teams/js/src/actions/baseAuthResponseDialog.ts b/packages/Teams/js/src/actions/baseAuthResponseDialog.ts index 9d9a5cfa88..e16eed86f4 100644 --- a/packages/Teams/js/src/actions/baseAuthResponseDialog.ts +++ b/packages/Teams/js/src/actions/baseAuthResponseDialog.ts @@ -2,7 +2,13 @@ // Licensed under the MIT License. import isEmpty from 'lodash/isEmpty'; -import { ActionTypes, Activity, CardAction, TokenResponse } from 'botbuilder'; +import { + ActionTypes, + Activity, + CardAction, + CloudAdapterBase, + TokenResponse, +} from 'botbuilder'; import { BoolExpressionConverter, Expression, @@ -22,6 +28,7 @@ import { BaseTeamsCacheInfoResponseDialog, BaseTeamsCacheInfoResponseDialogConfiguration, } from './baseTeamsCacheInfoResponseDialog'; +import { UserTokenClient } from 'botframework-connector'; export interface BaseAuthResponseDialogConfiguration extends BaseTeamsCacheInfoResponseDialogConfiguration { @@ -98,8 +105,8 @@ export abstract class BaseAuthResponseDialog if (tokenResponse) { // We have the token, so the user is already signed in. // Similar to OAuthInput, just return the token in the property. - if (this.property != null) { - dc.state.setValue(this.property?.getValue(dc.state), tokenResponse); + if (this.property) { + dc.state.setValue(this.property.getValue(dc.state), tokenResponse); } // End the dialog and return the token response. @@ -125,19 +132,32 @@ export abstract class BaseAuthResponseDialog * @param {CardAction} _cardAction CardAction with a valid Sign In Link. * @returns {Partial} Promise representing the InvokeResponse Activity specific to this type of auth dialog. */ - protected createOAuthInvokeResponseActivityFromCardAction( + protected abstract createOAuthInvokeResponseActivityFromCardAction( _dc: DialogContext, _cardAction: CardAction - ): Partial { - throw new Error('NotImplemented'); - } + ): Partial; private async createOAuthInvokeResponseActivityFromTitleAndConnectionName( dc: DialogContext, - title?: string, - connectionName?: string + title: string, + connectionName: string ): Promise> { - // TODO: Switch to using Cloud OAuth after this PR gets merged: https://github.com/microsoft/botbuilder-js/pull/3149 + const userTokenClient = dc.context.turnState.get( + (dc.context.adapter as CloudAdapterBase).UserTokenClientKey + ); + if (userTokenClient) { + const signInResource = await userTokenClient.getSignInResource( + connectionName, + dc.context.activity, + '' + ); + return this.createOAuthInvokeResponseActivityFromTitleAndSignInLink( + dc, + title, + signInResource.signInLink as string + ); + } + if (!testAdapterHasAuthMethods(dc.context.adapter)) { throw new Error('Auth is not supported by the current adapter.'); } else if (!title || !connectionName) { @@ -176,13 +196,27 @@ export abstract class BaseAuthResponseDialog dc: DialogContext, connectionName: string ): Promise { - // TODO: Switch to using Cloud OAuth after this PR gets merged: https://github.com/microsoft/botbuilder-js/pull/3149 + // When the Bot Service Auth flow completes, the action.State will contain a magic code used for verification. + const state = dc.context.activity.value?.state; + + const userTokenClient = dc.context.turnState.get( + (dc.context.adapter as CloudAdapterBase).UserTokenClientKey + ); + if (userTokenClient) { + return userTokenClient.getUserToken( + dc.context.activity.from?.id, + connectionName, + dc.context.activity.channelId, + state + ); + } + if (!testAdapterHasAuthMethods(dc.context.adapter)) { throw new Error('Auth is not supported by the current adapter.'); } // When the Bot Service Auth flow completes, the action.State will contain a magic code used for verification. - const magicCode = !isEmpty(dc.context.activity?.value) + const magicCode = !isEmpty(dc.context.activity.value) ? dc.context.activity.value.state : undefined; diff --git a/packages/Teams/js/src/actions/sendMessageToTeamsChannel.ts b/packages/Teams/js/src/actions/sendMessageToTeamsChannel.ts index 6f0546054b..54d6a17cbc 100644 --- a/packages/Teams/js/src/actions/sendMessageToTeamsChannel.ts +++ b/packages/Teams/js/src/actions/sendMessageToTeamsChannel.ts @@ -8,7 +8,13 @@ import { StringExpression, StringExpressionConverter, } from 'adaptive-expressions'; -import { Activity, Channels, TeamsInfo } from 'botbuilder'; +import { + Activity, + Channels, + CloudAdapterBase, + ConversationReference, + TeamsInfo, +} from 'botbuilder'; import { Converter, ConverterFactory, @@ -19,8 +25,17 @@ import { DialogTurnResult, TemplateInterface, } from 'botbuilder-dialogs'; +import { + AuthenticationConstants, + ClaimsIdentity, + ConnectorClient, + JwtTokenValidation, +} from 'botframework-connector'; import { ActivityTemplateConverter } from 'botbuilder-dialogs-adaptive/lib/converters'; -import { getValue } from './actionHelpers'; +import { + getValue, + testAdapterHasCreateConnectorClientMethod, +} from './actionHelpers'; export interface SendMessageToTeamsChannelConfiguration extends DialogConfiguration { @@ -124,11 +139,58 @@ export class SendMessageToTeamsChannel getValue(dc, this.teamsChannelId) ?? dc.context?.activity.channelData?.channel?.id; - const result = await TeamsInfo.sendMessageToTeamsChannel( - dc.context, - activity, - teamsChannelId - ); + let result: [ConversationReference, string]; + + // Check for legacy adapter + if (testAdapterHasCreateConnectorClientMethod(dc.context.adapter)) { + const credentials = dc.context.turnState.get( + dc.context.adapter.ConnectorClientKey + )?.credentials; + if (!credentials) { + throw new Error( + 'Missing credentials as MicrosoftAppCredentials in ConnectorClient from TurnState' + ); + } + + result = await TeamsInfo.sendMessageToTeamsChannel( + dc.context, + activity, + teamsChannelId + ); + } else if (dc.context.adapter instanceof CloudAdapterBase) { + const botIdentity = dc.context.turnState.get( + dc.context.adapter.BotIdentityKey + ); + + let appId: string | undefined; + if (botIdentity) { + // 'version' is sometimes empty, which will result in no id returned from GetAppIdFromClaims. + appId = JwtTokenValidation.getAppIdFromClaims(botIdentity.claims); + + if (!appId) { + appId = botIdentity.claims.find( + (claim) => claim.type === AuthenticationConstants.AudienceClaim + )?.value; + } + + if (!appId) { + throw new Error('Missing AppIdClaim in ClaimsIdentity'); + } + } else { + throw new Error( + 'Missing dc.context.adapter.BotIdentityKey in TurnContext TurnState' + ); + } + + result = await TeamsInfo.sendMessageToTeamsChannel( + dc.context, + activity, + teamsChannelId, + appId + ); + } else { + throw new Error('The adapter does not support SendMessageToTeamsChannel'); + } if (this.conversationReferenceProperty != null) { dc.state.setValue( diff --git a/packages/Teams/js/src/actions/sendTabCardResponse.ts b/packages/Teams/js/src/actions/sendTabCardResponse.ts index a4f83ba764..641b59365e 100644 --- a/packages/Teams/js/src/actions/sendTabCardResponse.ts +++ b/packages/Teams/js/src/actions/sendTabCardResponse.ts @@ -2,6 +2,7 @@ // Licensed under the MIT License. import { + BoolExpression, BoolExpressionConverter, StringExpressionConverter, } from 'adaptive-expressions'; @@ -16,47 +17,45 @@ import { import { Converter, ConverterFactory, + Dialog, DialogContext, DialogStateManager, DialogTurnResult, TemplateInterface, } from 'botbuilder-dialogs'; import { ActivityTemplateConverter } from 'botbuilder-dialogs-adaptive/lib/converters'; -import { - BaseAuthResponseDialog, - BaseAuthResponseDialogConfiguration, -} from './baseAuthResponseDialog'; -export interface SendTabCardResponseConfiguration - extends BaseAuthResponseDialogConfiguration { +export interface SendTabCardResponseConfiguration extends Dialog { cards?: TemplateInterface; + disabled?: boolean | string | BoolExpression; } /** * Send a Card Tab response to the user. */ -export class SendTabCardResponse - extends BaseAuthResponseDialog - implements BaseAuthResponseDialogConfiguration { +export class SendTabCardResponse extends Dialog { /** * Class identifier. */ public static $kind = 'Teams.SendTabCardResponse'; + /** + * Gets or sets an optional expression which if is true will disable this action. + */ + public disabled?: BoolExpression; + /** * Template for the activity expression containing Adaptive Cards to send. */ public cards?: TemplateInterface; public getConverter( - property: keyof BaseAuthResponseDialogConfiguration | string + property: keyof Dialog | string ): Converter | ConverterFactory { switch (property) { case 'disabled': return new BoolExpressionConverter(); case 'property': - case 'connectionName': - case 'title': return new StringExpressionConverter(); case 'cards': return new ActivityTemplateConverter(); @@ -114,7 +113,7 @@ export class SendTabCardResponse */ protected onComputeId(): string { return `SendTabCardResponse[\ - ${this.title?.toString() ?? ''}\ + ${this.cards?.toString() ?? ''}\ ]`; } diff --git a/packages/Welcome/Microsoft.Bot.Components.Welcome.nuspec b/packages/Welcome/Microsoft.Bot.Components.Welcome.nuspec index 43d5a1026d..06132ce5ff 100644 --- a/packages/Welcome/Microsoft.Bot.Components.Welcome.nuspec +++ b/packages/Welcome/Microsoft.Bot.Components.Welcome.nuspec @@ -2,7 +2,7 @@ Microsoft.Bot.Components.Welcome - 1.0.0 + 1.1.0 Microsoft Microsoft © Microsoft Corporation. All rights reserved. @@ -13,7 +13,7 @@ An Adaptive Dialog for greeting new and returning users on first interaction with your bot built on the Azure Bot Framework. msbot-component msbot-content conversationalcore welcome preview - + diff --git a/packages/Welcome/package.json b/packages/Welcome/package.json index 1997adafb9..bec7b8d8ab 100644 --- a/packages/Welcome/package.json +++ b/packages/Welcome/package.json @@ -1,6 +1,6 @@ { "name": "@microsoft/bot-components-welcome", - "version": "1.0.0", + "version": "1.1.0", "description": "An Adaptive Dialog for greeting new and returning users on first interaction with your bot built on the Azure Bot Framework.", "keywords": [ "microsoft", diff --git a/skills/csharp/calendarskill/CalendarSkill.csproj b/skills/csharp/calendarskill/CalendarSkill.csproj index 58f7186653..d3dba0f5ae 100644 --- a/skills/csharp/calendarskill/CalendarSkill.csproj +++ b/skills/csharp/calendarskill/CalendarSkill.csproj @@ -14,7 +14,7 @@ - + diff --git a/skills/declarative/Calendar/Calendar/Calendar.csproj b/skills/declarative/Calendar/Calendar/Calendar.csproj index 7fe5d77eb9..b651cc6a72 100644 --- a/skills/declarative/Calendar/Calendar/Calendar.csproj +++ b/skills/declarative/Calendar/Calendar/Calendar.csproj @@ -12,7 +12,7 @@ - + diff --git a/skills/declarative/People/People/People.csproj b/skills/declarative/People/People/People.csproj index 9b4d6229b0..9510a64c0f 100644 --- a/skills/declarative/People/People/People.csproj +++ b/skills/declarative/People/People/People.csproj @@ -12,9 +12,9 @@ - - - - + + + + \ No newline at end of file diff --git a/tests/functional/Bots/JavaScript/Consumers/CodeFirst/SimpleHostBot/package.json b/tests/functional/Bots/JavaScript/Consumers/CodeFirst/SimpleHostBot/package.json index bddc987858..a36b9f459d 100644 --- a/tests/functional/Bots/JavaScript/Consumers/CodeFirst/SimpleHostBot/package.json +++ b/tests/functional/Bots/JavaScript/Consumers/CodeFirst/SimpleHostBot/package.json @@ -15,8 +15,8 @@ "url": "https://github.com" }, "dependencies": { - "botbuilder": "~4.13.3", - "botbuilder-dialogs": "~4.13.3", + "botbuilder": "4.14.0-rc0", + "botbuilder-dialogs": "~4.14.0-rc0", "dotenv": "~8.2.0", "restify": "~8.5.1" }, diff --git a/tests/functional/Bots/JavaScript/Consumers/CodeFirst/WaterfallHostBot/package.json b/tests/functional/Bots/JavaScript/Consumers/CodeFirst/WaterfallHostBot/package.json index 197d3fb53a..378267472e 100644 --- a/tests/functional/Bots/JavaScript/Consumers/CodeFirst/WaterfallHostBot/package.json +++ b/tests/functional/Bots/JavaScript/Consumers/CodeFirst/WaterfallHostBot/package.json @@ -15,8 +15,8 @@ "url": "https://github.com" }, "dependencies": { - "botbuilder": "~4.13.3", - "botbuilder-dialogs": "~4.13.3", + "botbuilder": "~4.14.0-rc0", + "botbuilder-dialogs": "~4.14.0-rc0", "dotenv": "~8.2.0", "restify": "~8.5.1" }, diff --git a/tests/functional/Bots/JavaScript/Skills/CodeFirst/EchoSkillBot/package.json b/tests/functional/Bots/JavaScript/Skills/CodeFirst/EchoSkillBot/package.json index ff06ea8e8e..507be68816 100644 --- a/tests/functional/Bots/JavaScript/Skills/CodeFirst/EchoSkillBot/package.json +++ b/tests/functional/Bots/JavaScript/Skills/CodeFirst/EchoSkillBot/package.json @@ -15,7 +15,7 @@ "url": "https://github.com" }, "dependencies": { - "botbuilder": "~4.13.3", + "botbuilder": "~4.14.0-rc0", "dotenv": "^8.2.0", "restify": "~8.5.1" }, diff --git a/tests/functional/Bots/JavaScript/Skills/CodeFirst/WaterfallSkillBot/package.json b/tests/functional/Bots/JavaScript/Skills/CodeFirst/WaterfallSkillBot/package.json index f7990840f7..678f147e71 100644 --- a/tests/functional/Bots/JavaScript/Skills/CodeFirst/WaterfallSkillBot/package.json +++ b/tests/functional/Bots/JavaScript/Skills/CodeFirst/WaterfallSkillBot/package.json @@ -15,8 +15,8 @@ "url": "https://github.com" }, "dependencies": { - "botbuilder": "~4.13.3", - "botbuilder-dialogs": "~4.13.3", + "botbuilder": "~4.14.0-rc0", + "botbuilder-dialogs": "~4.14.0-rc0", "dotenv": "^8.2.0", "node-fetch": "^2.6.1", "restify": "~8.5.1" diff --git a/tests/functional/Libraries/TranscriptConverter/TranscriptConverter.csproj b/tests/functional/Libraries/TranscriptConverter/TranscriptConverter.csproj index aa4817caff..544dd18be4 100644 --- a/tests/functional/Libraries/TranscriptConverter/TranscriptConverter.csproj +++ b/tests/functional/Libraries/TranscriptConverter/TranscriptConverter.csproj @@ -8,7 +8,7 @@ - + diff --git a/tests/functional/Libraries/TranscriptTestRunner/TranscriptTestRunner.csproj b/tests/functional/Libraries/TranscriptTestRunner/TranscriptTestRunner.csproj index 357cf4ee10..86ba2118d0 100644 --- a/tests/functional/Libraries/TranscriptTestRunner/TranscriptTestRunner.csproj +++ b/tests/functional/Libraries/TranscriptTestRunner/TranscriptTestRunner.csproj @@ -11,8 +11,8 @@ - - + + diff --git a/tests/unit/Microsoft.Bot.Components.Tests.sln b/tests/unit/Microsoft.Bot.Components.Tests.sln index 74801b67a6..733f8655f9 100644 --- a/tests/unit/Microsoft.Bot.Components.Tests.sln +++ b/tests/unit/Microsoft.Bot.Components.Tests.sln @@ -17,10 +17,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "packages", "packages", "{73 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "teams", "teams", "{61708441-52A4-48F6-819A-B8D4C279C4C8}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Bot.Components.Teams.Tests", "packages\Microsoft.Bot.Components.Teams.Tests\Microsoft.Bot.Components.Teams.Tests.csproj", "{F6E872DE-52B7-4372-B546-B18B5A495C73}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Bot.Components.Graph", "..\..\packages\Graph\Microsoft.Bot.Components.Graph.csproj", "{9561BF32-D0EE-464F-981B-7E4298ACDDFB}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Bot.Components.Teams.Tests", "packages\Teams\dotnet\Microsoft.Bot.Components.Teams.Tests.csproj", "{4005C95D-BECC-450B-927D-54C8CCF178BB}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -43,14 +43,14 @@ Global {F0E73465-DB1D-4F8A-B527-88F1E2515A5C}.Debug|Any CPU.Build.0 = Debug|Any CPU {F0E73465-DB1D-4F8A-B527-88F1E2515A5C}.Release|Any CPU.ActiveCfg = Release|Any CPU {F0E73465-DB1D-4F8A-B527-88F1E2515A5C}.Release|Any CPU.Build.0 = Release|Any CPU - {F6E872DE-52B7-4372-B546-B18B5A495C73}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F6E872DE-52B7-4372-B546-B18B5A495C73}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F6E872DE-52B7-4372-B546-B18B5A495C73}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F6E872DE-52B7-4372-B546-B18B5A495C73}.Release|Any CPU.Build.0 = Release|Any CPU {9561BF32-D0EE-464F-981B-7E4298ACDDFB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {9561BF32-D0EE-464F-981B-7E4298ACDDFB}.Debug|Any CPU.Build.0 = Debug|Any CPU {9561BF32-D0EE-464F-981B-7E4298ACDDFB}.Release|Any CPU.ActiveCfg = Release|Any CPU {9561BF32-D0EE-464F-981B-7E4298ACDDFB}.Release|Any CPU.Build.0 = Release|Any CPU + {4005C95D-BECC-450B-927D-54C8CCF178BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4005C95D-BECC-450B-927D-54C8CCF178BB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4005C95D-BECC-450B-927D-54C8CCF178BB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4005C95D-BECC-450B-927D-54C8CCF178BB}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -60,7 +60,7 @@ Global {6876407A-F34E-479F-9F3C-6E6ED81EB600} = {31CBAEDA-E319-49AE-A662-AA0739205C82} {F0E73465-DB1D-4F8A-B527-88F1E2515A5C} = {31CBAEDA-E319-49AE-A662-AA0739205C82} {61708441-52A4-48F6-819A-B8D4C279C4C8} = {73825711-6685-48E2-BFA2-3FCDECE1A0FD} - {F6E872DE-52B7-4372-B546-B18B5A495C73} = {61708441-52A4-48F6-819A-B8D4C279C4C8} + {4005C95D-BECC-450B-927D-54C8CCF178BB} = {61708441-52A4-48F6-819A-B8D4C279C4C8} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {2D0FB02B-704A-44E0-AECA-A4FDF6F805C5} diff --git a/tests/unit/packages/Microsoft.Bot.Components.Teams.Tests/Microsoft.Bot.Components.Teams.Tests.csproj b/tests/unit/packages/Microsoft.Bot.Components.Teams.Tests/Microsoft.Bot.Components.Teams.Tests.csproj index 112c033e7f..ac8cdfb095 100644 --- a/tests/unit/packages/Microsoft.Bot.Components.Teams.Tests/Microsoft.Bot.Components.Teams.Tests.csproj +++ b/tests/unit/packages/Microsoft.Bot.Components.Teams.Tests/Microsoft.Bot.Components.Teams.Tests.csproj @@ -10,8 +10,8 @@ - - + + diff --git a/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_GetMeetingParticipant.test.dialog b/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_GetMeetingParticipant.test.dialog new file mode 100644 index 0000000000..85fe1ad023 --- /dev/null +++ b/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_GetMeetingParticipant.test.dialog @@ -0,0 +1,75 @@ +{ + "$schema": "../../../tests.schema", + "$kind": "Microsoft.Test.Script", + "dialog": { + "$kind": "Microsoft.AdaptiveDialog", + "id": "planningTest", + "triggers": [ + { + "$kind": "Microsoft.OnUnknownIntent", + "actions": [ + { + "$kind": "Teams.GetMeetingParticipant", + "property": "conversation.result" + }, + { + "$kind": "Teams.GetMeetingParticipant", + "property": "conversation.resultWithCustomProperties", + "meetingId": "customMeetingId", + "participantId": "customParticipantId", + "tenantId": "customTenantId" + } + ] + }, + { + "$kind": "Microsoft.OnError", + "actions": [ + { + "$kind": "Microsoft.SendActivity", + "activity": "${turn.dialogEvent.value.message}" + } + ] + } + ] + }, + "script": [ + { + "$kind": "Microsoft.Test.UserActivity", + "activity": { + "type": "message", + "text": "hi", + "from": { + "id": "participant-id", + "aadObjectId": "participant-aad-id-1" + }, + "channelData": { + "tenant": { + "id": "tenant-id-1" + }, + "meeting": { + "id": "meeting-id-1" + } + } + } + }, + { + "$kind": "Microsoft.Test.MemoryAssertions", + "assertions": [ + "conversation.result.conversation.conversationType == 'personal'", + "conversation.result.conversation.id == 'a:oneOnOneConversationId'", + "conversation.result.conversation.isGroup == false", + "conversation.result.conversation.name == 'oneOnOne'", + "conversation.result.conversation.tenantId == 'tenantId-Guid'", + "conversation.result.meeting.role == 'Organizer'", + "conversation.result.user.userPrincipalName == 'userPrincipalName-1'", + "conversation.resultWithCustomProperties.conversation.conversationType == 'personal'", + "conversation.resultWithCustomProperties.conversation.id == 'a:oneOnOneConversationId'", + "conversation.resultWithCustomProperties.conversation.isGroup == false", + "conversation.resultWithCustomProperties.conversation.name == 'oneOnOne'", + "conversation.resultWithCustomProperties.conversation.tenantId == 'tenantId-Guid'", + "conversation.resultWithCustomProperties.meeting.role == 'Organizer'", + "conversation.resultWithCustomProperties.user.userPrincipalName == 'userPrincipalName-1'" + ] + } + ] +} \ No newline at end of file diff --git a/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_GetMeetingParticipantError.test.dialog b/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_GetMeetingParticipantError.test.dialog new file mode 100644 index 0000000000..e4d8551cdd --- /dev/null +++ b/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_GetMeetingParticipantError.test.dialog @@ -0,0 +1,42 @@ +{ + "$schema": "../../../tests.schema", + "$kind": "Microsoft.Test.Script", + "dialog": { + "$kind": "Microsoft.AdaptiveDialog", + "id": "planningTest", + "triggers": [ + { + "$kind": "Microsoft.OnUnknownIntent", + "actions": [ + { + "$kind": "Teams.GetMeetingParticipant", + "property": "$result" + }, + { + "$kind": "Microsoft.SendActivity", + "activity": "${$result}" + } + ] + }, + { + "$kind": "Microsoft.OnError", + "actions": [ + { + "$kind": "Microsoft.SendActivity", + "activity": "${turn.dialogEvent.value.message}" + } + ] + } + ] + }, + "script": [ + { + "$kind": "Microsoft.Test.UserSays", + "text": "hi" + }, + { + "$kind": "Microsoft.Test.AssertReply", + "text": "Teams.GetMeetingParticipant works only on the Teams channel." + } + ] +} \ No newline at end of file diff --git a/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_GetMeetingParticipantErrorWithAdapter.test.dialog b/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_GetMeetingParticipantErrorWithAdapter.test.dialog new file mode 100644 index 0000000000..eab01c2edc --- /dev/null +++ b/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_GetMeetingParticipantErrorWithAdapter.test.dialog @@ -0,0 +1,43 @@ +{ + "$schema": "../../../tests.schema", + "$kind": "Microsoft.Test.Script", + "dialog": { + "$kind": "Microsoft.AdaptiveDialog", + "id": "planningTest", + "triggers": [ + { + "$kind": "Microsoft.OnUnknownIntent", + "actions": [ + { + "$kind": "Teams.GetMeetingParticipant", + "property": "$result", + "participantId": "=turn.channelData.doesNotExist" + }, + { + "$kind": "Microsoft.SendActivity", + "activity": "${$result}" + } + ] + }, + { + "$kind": "Microsoft.OnError", + "actions": [ + { + "$kind": "Microsoft.SendActivity", + "activity": "${turn.dialogEvent.value.message}" + } + ] + } + ] + }, + "script": [ + { + "$kind": "Microsoft.Test.UserSays", + "text": "hi" + }, + { + "$kind": "Microsoft.Test.AssertReply", + "text": "Teams.GetMeetingParticipant could not determine the participant id by expression value provided. participantId is required." + } + ] +} \ No newline at end of file diff --git a/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_GetMember.test.dialog b/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_GetMember.test.dialog new file mode 100644 index 0000000000..90d44b865c --- /dev/null +++ b/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_GetMember.test.dialog @@ -0,0 +1,65 @@ +{ + "$schema": "../../../tests.schema", + "$kind": "Microsoft.Test.Script", + "dialog": { + "$kind": "Microsoft.AdaptiveDialog", + "id": "planningTest", + "triggers": [ + { + "$kind": "Microsoft.OnUnknownIntent", + "actions": [ + { + "$kind": "Teams.GetMember", + "property": "conversation.result" + }, + { + "$kind": "Teams.GetMember", + "property": "conversation.resultWithCustomProperties", + "memberId": "customMemberId" + } + ] + } + ] + }, + "script": [ + { + "$kind": "Microsoft.Test.UserActivity", + "activity": { + "type": "message", + "text": "hi", + "from": { + "id": "member-id" + }, + "channelData": { + "tenant": { + "id": "tenant-id-1" + }, + "meeting": { + "id": "meeting-id-1" + } + } + } + }, + { + "$kind": "Microsoft.Test.MemoryAssertions", + "assertions": [ + "conversation.result.email == 'User.0@microsoft.com'", + "conversation.result.givenName == 'User'", + "conversation.result.id == '29:User-Id-0'", + "conversation.result.name == 'User Name-0'", + "conversation.result.objectId == 'User-0-Object-Id'", + "conversation.result.surname == 'Surname-0'", + "conversation.result.tenantId == 'tenant-id-1'", + "conversation.result.userPrincipalName == 'user0@microsoft.com'", + "conversation.resultWithCustomProperties.email == 'User.0@microsoft.com'", + "conversation.resultWithCustomProperties.givenName == 'User'", + "conversation.resultWithCustomProperties.id == '29:User-Id-0'", + "conversation.resultWithCustomProperties.name == 'User Name-0'", + "conversation.resultWithCustomProperties.objectId == 'User-0-Object-Id'", + "conversation.resultWithCustomProperties.surname == 'Surname-0'", + "conversation.resultWithCustomProperties.tenantId == 'tenant-id-1'", + "conversation.resultWithCustomProperties.userPrincipalName == 'user0@microsoft.com'" + ] + } + ] +} \ No newline at end of file diff --git a/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_GetMemberError.test.dialog b/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_GetMemberError.test.dialog new file mode 100644 index 0000000000..03ed714e8c --- /dev/null +++ b/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_GetMemberError.test.dialog @@ -0,0 +1,42 @@ +{ + "$schema": "../../../tests.schema", + "$kind": "Microsoft.Test.Script", + "dialog": { + "$kind": "Microsoft.AdaptiveDialog", + "id": "planningTest", + "triggers": [ + { + "$kind": "Microsoft.OnUnknownIntent", + "actions": [ + { + "$kind": "Teams.GetMember", + "property": "$result" + }, + { + "$kind": "Microsoft.SendActivity", + "activity": "${$result}" + } + ] + }, + { + "$kind": "Microsoft.OnError", + "actions": [ + { + "$kind": "Microsoft.SendActivity", + "activity": "${turn.dialogEvent.value.message}" + } + ] + } + ] + }, + "script": [ + { + "$kind": "Microsoft.Test.UserSays", + "text": "hi" + }, + { + "$kind": "Microsoft.Test.AssertReply", + "text": "Teams.GetMember works only on the Teams channel." + } + ] +} \ No newline at end of file diff --git a/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_GetMemberErrorWithAdapter.test.dialog b/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_GetMemberErrorWithAdapter.test.dialog new file mode 100644 index 0000000000..70b25fc571 --- /dev/null +++ b/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_GetMemberErrorWithAdapter.test.dialog @@ -0,0 +1,43 @@ +{ + "$schema": "../../../tests.schema", + "$kind": "Microsoft.Test.Script", + "dialog": { + "$kind": "Microsoft.AdaptiveDialog", + "id": "planningTest", + "triggers": [ + { + "$kind": "Microsoft.OnUnknownIntent", + "actions": [ + { + "$kind": "Teams.GetMember", + "property": "$result", + "memberId": "=turn.activity.channelData.doesNotExist" + }, + { + "$kind": "Microsoft.SendActivity", + "activity": "${$result}" + } + ] + }, + { + "$kind": "Microsoft.OnError", + "actions": [ + { + "$kind": "Microsoft.SendActivity", + "activity": "${turn.dialogEvent.value.message}" + } + ] + } + ] + }, + "script": [ + { + "$kind": "Microsoft.Test.UserSays", + "text": "hi" + }, + { + "$kind": "Microsoft.Test.AssertReply", + "text": "Missing MemberId in Teams.GetMember." + } + ] +} \ No newline at end of file diff --git a/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_GetPagedMembers.test.dialog b/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_GetPagedMembers.test.dialog new file mode 100644 index 0000000000..07dcae5c4f --- /dev/null +++ b/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_GetPagedMembers.test.dialog @@ -0,0 +1,68 @@ +{ + "$schema": "../../../tests.schema", + "$kind": "Microsoft.Test.Script", + "dialog": { + "$kind": "Microsoft.AdaptiveDialog", + "id": "planningTest", + "triggers": [ + { + "$kind": "Microsoft.OnUnknownIntent", + "actions": [ + { + "$kind": "Teams.GetPagedMembers", + "property": "conversation.result" + }, + { + "$kind": "Teams.GetPagedMembers", + "property": "conversation.resultWithCustomProperties", + "continuationToken": "token", + "pageSize": 2 + } + ] + } + ] + }, + "script": [ + { + "$kind": "Microsoft.Test.UserActivity", + "activity": { + "type": "message", + "text": "hi", + "from": { + "id": "member-id" + }, + "channelData": { + "tenant": { + "id": "tenant-id-1" + }, + "meeting": { + "id": "meeting-id-1" + } + } + } + }, + { + "$kind": "Microsoft.Test.MemoryAssertions", + "assertions": [ + "conversation.result.continuationToken == 'token'", + "conversation.result.members[0].email == 'User.0@microsoft.com'", + "conversation.result.members[0].id == '29:User-Id-0'", + "conversation.result.members[0].objectId == 'User-0-Object-Id'", + "conversation.result.members[1].email == 'User.1@microsoft.com'", + "conversation.result.members[1].id == '29:User-Id-1'", + "conversation.result.members[1].objectId == 'User-1-Object-Id'", + "conversation.result.members[2].email == 'User.2@microsoft.com'", + "conversation.result.members[2].id == '29:User-Id-2'", + "conversation.result.members[2].objectId == 'User-2-Object-Id'", + "conversation.resultWithCustomProperties.continuationToken == 'customToken'", + "conversation.resultWithCustomProperties.members[0].email == 'User.0@microsoft.com'", + "conversation.resultWithCustomProperties.members[0].id == '29:User-Id-0'", + "conversation.resultWithCustomProperties.members[0].objectId == 'User-0-Object-Id'", + "conversation.resultWithCustomProperties.members[1].email == 'User.1@microsoft.com'", + "conversation.resultWithCustomProperties.members[1].id == '29:User-Id-1'", + "conversation.resultWithCustomProperties.members[1].objectId == 'User-1-Object-Id'", + "not(exists(conversation.resultWithCustomProperties.members[2]))" + ] + } + ] +} \ No newline at end of file diff --git a/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_GetPagedMembersError.test.dialog b/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_GetPagedMembersError.test.dialog new file mode 100644 index 0000000000..2f2f705eb2 --- /dev/null +++ b/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_GetPagedMembersError.test.dialog @@ -0,0 +1,42 @@ +{ + "$schema": "../../../tests.schema", + "$kind": "Microsoft.Test.Script", + "dialog": { + "$kind": "Microsoft.AdaptiveDialog", + "id": "planningTest", + "triggers": [ + { + "$kind": "Microsoft.OnUnknownIntent", + "actions": [ + { + "$kind": "Teams.GetPagedMembers", + "property": "$result" + }, + { + "$kind": "Microsoft.SendActivity", + "activity": "${$result}" + } + ] + }, + { + "$kind": "Microsoft.OnError", + "actions": [ + { + "$kind": "Microsoft.SendActivity", + "activity": "${turn.dialogEvent.value.message}" + } + ] + } + ] + }, + "script": [ + { + "$kind": "Microsoft.Test.UserSays", + "text": "hi" + }, + { + "$kind": "Microsoft.Test.AssertReply", + "text": "Teams.GetPagedMembers works only on the Teams channel." + } + ] +} \ No newline at end of file diff --git a/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_GetPagedTeamMembers.test.dialog b/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_GetPagedTeamMembers.test.dialog new file mode 100644 index 0000000000..559b99576c --- /dev/null +++ b/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_GetPagedTeamMembers.test.dialog @@ -0,0 +1,65 @@ +{ + "$schema": "../../../tests.schema", + "$kind": "Microsoft.Test.Script", + "dialog": { + "$kind": "Microsoft.AdaptiveDialog", + "id": "planningTest", + "triggers": [ + { + "$kind": "Microsoft.OnUnknownIntent", + "actions": [ + { + "$kind": "Teams.GetPagedTeamMembers", + "property": "conversation.result" + }, + { + "$kind": "Teams.GetPagedTeamMembers", + "property": "conversation.resultWithCustomProperties", + "continuationToken": "token", + "pageSize": 2 + } + ] + } + ] + }, + "script": [ + { + "$kind": "Microsoft.Test.UserActivity", + "activity": { + "type": "message", + "text": "hi", + "channelData": { + "tenant": { + "id": "tenant-id-1" + }, + "team": { + "id": "team-id-1" + } + } + } + }, + { + "$kind": "Microsoft.Test.MemoryAssertions", + "assertions": [ + "conversation.result.continuationToken == 'token'", + "conversation.result.members[0].email == 'User.0@microsoft.com'", + "conversation.result.members[0].id == '29:User-Id-0'", + "conversation.result.members[0].objectId == 'User-0-Object-Id'", + "conversation.result.members[1].email == 'User.1@microsoft.com'", + "conversation.result.members[1].id == '29:User-Id-1'", + "conversation.result.members[1].objectId == 'User-1-Object-Id'", + "conversation.result.members[2].email == 'User.2@microsoft.com'", + "conversation.result.members[2].id == '29:User-Id-2'", + "conversation.result.members[2].objectId == 'User-2-Object-Id'", + "conversation.resultWithCustomProperties.continuationToken == 'customToken'", + "conversation.resultWithCustomProperties.members[0].email == 'User.0@microsoft.com'", + "conversation.resultWithCustomProperties.members[0].id == '29:User-Id-0'", + "conversation.resultWithCustomProperties.members[0].objectId == 'User-0-Object-Id'", + "conversation.resultWithCustomProperties.members[1].email == 'User.1@microsoft.com'", + "conversation.resultWithCustomProperties.members[1].id == '29:User-Id-1'", + "conversation.resultWithCustomProperties.members[1].objectId == 'User-1-Object-Id'", + "not(exists(conversation.resultWithCustomProperties.members[2]))" + ] + } + ] +} \ No newline at end of file diff --git a/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_GetPagedTeamMembersError.test.dialog b/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_GetPagedTeamMembersError.test.dialog new file mode 100644 index 0000000000..f8b11b4486 --- /dev/null +++ b/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_GetPagedTeamMembersError.test.dialog @@ -0,0 +1,42 @@ +{ + "$schema": "../../../tests.schema", + "$kind": "Microsoft.Test.Script", + "dialog": { + "$kind": "Microsoft.AdaptiveDialog", + "id": "planningTest", + "triggers": [ + { + "$kind": "Microsoft.OnUnknownIntent", + "actions": [ + { + "$kind": "Teams.GetPagedTeamMembers", + "property": "$result" + }, + { + "$kind": "Microsoft.SendActivity", + "activity": "${$result}" + } + ] + }, + { + "$kind": "Microsoft.OnError", + "actions": [ + { + "$kind": "Microsoft.SendActivity", + "activity": "${turn.dialogEvent.value.message}" + } + ] + } + ] + }, + "script": [ + { + "$kind": "Microsoft.Test.UserSays", + "text": "hi" + }, + { + "$kind": "Microsoft.Test.AssertReply", + "text": "Teams.GetPagedTeamMembers works only on the Teams channel." + } + ] +} \ No newline at end of file diff --git a/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_GetTeamChannels.test.dialog b/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_GetTeamChannels.test.dialog new file mode 100644 index 0000000000..a5e4697ba9 --- /dev/null +++ b/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_GetTeamChannels.test.dialog @@ -0,0 +1,58 @@ +{ + "$schema": "../../../tests.schema", + "$kind": "Microsoft.Test.Script", + "dialog": { + "$kind": "Microsoft.AdaptiveDialog", + "id": "planningTest", + "triggers": [ + { + "$kind": "Microsoft.OnUnknownIntent", + "actions": [ + { + "$kind": "Teams.GetTeamChannels", + "property": "conversation.result" + }, + { + "$kind": "Teams.GetTeamChannels", + "property": "conversation.resultWithCustomProperties", + "teamId": "customTeamId" + } + ] + } + ] + }, + "script": [ + { + "$kind": "Microsoft.Test.UserActivity", + "activity": { + "type": "message", + "text": "hi", + "channelData": { + "tenant": { + "id": "tenant-id-1" + }, + "team": { + "id": "team-id-1" + } + } + } + }, + { + "$kind": "Microsoft.Test.MemoryAssertions", + "assertions": [ + "conversation.result[0].id == '19:ChannelIdgeneralChannelId@thread.skype'", + "conversation.result[0].name == 'Testing0'", + "conversation.result[1].id == '19:somechannelId2e5ab3df9ae9b594bdb@thread.skype'", + "conversation.result[1].name == 'Testing1'", + "conversation.result[2].id == '19:somechannelId388ade16aa4dd375e69@thread.skype'", + "conversation.result[2].name == 'Testing2'", + "conversation.resultWithCustomProperties[0].id == '19:ChannelIdgeneralChannelId@thread.skype'", + "conversation.resultWithCustomProperties[0].name == 'Testing0'", + "conversation.resultWithCustomProperties[1].id == '19:somechannelId2e5ab3df9ae9b594bdb@thread.skype'", + "conversation.resultWithCustomProperties[1].name == 'Testing1'", + "conversation.resultWithCustomProperties[2].id == '19:somechannelId388ade16aa4dd375e69@thread.skype'", + "conversation.resultWithCustomProperties[2].name == 'Testing2'" + ] + } + ] +} \ No newline at end of file diff --git a/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_GetTeamChannelsError.test.dialog b/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_GetTeamChannelsError.test.dialog new file mode 100644 index 0000000000..7d6735ab0f --- /dev/null +++ b/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_GetTeamChannelsError.test.dialog @@ -0,0 +1,42 @@ +{ + "$schema": "../../../tests.schema", + "$kind": "Microsoft.Test.Script", + "dialog": { + "$kind": "Microsoft.AdaptiveDialog", + "id": "planningTest", + "triggers": [ + { + "$kind": "Microsoft.OnUnknownIntent", + "actions": [ + { + "$kind": "Teams.GetTeamChannels", + "property": "$result" + }, + { + "$kind": "Microsoft.SendActivity", + "activity": "${$result}" + } + ] + }, + { + "$kind": "Microsoft.OnError", + "actions": [ + { + "$kind": "Microsoft.SendActivity", + "activity": "${turn.dialogEvent.value.message}" + } + ] + } + ] + }, + "script": [ + { + "$kind": "Microsoft.Test.UserSays", + "text": "hi" + }, + { + "$kind": "Microsoft.Test.AssertReply", + "text": "Teams.GetTeamChannels works only on the Teams channel." + } + ] +} \ No newline at end of file diff --git a/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_GetTeamDetails.test.dialog b/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_GetTeamDetails.test.dialog new file mode 100644 index 0000000000..49d9f9068e --- /dev/null +++ b/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_GetTeamDetails.test.dialog @@ -0,0 +1,52 @@ +{ + "$schema": "../../../tests.schema", + "$kind": "Microsoft.Test.Script", + "dialog": { + "$kind": "Microsoft.AdaptiveDialog", + "id": "planningTest", + "triggers": [ + { + "$kind": "Microsoft.OnUnknownIntent", + "actions": [ + { + "$kind": "Teams.GetTeamDetails", + "property": "conversation.result" + }, + { + "$kind": "Teams.GetTeamDetails", + "property": "conversation.resultWithCustomProperties", + "teamId": "customTeamId" + } + ] + } + ] + }, + "script": [ + { + "$kind": "Microsoft.Test.UserActivity", + "activity": { + "type": "message", + "text": "hi", + "channelData": { + "tenant": { + "id": "tenant-id-1" + }, + "team": { + "id": "team-id-1" + } + } + } + }, + { + "$kind": "Microsoft.Test.MemoryAssertions", + "assertions": [ + "conversation.result.aadGroupId == 'Team-aadGroupId'", + "conversation.result.id == '19:generalChannelIdgeneralChannelId@thread.skype'", + "conversation.result.name == 'TeamName'", + "conversation.resultWithCustomProperties.aadGroupId == 'Team-aadGroupId'", + "conversation.resultWithCustomProperties.id == '19:generalChannelIdgeneralChannelId@thread.skype'", + "conversation.resultWithCustomProperties.name == 'TeamName'" + ] + } + ] +} \ No newline at end of file diff --git a/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_GetTeamDetailsError.test.dialog b/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_GetTeamDetailsError.test.dialog new file mode 100644 index 0000000000..a501cfdbef --- /dev/null +++ b/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_GetTeamDetailsError.test.dialog @@ -0,0 +1,42 @@ +{ + "$schema": "../../../tests.schema", + "$kind": "Microsoft.Test.Script", + "dialog": { + "$kind": "Microsoft.AdaptiveDialog", + "id": "planningTest", + "triggers": [ + { + "$kind": "Microsoft.OnUnknownIntent", + "actions": [ + { + "$kind": "Teams.GetTeamDetails", + "property": "$result" + }, + { + "$kind": "Microsoft.SendActivity", + "activity": "${$result}" + } + ] + }, + { + "$kind": "Microsoft.OnError", + "actions": [ + { + "$kind": "Microsoft.SendActivity", + "activity": "${turn.dialogEvent.value.message}" + } + ] + } + ] + }, + "script": [ + { + "$kind": "Microsoft.Test.UserSays", + "text": "hi" + }, + { + "$kind": "Microsoft.Test.AssertReply", + "text": "Teams.GetTeamDetails works only on the Teams channel." + } + ] +} \ No newline at end of file diff --git a/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_GetTeamMember.test.dialog b/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_GetTeamMember.test.dialog new file mode 100644 index 0000000000..4a45b57cf6 --- /dev/null +++ b/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_GetTeamMember.test.dialog @@ -0,0 +1,64 @@ +{ + "$schema": "../../../tests.schema", + "$kind": "Microsoft.Test.Script", + "enableTrace": true, + "dialog": { + "$kind": "Microsoft.AdaptiveDialog", + "id": "planningTest", + "triggers": [ + { + "$kind": "Microsoft.OnUnknownIntent", + "actions": [ + { + "$kind": "Teams.GetTeamMember", + "property": "conversation.result" + }, + { + "$kind": "Teams.GetTeamMember", + "property": "conversation.resultWithCustomProperties", + "memberId": "customMemberId", + "teamId": "customTeamId" + } + ] + } + ] + }, + "script": [ + { + "$kind": "Microsoft.Test.UserActivity", + "activity": { + "type": "message", + "text": "hi", + "channelData": { + "tenant": { + "id": "tenant-id-1" + }, + "team": { + "id": "team-id-1" + } + } + } + }, + { + "$kind": "Microsoft.Test.MemoryAssertions", + "assertions": [ + "conversation.result.email == 'User.0@microsoft.com'", + "conversation.result.givenName == 'User'", + "conversation.result.id == '29:User-Id-0'", + "conversation.result.name == 'User Name-0'", + "conversation.result.objectId == 'User-0-Object-Id'", + "conversation.result.surname == 'Surname-0'", + "conversation.result.tenantId == 'tenant-id-1'", + "conversation.result.userPrincipalName == 'user0@microsoft.com'", + "conversation.resultWithCustomProperties.email == 'User.0@microsoft.com'", + "conversation.resultWithCustomProperties.givenName == 'User'", + "conversation.resultWithCustomProperties.id == '29:User-Id-0'", + "conversation.resultWithCustomProperties.name == 'User Name-0'", + "conversation.resultWithCustomProperties.objectId == 'User-0-Object-Id'", + "conversation.resultWithCustomProperties.surname == 'Surname-0'", + "conversation.resultWithCustomProperties.tenantId == 'tenant-id-1'", + "conversation.resultWithCustomProperties.userPrincipalName == 'user0@microsoft.com'" + ] + } + ] +} \ No newline at end of file diff --git a/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_GetTeamMemberError.test.dialog b/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_GetTeamMemberError.test.dialog new file mode 100644 index 0000000000..6f97c8bc51 --- /dev/null +++ b/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_GetTeamMemberError.test.dialog @@ -0,0 +1,42 @@ +{ + "$schema": "../../../tests.schema", + "$kind": "Microsoft.Test.Script", + "dialog": { + "$kind": "Microsoft.AdaptiveDialog", + "id": "planningTest", + "triggers": [ + { + "$kind": "Microsoft.OnUnknownIntent", + "actions": [ + { + "$kind": "Teams.GetTeamMember", + "property": "$result" + }, + { + "$kind": "Microsoft.SendActivity", + "activity": "${$result}" + } + ] + }, + { + "$kind": "Microsoft.OnError", + "actions": [ + { + "$kind": "Microsoft.SendActivity", + "activity": "${turn.dialogEvent.value.message}" + } + ] + } + ] + }, + "script": [ + { + "$kind": "Microsoft.Test.UserSays", + "text": "hi" + }, + { + "$kind": "Microsoft.Test.AssertReply", + "text": "Teams.GetTeamMember works only on the Teams channel." + } + ] +} \ No newline at end of file diff --git a/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_GetTeamMemberErrorWithAdapter.test.dialog b/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_GetTeamMemberErrorWithAdapter.test.dialog new file mode 100644 index 0000000000..ad843a82c7 --- /dev/null +++ b/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_GetTeamMemberErrorWithAdapter.test.dialog @@ -0,0 +1,43 @@ +{ + "$schema": "../../../tests.schema", + "$kind": "Microsoft.Test.Script", + "dialog": { + "$kind": "Microsoft.AdaptiveDialog", + "id": "planningTest", + "triggers": [ + { + "$kind": "Microsoft.OnUnknownIntent", + "actions": [ + { + "$kind": "Teams.GetTeamMember", + "property": "$result", + "memberId": "=turn.activity.channelData.doesNotExist" + }, + { + "$kind": "Microsoft.SendActivity", + "activity": "${$result}" + } + ] + }, + { + "$kind": "Microsoft.OnError", + "actions": [ + { + "$kind": "Microsoft.SendActivity", + "activity": "${turn.dialogEvent.value.message}" + } + ] + } + ] + }, + "script": [ + { + "$kind": "Microsoft.Test.UserSays", + "text": "hi" + }, + { + "$kind": "Microsoft.Test.AssertReply", + "text": "Missing MemberId in Teams.GetTeamMember." + } + ] +} \ No newline at end of file diff --git a/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_SendAppBasedLinkQueryResponse.test.dialog b/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_SendAppBasedLinkQueryResponse.test.dialog new file mode 100644 index 0000000000..188d548469 --- /dev/null +++ b/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_SendAppBasedLinkQueryResponse.test.dialog @@ -0,0 +1,50 @@ +{ + "$schema": "../../../tests.schema", + "$kind": "Microsoft.Test.Script", + "dialog": { + "$kind": "Microsoft.AdaptiveDialog", + "id": "planningTest", + "triggers": [ + { + "$kind": "Microsoft.OnUnknownIntent", + "actions": [ + { + "$kind": "Teams.SendAppBasedLinkQueryResponse", + "card": { + "type": "message", + "attachments": [ + { + "contentType": "application/vnd.microsoft.card.thumbnail", + "content": { + "title": "card-title" + } + } + ] + } + } + ] + } + ] + }, + "script": [ + { + "$kind": "Microsoft.Test.UserActivity", + "activity": { + "type": "message", + "text": "hi", + "name": "composeExtension/queryLink" + } + }, + { + "$kind": "Microsoft.Test.AssertReplyActivity", + "assertions": [ + "type == 'invokeResponse'", + "conversation.id == 'Action_SendAppBasedLinkQueryResponse'", + "value.body.composeExtension.attachmentLayout == 'list'", + "value.body.composeExtension.type == 'result'", + "value.body.composeExtension.attachments[0].contentType == 'application/vnd.microsoft.card.thumbnail'", + "value.body.composeExtension.attachments[0].content.title == 'card-title'" + ] + } + ] +} \ No newline at end of file diff --git a/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_SendAppBasedLinkQueryResponseError.test.dialog b/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_SendAppBasedLinkQueryResponseError.test.dialog new file mode 100644 index 0000000000..2323a1cb05 --- /dev/null +++ b/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_SendAppBasedLinkQueryResponseError.test.dialog @@ -0,0 +1,79 @@ +{ + "$schema": "../../../tests.schema", + "$kind": "Microsoft.Test.Script", + "dialog": { + "$kind": "Microsoft.AdaptiveDialog", + "id": "planningTest", + "recognizer": { + "$kind": "Microsoft.RegexRecognizer", + "intents": [ + { + "intent": "NoCard", + "pattern": "NoCard" + }, + { + "intent": "NoAttachments", + "pattern": "NoAttachments" + } + ] + }, + "triggers": [ + { + "$kind": "Microsoft.OnIntent", + "intent": "NoCard", + "actions": [ + { + "$kind": "Teams.SendAppBasedLinkQueryResponse" + } + ] + }, + { + "$kind": "Microsoft.OnIntent", + "intent": "NoAttachments", + "actions": [ + { + "$kind": "Teams.SendAppBasedLinkQueryResponse", + "card": { + "type": "message" + } + } + ] + }, + { + "$kind": "Microsoft.OnError", + "actions": [ + { + "$kind": "Microsoft.SendActivity", + "activity": "${turn.dialogEvent.value.message}" + } + ] + } + ] + }, + "script": [ + { + "$kind": "Microsoft.Test.UserActivity", + "activity": { + "type": "message", + "text": "NoCard", + "name": "composeExtension/queryLink" + } + }, + { + "$kind": "Microsoft.Test.AssertReply", + "text": "An activity with attachments is required for Teams.SendAppBasedLinkQueryResponse." + }, + { + "$kind": "Microsoft.Test.UserActivity", + "activity": { + "type": "message", + "text": "NoAttachments", + "name": "composeExtension/queryLink" + } + }, + { + "$kind": "Microsoft.Test.AssertReply", + "text": "Invalid activity. An attachment is required for Teams.SendAppBasedLinkQueryResponse." + } + ] +} \ No newline at end of file diff --git a/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_SendMEActionResponse.test.dialog b/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_SendMEActionResponse.test.dialog new file mode 100644 index 0000000000..4f83b08266 --- /dev/null +++ b/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_SendMEActionResponse.test.dialog @@ -0,0 +1,56 @@ +{ + "$schema": "../../../tests.schema", + "$kind": "Microsoft.Test.Script", + "dialog": { + "$kind": "Microsoft.AdaptiveDialog", + "id": "planningTest", + "triggers": [ + { + "$kind": "Microsoft.OnUnknownIntent", + "actions": [ + { + "$kind": "Teams.SendMEActionResponse", + "title": "some title", + "height": 1, + "width": 2, + "completionBotId": "someBotId", + "card": { + "type": "message", + "attachments": [ + { + "contentType": "application/vnd.microsoft.card.thumbnail", + "content": { + "title": "card-title" + } + } + ] + } + } + ] + } + ] + }, + "script": [ + { + "$kind": "Microsoft.Test.UserActivity", + "activity": { + "type": "message", + "text": "hi", + "name": "composeExtension/queryLink" + } + }, + { + "$kind": "Microsoft.Test.AssertReplyActivity", + "assertions": [ + "type == 'invokeResponse'", + "conversation.id == 'Action_SendMEActionResponse'", + "value.body.task.value.completionBotId == 'someBotId'", + "value.body.task.value.height == 1", + "value.body.task.value.title == 'some title'", + "value.body.task.value.width == 2", + "value.body.task.value.card.contentType == 'application/vnd.microsoft.card.thumbnail'", + "value.body.task.value.card.content.title == 'card-title'" + ] + } + ] +} \ No newline at end of file diff --git a/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_SendMEActionResponseError.test.dialog b/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_SendMEActionResponseError.test.dialog new file mode 100644 index 0000000000..8fd4f9bb21 --- /dev/null +++ b/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_SendMEActionResponseError.test.dialog @@ -0,0 +1,54 @@ +{ + "$schema": "../../../tests.schema", + "$kind": "Microsoft.Test.Script", + "dialog": { + "$kind": "Microsoft.AdaptiveDialog", + "id": "planningTest", + "recognizer": { + "$kind": "Microsoft.RegexRecognizer", + "intents": [ + { + "intent": "NoAttachments", + "pattern": "NoAttachments" + } + ] + }, + "triggers": [ + { + "$kind": "Microsoft.OnIntent", + "intent": "NoAttachments", + "actions": [ + { + "$kind": "Teams.SendMEActionResponse", + "card": { + "type": "message" + } + } + ] + }, + { + "$kind": "Microsoft.OnError", + "actions": [ + { + "$kind": "Microsoft.SendActivity", + "activity": "${turn.dialogEvent.value.message}" + } + ] + } + ] + }, + "script": [ + { + "$kind": "Microsoft.Test.UserActivity", + "activity": { + "type": "message", + "text": "NoAttachments", + "name": "composeExtension/queryLink" + } + }, + { + "$kind": "Microsoft.Test.AssertReply", + "text": "Missing attachments in Teams.SendMEActionResponse." + } + ] +} \ No newline at end of file diff --git a/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_SendMEAttachmentsResponse.test.dialog b/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_SendMEAttachmentsResponse.test.dialog new file mode 100644 index 0000000000..5ae8adb325 --- /dev/null +++ b/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_SendMEAttachmentsResponse.test.dialog @@ -0,0 +1,50 @@ +{ + "$schema": "../../../tests.schema", + "$kind": "Microsoft.Test.Script", + "dialog": { + "$kind": "Microsoft.AdaptiveDialog", + "id": "planningTest", + "triggers": [ + { + "$kind": "Microsoft.OnUnknownIntent", + "actions": [ + { + "$kind": "Teams.SendMEAttachmentsResponse", + "attachments": { + "type": "message", + "attachments": [ + { + "contentType": "application/vnd.microsoft.card.thumbnail", + "content": { + "title": "card-title" + } + } + ] + } + } + ] + } + ] + }, + "script": [ + { + "$kind": "Microsoft.Test.UserActivity", + "activity": { + "type": "message", + "text": "hi", + "name": "composeExtension/queryLink" + } + }, + { + "$kind": "Microsoft.Test.AssertReplyActivity", + "assertions": [ + "type == 'invokeResponse'", + "conversation.id == 'Action_SendMEAttachmentsResponse'", + "value.body.composeExtension.attachmentLayout == 'list'", + "value.body.composeExtension.type == 'result'", + "value.body.composeExtension.attachments[0].contentType == 'application/vnd.microsoft.card.thumbnail'", + "value.body.composeExtension.attachments[0].content.title == 'card-title'" + ] + } + ] +} \ No newline at end of file diff --git a/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_SendMEAttachmentsResponseError.test.dialog b/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_SendMEAttachmentsResponseError.test.dialog new file mode 100644 index 0000000000..ed4f18b0b0 --- /dev/null +++ b/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_SendMEAttachmentsResponseError.test.dialog @@ -0,0 +1,44 @@ +{ + "$schema": "../../../tests.schema", + "$kind": "Microsoft.Test.Script", + "dialog": { + "$kind": "Microsoft.AdaptiveDialog", + "id": "planningTest", + "triggers": [ + { + "$kind": "Microsoft.OnUnknownIntent", + "actions": [ + { + "$kind": "Teams.SendMEAttachmentsResponse", + "attachments": { + "type": "message" + } + } + ] + }, + { + "$kind": "Microsoft.OnError", + "actions": [ + { + "$kind": "Microsoft.SendActivity", + "activity": "${turn.dialogEvent.value.message}" + } + ] + } + ] + }, + "script": [ + { + "$kind": "Microsoft.Test.UserActivity", + "activity": { + "type": "message", + "text": "hi", + "name": "composeExtension/queryLink" + } + }, + { + "$kind": "Microsoft.Test.AssertReply", + "text": "Missing attachments in Teams.SendMEAttachmentsResponse." + } + ] +} \ No newline at end of file diff --git a/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_SendMEAuthResponse.test.dialog b/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_SendMEAuthResponse.test.dialog new file mode 100644 index 0000000000..6acfa74080 --- /dev/null +++ b/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_SendMEAuthResponse.test.dialog @@ -0,0 +1,41 @@ +{ + "$schema": "../../../tests.schema", + "$kind": "Microsoft.Test.Script", + "dialog": { + "$kind": "Microsoft.AdaptiveDialog", + "id": "planningTest", + "triggers": [ + { + "$kind": "Microsoft.OnUnknownIntent", + "actions": [ + { + "$kind": "Teams.SendMEAuthResponse", + "connectionName": "testConnection", + "title": "test title" + } + ] + } + ] + }, + "script": [ + { + "$kind": "Microsoft.Test.UserActivity", + "activity": { + "type": "message", + "text": "hi", + "name": "composeExtension/queryLink" + } + }, + { + "$kind": "Microsoft.Test.AssertReplyActivity", + "assertions": [ + "type == 'invokeResponse'", + "conversation.id == 'Action_SendMEAuthResponse'", + "value.body.composeExtension.type == 'auth'", + "value.body.composeExtension.suggestedActions.actions[0].title == 'test title'", + "value.body.composeExtension.suggestedActions.actions[0].type == 'openUrl'", + "startsWith(value.body.composeExtension.suggestedActions.actions[0].value, 'https://fake.com/oauthsignin/testConnection')" + ] + } + ] +} \ No newline at end of file diff --git a/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_SendMEAuthResponseError.test.dialog b/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_SendMEAuthResponseError.test.dialog new file mode 100644 index 0000000000..b860a92226 --- /dev/null +++ b/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_SendMEAuthResponseError.test.dialog @@ -0,0 +1,43 @@ +{ + "$schema": "../../../tests.schema", + "$kind": "Microsoft.Test.Script", + "dialog": { + "$kind": "Microsoft.AdaptiveDialog", + "id": "planningTest", + "triggers": [ + { + "$kind": "Microsoft.OnUnknownIntent", + "actions": [ + { + "$kind": "Teams.SendMEAuthResponse", + "connectionName": "someConnection", + "title": "someTitle" + } + ] + }, + { + "$kind": "Microsoft.OnError", + "actions": [ + { + "$kind": "Microsoft.SendActivity", + "activity": "${turn.dialogEvent.value.message}" + } + ] + } + ] + }, + "script": [ + { + "$kind": "Microsoft.Test.UserActivity", + "activity": { + "type": "message", + "text": "NoConnectionName", + "name": "composeExtension/queryLink" + } + }, + { + "$kind": "Microsoft.Test.AssertReply", + "text": "Teams.SendMEAuthResponse: not supported by the current adapter." + } + ] +} \ No newline at end of file diff --git a/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_SendMEAuthResponseErrorWithAdapter.test.dialog b/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_SendMEAuthResponseErrorWithAdapter.test.dialog new file mode 100644 index 0000000000..7d7425ba9b --- /dev/null +++ b/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_SendMEAuthResponseErrorWithAdapter.test.dialog @@ -0,0 +1,88 @@ +{ + "$schema": "../../../tests.schema", + "$kind": "Microsoft.Test.Script", + "dialog": { + "$kind": "Microsoft.AdaptiveDialog", + "id": "planningTest", + "recognizer": { + "$kind": "Microsoft.RegexRecognizer", + "intents": [ + { + "intent": "NoConnectionName", + "pattern": "NoConnectionName" + }, + { + "intent": "NoTitle", + "pattern": "NoTitle" + } + ] + }, + "triggers": [ + { + "$kind": "Microsoft.OnIntent", + "intent": "NoConnectionName", + "actions": [ + { + "$kind": "Teams.SendMEAuthResponse", + "connectionName": "=turn.channelData.DoesNotExist" + } + ] + }, + { + "$kind": "Microsoft.OnIntent", + "intent": "NoTitle", + "actions": [ + { + "$kind": "Teams.SendMEAuthResponse", + "connectionName": "testConnection", + "title": "=turn.channelData.doesNotExist" + } + ] + }, + { + "$kind": "Microsoft.OnIntent", + "intent": "NoAttachments", + "actions": [ + { + "$kind": "Teams.SendMEAuthResponse" + } + ] + }, + { + "$kind": "Microsoft.OnError", + "actions": [ + { + "$kind": "Microsoft.SendActivity", + "activity": "${turn.dialogEvent.value.message}" + } + ] + } + ] + }, + "script": [ + { + "$kind": "Microsoft.Test.UserActivity", + "activity": { + "type": "message", + "text": "NoConnectionName", + "name": "composeExtension/queryLink" + } + }, + { + "$kind": "Microsoft.Test.AssertReply", + "text": "A valid ConnectionName is required for auth responses." + }, + { + "$kind": "Microsoft.Test.UserActivity", + "activity": { + "type": "message", + "text": "NoTitle", + "name": "composeExtension/queryLink" + } + }, + { + "$kind": "Microsoft.Test.AssertReply", + "text": "A valid Title is required for auth responses." + } + ] +} \ No newline at end of file diff --git a/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_SendMEBotMessagePreviewResponse.test.dialog b/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_SendMEBotMessagePreviewResponse.test.dialog new file mode 100644 index 0000000000..74343b9138 --- /dev/null +++ b/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_SendMEBotMessagePreviewResponse.test.dialog @@ -0,0 +1,52 @@ +{ + "$schema": "../../../tests.schema", + "$kind": "Microsoft.Test.Script", + "dialog": { + "$kind": "Microsoft.AdaptiveDialog", + "id": "planningTest", + "triggers": [ + { + "$kind": "Microsoft.OnUnknownIntent", + "actions": [ + { + "$kind": "Teams.SendMEBotMessagePreviewResponse", + "card": { + "type": "message", + "attachments": [ + { + "contentType": "application/vnd.microsoft.card.thumbnail", + "content": { + "title": "card-title" + } + } + ] + } + } + ] + } + ] + }, + "script": [ + { + "$kind": "Microsoft.Test.UserActivity", + "activity": { + "type": "message", + "text": "hi", + "name": "composeExtension/queryLink" + } + }, + { + "$kind": "Microsoft.Test.AssertReplyActivity", + "assertions": [ + "type == 'invokeResponse'", + "conversation.id == 'Action_SendMEBotMessagePreviewResponse'", + "value.body.composeExtension.type == 'botMessagePreview'", + "value.body.composeExtension.activityPreview.attachmentLayout == 'list'", + "value.body.composeExtension.activityPreview.inputHint == 'acceptingInput'", + "value.body.composeExtension.activityPreview.type == 'message'", + "value.body.composeExtension.activityPreview.attachments[0].contentType == 'application/vnd.microsoft.card.thumbnail'", + "value.body.composeExtension.activityPreview.attachments[0].content.title == 'card-title'" + ] + } + ] +} \ No newline at end of file diff --git a/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_SendMEBotMessagePreviewResponseError.test.dialog b/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_SendMEBotMessagePreviewResponseError.test.dialog new file mode 100644 index 0000000000..3ef5fd3bac --- /dev/null +++ b/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_SendMEBotMessagePreviewResponseError.test.dialog @@ -0,0 +1,79 @@ +{ + "$schema": "../../../tests.schema", + "$kind": "Microsoft.Test.Script", + "dialog": { + "$kind": "Microsoft.AdaptiveDialog", + "id": "planningTest", + "recognizer": { + "$kind": "Microsoft.RegexRecognizer", + "intents": [ + { + "intent": "NoCard", + "pattern": "NoCard" + }, + { + "intent": "NoAttachments", + "pattern": "NoAttachments" + } + ] + }, + "triggers": [ + { + "$kind": "Microsoft.OnIntent", + "intent": "NoCard", + "actions": [ + { + "$kind": "Teams.SendMEBotMessagePreviewResponse" + } + ] + }, + { + "$kind": "Microsoft.OnIntent", + "intent": "NoAttachments", + "actions": [ + { + "$kind": "Teams.SendMEBotMessagePreviewResponse", + "card": { + "type": "message" + } + } + ] + }, + { + "$kind": "Microsoft.OnError", + "actions": [ + { + "$kind": "Microsoft.SendActivity", + "activity": "${turn.dialogEvent.value.message}" + } + ] + } + ] + }, + "script": [ + { + "$kind": "Microsoft.Test.UserActivity", + "activity": { + "type": "message", + "text": "NoCard", + "name": "composeExtension/queryLink" + } + }, + { + "$kind": "Microsoft.Test.AssertReply", + "text": "A valid Card is required for Teams.SendMEBotMessagePreviewResponse." + }, + { + "$kind": "Microsoft.Test.UserActivity", + "activity": { + "type": "message", + "text": "NoAttachments", + "name": "composeExtension/queryLink" + } + }, + { + "$kind": "Microsoft.Test.AssertReply", + "text": "Invalid activity. An attachment is required for Teams.SendMEBotMessagePreviewResponse." + } + ] +} \ No newline at end of file diff --git a/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_SendMEConfigQuerySettingUrlResponse.test.dialog b/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_SendMEConfigQuerySettingUrlResponse.test.dialog new file mode 100644 index 0000000000..65d8447602 --- /dev/null +++ b/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_SendMEConfigQuerySettingUrlResponse.test.dialog @@ -0,0 +1,39 @@ +{ + "$schema": "../../../tests.schema", + "$kind": "Microsoft.Test.Script", + "dialog": { + "$kind": "Microsoft.AdaptiveDialog", + "id": "planningTest", + "triggers": [ + { + "$kind": "Microsoft.OnUnknownIntent", + "actions": [ + { + "$kind": "Teams.SendMEConfigQuerySettingUrlResponse", + "configUrl": "someBaseUrl.com/somePage.html" + } + ] + } + ] + }, + "script": [ + { + "$kind": "Microsoft.Test.UserActivity", + "activity": { + "type": "message", + "text": "hi", + "name": "composeExtension/queryLink" + } + }, + { + "$kind": "Microsoft.Test.AssertReplyActivity", + "assertions": [ + "type == 'invokeResponse'", + "conversation.id == 'Action_SendMEConfigQuerySettingUrlResponse'", + "value.body.composeExtension.type == 'config'", + "value.body.composeExtension.suggestedActions.actions[0].type == 'openUrl'", + "value.body.composeExtension.suggestedActions.actions[0].value == 'someBaseUrl.com/somePage.html'" + ] + } + ] +} \ No newline at end of file diff --git a/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_SendMEConfigQuerySettingUrlResponseError.test.dialog b/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_SendMEConfigQuerySettingUrlResponseError.test.dialog new file mode 100644 index 0000000000..6245df449d --- /dev/null +++ b/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_SendMEConfigQuerySettingUrlResponseError.test.dialog @@ -0,0 +1,32 @@ +{ + "$schema": "../../../tests.schema", + "$kind": "Microsoft.Test.Script", + "dialog": { + "$kind": "Microsoft.AdaptiveDialog", + "id": "planningTest", + "triggers": [ + { + "$kind": "Microsoft.OnUnknownIntent", + "actions": [ + { + "$kind": "Teams.SendMEConfigQuerySettingUrlResponse" + } + ] + } + ] + }, + "script": [ + { + "$kind": "Microsoft.Test.UserActivity", + "activity": { + "type": "message", + "text": "hi", + "name": "composeExtension/queryLink" + } + }, + { + "$kind": "Microsoft.Test.AssertReply", + "text": "ConfigUrl is required for Teams.SendMEConfigQuerySettingUrlResponse." + } + ] +} \ No newline at end of file diff --git a/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_SendMEMessageResponse.test.dialog b/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_SendMEMessageResponse.test.dialog new file mode 100644 index 0000000000..0efa1dfde0 --- /dev/null +++ b/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_SendMEMessageResponse.test.dialog @@ -0,0 +1,38 @@ +{ + "$schema": "../../../tests.schema", + "$kind": "Microsoft.Test.Script", + "dialog": { + "$kind": "Microsoft.AdaptiveDialog", + "id": "planningTest", + "triggers": [ + { + "$kind": "Microsoft.OnUnknownIntent", + "actions": [ + { + "$kind": "Teams.SendMEMessageResponse", + "message": "i want to send this to the user" + } + ] + } + ] + }, + "script": [ + { + "$kind": "Microsoft.Test.UserActivity", + "activity": { + "type": "message", + "text": "hi", + "name": "composeExtension/queryLink" + } + }, + { + "$kind": "Microsoft.Test.AssertReplyActivity", + "assertions": [ + "type == 'invokeResponse'", + "conversation.id == 'Action_SendMEMessageResponse'", + "value.body.composeExtension.type == 'message'", + "value.body.composeExtension.text == 'i want to send this to the user'" + ] + } + ] +} \ No newline at end of file diff --git a/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_SendMEMessageResponseError.test.dialog b/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_SendMEMessageResponseError.test.dialog new file mode 100644 index 0000000000..6f4f595c4b --- /dev/null +++ b/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_SendMEMessageResponseError.test.dialog @@ -0,0 +1,32 @@ +{ + "$schema": "../../../tests.schema", + "$kind": "Microsoft.Test.Script", + "dialog": { + "$kind": "Microsoft.AdaptiveDialog", + "id": "planningTest", + "triggers": [ + { + "$kind": "Microsoft.OnUnknownIntent", + "actions": [ + { + "$kind": "Teams.SendMEMessageResponse" + } + ] + } + ] + }, + "script": [ + { + "$kind": "Microsoft.Test.UserActivity", + "activity": { + "type": "message", + "text": "hi", + "name": "composeExtension/queryLink" + } + }, + { + "$kind": "Microsoft.Test.AssertReply", + "text": "A Message is required for Teams.SendMEMessageResponse." + } + ] +} \ No newline at end of file diff --git a/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_SendMESelectItemResponse.test.dialog b/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_SendMESelectItemResponse.test.dialog new file mode 100644 index 0000000000..b9a8f8ddb2 --- /dev/null +++ b/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_SendMESelectItemResponse.test.dialog @@ -0,0 +1,50 @@ +{ + "$schema": "../../../tests.schema", + "$kind": "Microsoft.Test.Script", + "dialog": { + "$kind": "Microsoft.AdaptiveDialog", + "id": "planningTest", + "triggers": [ + { + "$kind": "Microsoft.OnUnknownIntent", + "actions": [ + { + "$kind": "Teams.SendMESelectItemResponse", + "card": { + "type": "message", + "attachments": [ + { + "contentType": "application/vnd.microsoft.card.thumbnail", + "content": { + "title": "card-title" + } + } + ] + } + } + ] + } + ] + }, + "script": [ + { + "$kind": "Microsoft.Test.UserActivity", + "activity": { + "type": "message", + "text": "hi", + "name": "composeExtension/queryLink" + } + }, + { + "$kind": "Microsoft.Test.AssertReplyActivity", + "assertions": [ + "type == 'invokeResponse'", + "conversation.id == 'Action_SendMESelectItemResponse'", + "value.body.composeExtension.type == 'result'", + "value.body.composeExtension.attachmentLayout == 'list'", + "value.body.composeExtension.attachments[0].contentType == 'application/vnd.microsoft.card.thumbnail'", + "value.body.composeExtension.attachments[0].content.title == 'card-title'" + ] + } + ] +} \ No newline at end of file diff --git a/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_SendMESelectItemResponseError.test.dialog b/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_SendMESelectItemResponseError.test.dialog new file mode 100644 index 0000000000..a78eb61c61 --- /dev/null +++ b/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_SendMESelectItemResponseError.test.dialog @@ -0,0 +1,79 @@ +{ + "$schema": "../../../tests.schema", + "$kind": "Microsoft.Test.Script", + "dialog": { + "$kind": "Microsoft.AdaptiveDialog", + "id": "planningTest", + "recognizer": { + "$kind": "Microsoft.RegexRecognizer", + "intents": [ + { + "intent": "NoCard", + "pattern": "NoCard" + }, + { + "intent": "NoAttachments", + "pattern": "NoAttachments" + } + ] + }, + "triggers": [ + { + "$kind": "Microsoft.OnIntent", + "intent": "NoCard", + "actions": [ + { + "$kind": "Teams.SendMESelectItemResponse" + } + ] + }, + { + "$kind": "Microsoft.OnIntent", + "intent": "NoAttachments", + "actions": [ + { + "$kind": "Teams.SendMESelectItemResponse", + "card": { + "type": "message" + } + } + ] + }, + { + "$kind": "Microsoft.OnError", + "actions": [ + { + "$kind": "Microsoft.SendActivity", + "activity": "${turn.dialogEvent.value.message}" + } + ] + } + ] + }, + "script": [ + { + "$kind": "Microsoft.Test.UserActivity", + "activity": { + "type": "message", + "text": "NoCard", + "name": "composeExtension/queryLink" + } + }, + { + "$kind": "Microsoft.Test.AssertReply", + "text": "A valid card is required for Teams.SendMESelectItemResponse." + }, + { + "$kind": "Microsoft.Test.UserActivity", + "activity": { + "type": "message", + "text": "NoAttachments", + "name": "composeExtension/queryLink" + } + }, + { + "$kind": "Microsoft.Test.AssertReply", + "text": "Invalid activity. An attachment is required for Teams.SendMESelectItemResponse." + } + ] +} \ No newline at end of file diff --git a/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_SendMessageToTeamsChannel.test.dialog b/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_SendMessageToTeamsChannel.test.dialog new file mode 100644 index 0000000000..6996effedb --- /dev/null +++ b/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_SendMessageToTeamsChannel.test.dialog @@ -0,0 +1,63 @@ +{ + "$schema": "../../../tests.schema", + "$kind": "Microsoft.Test.Script", + "dialog": { + "$kind": "Microsoft.AdaptiveDialog", + "id": "planningTest", + "triggers": [ + { + "$kind": "Microsoft.OnUnknownIntent", + "actions": [ + { + "$kind": "Teams.SendMessageToTeamsChannel", + "conversationReferenceProperty": "conversation.result", + "activity": { + "type": "message", + "text": "This is a message to a Teams Channel" + } + }, + { + "$kind": "Teams.SendMessageToTeamsChannel", + "conversationReferenceProperty": "conversation.resultWithCustomProperties", + "activity": { + "type": "message", + "text": "This is a message to a Teams Channel with custom properties" + }, + "teamsChannelId": "customTeamsChannel" + } + ] + } + ] + }, + "script": [ + { + "$kind": "Microsoft.Test.UserActivity", + "activity": { + "type": "message", + "text": "hi", + "channelData": { + "channel": { + "id": "fakeTeamsChannelToSendTo" + } + } + } + }, + { + "$kind": "Microsoft.Test.MemoryAssertions", + "assertions": [ + "conversation.result.activityId == '0'", + "conversation.result.channelId == 'msteams'", + "conversation.result.conversation.conversationType == 'groupChat'", + "conversation.result.conversation.isGroup == true", + "conversation.result.conversation.name == 'group'", + "conversation.result.conversation.tenantId == 'tenantId-Guid'", + "conversation.resultWithCustomProperties.activityId == '0'", + "conversation.resultWithCustomProperties.channelId == 'msteams'", + "conversation.resultWithCustomProperties.conversation.conversationType == 'groupChat'", + "conversation.resultWithCustomProperties.conversation.isGroup == true", + "conversation.resultWithCustomProperties.conversation.name == 'group'", + "conversation.resultWithCustomProperties.conversation.tenantId == 'tenantId-Guid'" + ] + } + ] +} \ No newline at end of file diff --git a/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_SendMessageToTeamsChannelError.test.dialog b/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_SendMessageToTeamsChannelError.test.dialog new file mode 100644 index 0000000000..19419f3b1c --- /dev/null +++ b/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_SendMessageToTeamsChannelError.test.dialog @@ -0,0 +1,37 @@ +{ + "$schema": "../../../tests.schema", + "$kind": "Microsoft.Test.Script", + "dialog": { + "$kind": "Microsoft.AdaptiveDialog", + "id": "planningTest", + "triggers": [ + { + "$kind": "Microsoft.OnUnknownIntent", + "actions": [ + { + "$kind": "Teams.SendMessageToTeamsChannel" + } + ] + }, + { + "$kind": "Microsoft.OnError", + "actions": [ + { + "$kind": "Microsoft.SendActivity", + "activity": "${turn.dialogEvent.value.message}" + } + ] + } + ] + }, + "script": [ + { + "$kind": "Microsoft.Test.UserSays", + "text": "hi" + }, + { + "$kind": "Microsoft.Test.AssertReply", + "text": "Teams.SendMessageToTeamsChannel works only on the Teams channel." + } + ] +} \ No newline at end of file diff --git a/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_SendTabAuthResponseError.test.dialog b/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_SendTabAuthResponseError.test.dialog new file mode 100644 index 0000000000..b5e40d7263 --- /dev/null +++ b/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_SendTabAuthResponseError.test.dialog @@ -0,0 +1,43 @@ +{ + "$schema": "../../../tests.schema", + "$kind": "Microsoft.Test.Script", + "dialog": { + "$kind": "Microsoft.AdaptiveDialog", + "id": "planningTest", + "triggers": [ + { + "$kind": "Microsoft.OnUnknownIntent", + "actions": [ + { + "$kind": "Teams.SendTabAuthResponse", + "connectionName": "someConnection", + "title": "someTitle" + } + ] + }, + { + "$kind": "Microsoft.OnError", + "actions": [ + { + "$kind": "Microsoft.SendActivity", + "activity": "${turn.dialogEvent.value.message}" + } + ] + } + ] + }, + "script": [ + { + "$kind": "Microsoft.Test.UserActivity", + "activity": { + "type": "message", + "text": "NoConnectionName", + "name": "composeExtension/queryLink" + } + }, + { + "$kind": "Microsoft.Test.AssertReply", + "text": "Teams.SendTabAuthResponse: not supported by the current adapter." + } + ] +} \ No newline at end of file diff --git a/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_SendTabAuthResponseErrorWithAdapter.test.dialog b/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_SendTabAuthResponseErrorWithAdapter.test.dialog new file mode 100644 index 0000000000..8172f1d27c --- /dev/null +++ b/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_SendTabAuthResponseErrorWithAdapter.test.dialog @@ -0,0 +1,88 @@ +{ + "$schema": "../../../tests.schema", + "$kind": "Microsoft.Test.Script", + "dialog": { + "$kind": "Microsoft.AdaptiveDialog", + "id": "planningTest", + "recognizer": { + "$kind": "Microsoft.RegexRecognizer", + "intents": [ + { + "intent": "NoConnectionName", + "pattern": "NoConnectionName" + }, + { + "intent": "NoTitle", + "pattern": "NoTitle" + } + ] + }, + "triggers": [ + { + "$kind": "Microsoft.OnIntent", + "intent": "NoConnectionName", + "actions": [ + { + "$kind": "Teams.SendTabAuthResponse", + "connectionName": "=turn.channelData.DoesNotExist" + } + ] + }, + { + "$kind": "Microsoft.OnIntent", + "intent": "NoTitle", + "actions": [ + { + "$kind": "Teams.SendTabAuthResponse", + "connectionName": "testConnection", + "title": "=turn.channelData.doesNotExist" + } + ] + }, + { + "$kind": "Microsoft.OnIntent", + "intent": "NoAttachments", + "actions": [ + { + "$kind": "Teams.SendTabAuthResponse" + } + ] + }, + { + "$kind": "Microsoft.OnError", + "actions": [ + { + "$kind": "Microsoft.SendActivity", + "activity": "${turn.dialogEvent.value.message}" + } + ] + } + ] + }, + "script": [ + { + "$kind": "Microsoft.Test.UserActivity", + "activity": { + "type": "message", + "text": "NoConnectionName", + "name": "tab/fetch" + } + }, + { + "$kind": "Microsoft.Test.AssertReply", + "text": "A valid ConnectionName is required for auth responses." + }, + { + "$kind": "Microsoft.Test.UserActivity", + "activity": { + "type": "message", + "text": "NoTitle", + "name": "tab/fetch" + } + }, + { + "$kind": "Microsoft.Test.AssertReply", + "text": "A valid Title is required for auth responses." + } + ] +} \ No newline at end of file diff --git a/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_SendTabCardResponse.test.dialog b/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_SendTabCardResponse.test.dialog new file mode 100644 index 0000000000..7e06e3ecde --- /dev/null +++ b/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_SendTabCardResponse.test.dialog @@ -0,0 +1,66 @@ +{ + "$schema": "../../../tests.schema", + "$kind": "Microsoft.Test.Script", + "dialog": { + "$kind": "Microsoft.AdaptiveDialog", + "id": "planningTest", + "triggers": [ + { + "$kind": "Microsoft.OnUnknownIntent", + "actions": [ + { + "$kind": "Teams.SendTabCardResponse", + "cards": { + "type": "message", + "attachments": [ + { + "contentType": "application/vnd.microsoft.card.adaptive", + "content": { + "type": "AdaptiveCard", + "$schema": "http://adaptivecards.io/schemas/adaptive-card.json", + "version": "1.2", + "body": [ + { + "type": "Container", + "items": [ + { + "type": "RichTextBlock", + "inlines": [ + { + "type": "TextRun", + "text": "Success!" + } + ] + } + ] + } + ] + } + } + ] + } + } + ] + } + ] + }, + "script": [ + { + "$kind": "Microsoft.Test.UserActivity", + "activity": { + "type": "message", + "text": "hi", + "name": "tab/fetch" + } + }, + { + "$kind": "Microsoft.Test.AssertReplyActivity", + "assertions": [ + "type == 'invokeResponse'", + "conversation.id == 'Action_SendTabCardResponse'", + "value.body.tab.type == 'continue'", + "value.body.tab.value.cards[0].card.body[0].items[0].inlines[0].text == 'Success!'" + ] + } + ] +} \ No newline at end of file diff --git a/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_SendTabCardResponseError.test.dialog b/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_SendTabCardResponseError.test.dialog new file mode 100644 index 0000000000..1e8a6bdc8c --- /dev/null +++ b/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_SendTabCardResponseError.test.dialog @@ -0,0 +1,79 @@ +{ + "$schema": "../../../tests.schema", + "$kind": "Microsoft.Test.Script", + "dialog": { + "$kind": "Microsoft.AdaptiveDialog", + "id": "planningTest", + "recognizer": { + "$kind": "Microsoft.RegexRecognizer", + "intents": [ + { + "intent": "NoCard", + "pattern": "NoCard" + }, + { + "intent": "NoAttachments", + "pattern": "NoAttachments" + } + ] + }, + "triggers": [ + { + "$kind": "Microsoft.OnIntent", + "intent": "NoCard", + "actions": [ + { + "$kind": "Teams.SendTabCardResponse" + } + ] + }, + { + "$kind": "Microsoft.OnIntent", + "intent": "NoAttachments", + "actions": [ + { + "$kind": "Teams.SendTabCardResponse", + "cards": { + + } + } + ] + }, + { + "$kind": "Microsoft.OnError", + "actions": [ + { + "$kind": "Microsoft.SendActivity", + "activity": "${turn.dialogEvent.value.message}" + } + ] + } + ] + }, + "script": [ + { + "$kind": "Microsoft.Test.UserActivity", + "activity": { + "type": "message", + "text": "NoCard", + "name": "tab/fetch" + } + }, + { + "$kind": "Microsoft.Test.AssertReply", + "text": "Valid Cards are required for Teams.SendTabCardResponse." + }, + { + "$kind": "Microsoft.Test.UserActivity", + "activity": { + "type": "message", + "text": "NoAttachments", + "name": "tab/fetch" + } + }, + { + "$kind": "Microsoft.Test.AssertReply", + "text": "Invalid activity. Attachment(s) are required for Teams.SendTabCardResponse." + } + ] +} \ No newline at end of file diff --git a/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_SendTaskModuleCardResponse.test.dialog b/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_SendTaskModuleCardResponse.test.dialog new file mode 100644 index 0000000000..d3c0c285fd --- /dev/null +++ b/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_SendTaskModuleCardResponse.test.dialog @@ -0,0 +1,56 @@ +{ + "$schema": "../../../tests.schema", + "$kind": "Microsoft.Test.Script", + "dialog": { + "$kind": "Microsoft.AdaptiveDialog", + "id": "planningTest", + "triggers": [ + { + "$kind": "Microsoft.OnUnknownIntent", + "actions": [ + { + "$kind": "Teams.SendTaskModuleCardResponse", + "title": "some title", + "height": 1, + "width": 2, + "completionBotId": "someBotId", + "card": { + "type": "message", + "attachments": [ + { + "contentType": "application/vnd.microsoft.card.thumbnail", + "content": { + "title": "card-title" + } + } + ] + } + } + ] + } + ] + }, + "script": [ + { + "$kind": "Microsoft.Test.UserActivity", + "activity": { + "type": "message", + "text": "hi", + "name": "composeExtension/queryLink" + } + }, + { + "$kind": "Microsoft.Test.AssertReplyActivity", + "assertions": [ + "type == 'invokeResponse'", + "conversation.id == 'Action_SendTaskModuleCardResponse'", + "value.body.task.value.completionBotId == 'someBotId'", + "value.body.task.value.height == 1", + "value.body.task.value.title == 'some title'", + "value.body.task.value.width == 2", + "value.body.task.value.card.contentType == 'application/vnd.microsoft.card.thumbnail'", + "value.body.task.value.card.content.title == 'card-title'" + ] + } + ] +} \ No newline at end of file diff --git a/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_SendTaskModuleCardResponseError.test.dialog b/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_SendTaskModuleCardResponseError.test.dialog new file mode 100644 index 0000000000..20e353e108 --- /dev/null +++ b/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_SendTaskModuleCardResponseError.test.dialog @@ -0,0 +1,79 @@ +{ + "$schema": "../../../tests.schema", + "$kind": "Microsoft.Test.Script", + "dialog": { + "$kind": "Microsoft.AdaptiveDialog", + "id": "planningTest", + "recognizer": { + "$kind": "Microsoft.RegexRecognizer", + "intents": [ + { + "intent": "NoCard", + "pattern": "NoCard" + }, + { + "intent": "NoAttachments", + "pattern": "NoAttachments" + } + ] + }, + "triggers": [ + { + "$kind": "Microsoft.OnIntent", + "intent": "NoCard", + "actions": [ + { + "$kind": "Teams.SendTaskModuleCardResponse" + } + ] + }, + { + "$kind": "Microsoft.OnIntent", + "intent": "NoAttachments", + "actions": [ + { + "$kind": "Teams.SendTaskModuleCardResponse", + "card": { + "type": "message" + } + } + ] + }, + { + "$kind": "Microsoft.OnError", + "actions": [ + { + "$kind": "Microsoft.SendActivity", + "activity": "${turn.dialogEvent.value.message}" + } + ] + } + ] + }, + "script": [ + { + "$kind": "Microsoft.Test.UserActivity", + "activity": { + "type": "message", + "text": "NoCard", + "name": "composeExtension/queryLink" + } + }, + { + "$kind": "Microsoft.Test.AssertReply", + "text": "A valid Card is required for Teams.SendTaskModuleCardResponse." + }, + { + "$kind": "Microsoft.Test.UserActivity", + "activity": { + "type": "message", + "text": "NoAttachments", + "name": "composeExtension/queryLink" + } + }, + { + "$kind": "Microsoft.Test.AssertReply", + "text": "Invalid activity. An attachment is required for Teams.SendTaskModuleCardResponse." + } + ] +} \ No newline at end of file diff --git a/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_SendTaskModuleMessageResponse.test.dialog b/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_SendTaskModuleMessageResponse.test.dialog new file mode 100644 index 0000000000..5819cd6331 --- /dev/null +++ b/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_SendTaskModuleMessageResponse.test.dialog @@ -0,0 +1,37 @@ +{ + "$schema": "../../../tests.schema", + "$kind": "Microsoft.Test.Script", + "dialog": { + "$kind": "Microsoft.AdaptiveDialog", + "id": "planningTest", + "triggers": [ + { + "$kind": "Microsoft.OnUnknownIntent", + "actions": [ + { + "$kind": "Teams.SendTaskModuleMessageResponse", + "message": "i want to send this to the user" + } + ] + } + ] + }, + "script": [ + { + "$kind": "Microsoft.Test.UserActivity", + "activity": { + "type": "message", + "text": "hi", + "name": "composeExtension/queryLink" + } + }, + { + "$kind": "Microsoft.Test.AssertReplyActivity", + "assertions": [ + "type == 'invokeResponse'", + "conversation.id == 'Action_SendTaskModuleMessageResponse'", + "value.body.task.value == 'i want to send this to the user'" + ] + } + ] +} \ No newline at end of file diff --git a/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_SendTaskModuleUrlResponse.test.dialog b/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_SendTaskModuleUrlResponse.test.dialog new file mode 100644 index 0000000000..53a2d07eac --- /dev/null +++ b/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_SendTaskModuleUrlResponse.test.dialog @@ -0,0 +1,47 @@ +{ + "$schema": "../../../tests.schema", + "$kind": "Microsoft.Test.Script", + "dialog": { + "$kind": "Microsoft.AdaptiveDialog", + "id": "planningTest", + "triggers": [ + { + "$kind": "Microsoft.OnUnknownIntent", + "actions": [ + { + "$kind": "Teams.SendTaskModuleUrlResponse", + "title": "some title", + "height": 1, + "width": 2, + "completionBotId": "someBotId", + "url": "http://thisIsTheMainUrl.com", + "fallbackUrl": "http://thisIsTheFallbackUrl.net/okay/falling/back_now" + } + ] + } + ] + }, + "script": [ + { + "$kind": "Microsoft.Test.UserActivity", + "activity": { + "type": "message", + "text": "hi", + "name": "composeExtension/queryLink" + } + }, + { + "$kind": "Microsoft.Test.AssertReplyActivity", + "assertions": [ + "type == 'invokeResponse'", + "conversation.id == 'Action_SendTaskModuleUrlResponse'", + "value.body.task.value.completionBotId == 'someBotId'", + "value.body.task.value.height == 1", + "value.body.task.value.title == 'some title'", + "value.body.task.value.width == 2", + "value.body.task.value.url == 'http://thisIsTheMainUrl.com'", + "value.body.task.value.fallbackUrl == 'http://thisIsTheFallbackUrl.net/okay/falling/back_now'" + ] + } + ] +} \ No newline at end of file diff --git a/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_SendTaskModuleUrlResponseError.test.dialog b/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_SendTaskModuleUrlResponseError.test.dialog new file mode 100644 index 0000000000..e30217656b --- /dev/null +++ b/tests/unit/packages/Teams/Shared Tests/ActionTests/Action_SendTaskModuleUrlResponseError.test.dialog @@ -0,0 +1,42 @@ +{ + "$schema": "../../../tests.schema", + "$kind": "Microsoft.Test.Script", + "dialog": { + "$kind": "Microsoft.AdaptiveDialog", + "id": "planningTest", + "triggers": [ + { + "$kind": "Microsoft.OnUnknownIntent", + "actions": [ + { + "$kind": "Teams.SendTaskModuleUrlResponse", + "url": "=turn.channelData.doesNotExist" + } + ] + }, + { + "$kind": "Microsoft.OnError", + "actions": [ + { + "$kind": "Microsoft.SendActivity", + "activity": "${turn.dialogEvent.value.message}" + } + ] + } + ] + }, + "script": [ + { + "$kind": "Microsoft.Test.UserActivity", + "activity": { + "type": "message", + "text": "hi", + "name": "composeExtension/queryLink" + } + }, + { + "$kind": "Microsoft.Test.AssertReply", + "text": "Missing Url for Teams.SendTaskModuleUrlResponse." + } + ] +} \ No newline at end of file diff --git a/tests/unit/packages/Teams/Shared Tests/ConditionalTests/ConditionalsTests_OnTeamsActivityTypes.test.dialog b/tests/unit/packages/Teams/Shared Tests/ConditionalTests/ConditionalsTests_OnTeamsActivityTypes.test.dialog new file mode 100644 index 0000000000..ef348c61ac --- /dev/null +++ b/tests/unit/packages/Teams/Shared Tests/ConditionalTests/ConditionalsTests_OnTeamsActivityTypes.test.dialog @@ -0,0 +1,616 @@ +{ + "$schema": "../../../tests.schema", + "$kind": "Microsoft.Test.Script", + "dialog": { + "$kind": "Microsoft.AdaptiveDialog", + "id": "planningTest", + "triggers": [ + { + "$kind": "Microsoft.OnInvokeActivity", + "actions": [ + { + "$kind": "Microsoft.SendActivity", + "activity": "${turn.activity.text}" + } + ] + }, + { + "$kind": "Microsoft.OnConversationUpdateActivity", + "actions": [ + { + "$kind": "Microsoft.SendActivity", + "activity": "${turn.activity.text}" + } + ] + }, + { + "$kind": "Teams.OnAppBasedLinkQuery", + "condition": "turn.activity.text == 'OnAppBasedLinkQuery'", + "actions": [ + { + "$kind": "Microsoft.SendActivity", + "activity": "OnAppBasedLinkQuery" + } + ] + }, + { + "$kind": "Teams.OnCardAction", + "condition": "turn.activity.text == 'OnCardAction'", + "actions": [ + { + "$kind": "Microsoft.SendActivity", + "activity": "OnCardAction" + } + ] + }, + { + "$kind": "Teams.OnChannelCreated", + "condition": "turn.activity.text == 'OnChannelCreated'", + "actions": [ + { + "$kind": "Microsoft.SendActivity", + "activity": "OnChannelCreated" + } + ] + }, + { + "$kind": "Teams.OnChannelDeleted", + "condition": "turn.activity.text == 'OnChannelDeleted'", + "actions": [ + { + "$kind": "Microsoft.SendActivity", + "activity": "OnChannelDeleted" + } + ] + }, + { + "$kind": "Teams.OnChannelRenamed", + "condition": "turn.activity.text == 'OnChannelRenamed'", + "actions": [ + { + "$kind": "Microsoft.SendActivity", + "activity": "OnChannelRenamed" + } + ] + }, + { + "$kind": "Teams.OnChannelRestored", + "condition": "turn.activity.text == 'OnChannelRestored'", + "actions": [ + { + "$kind": "Microsoft.SendActivity", + "activity": "OnChannelRestored" + } + ] + }, + { + "$kind": "Teams.OnFileConsent", + "condition": "turn.activity.text == 'OnFileConsent'", + "actions": [ + { + "$kind": "Microsoft.SendActivity", + "activity": "OnFileConsent" + } + ] + }, + { + "$kind": "Teams.OnMECardButtonClicked", + "condition": "turn.activity.text == 'OnCardButtonClicked'", + "actions": [ + { + "$kind": "Microsoft.SendActivity", + "activity": "OnCardButtonClicked" + } + ] + }, + { + "$kind": "Teams.OnMEConfigQuerySettingUrl", + "condition": "turn.activity.text == 'OnConfigurationQuerySettingUrl'", + "actions": [ + { + "$kind": "Microsoft.SendActivity", + "activity": "OnConfigurationQuerySettingUrl" + } + ] + }, + { + "$kind": "Teams.OnMEConfigSetting", + "condition": "turn.activity.text == 'OnConfigurationSetting'", + "actions": [ + { + "$kind": "Microsoft.SendActivity", + "activity": "OnConfigurationSetting" + } + ] + }, + { + "$kind": "Teams.OnMEFetchTask", + "condition": "turn.activity.text == 'OnFetchTask'", + "actions": [ + { + "$kind": "Microsoft.SendActivity", + "activity": "OnFetchTask" + } + ] + }, + { + "$kind": "Teams.OnMEQuery", + "condition": "turn.activity.text == 'OnQuery'", + "actions": [ + { + "$kind": "Microsoft.SendActivity", + "activity": "OnQuery" + } + ] + }, + { + "$kind": "Teams.OnMESelectItem", + "condition": "turn.activity.text == 'OnSelectItem'", + "actions": [ + { + "$kind": "Microsoft.SendActivity", + "activity": "OnSelectItem" + } + ] + }, + { + "$kind": "Teams.OnMESubmitAction", + "condition": "turn.activity.text == 'OnSubmitAction'", + "actions": [ + { + "$kind": "Microsoft.SendActivity", + "activity": "OnSubmitAction" + } + ] + }, + { + "$kind": "Teams.OnO365ConnectorCardAction", + "condition": "turn.activity.text == 'OnO365ConnectorCardAction'", + "actions": [ + { + "$kind": "Microsoft.SendActivity", + "activity": "OnO365ConnectorCardAction" + } + ] + }, + { + "$kind": "Teams.OnTaskModuleFetch", + "condition": "turn.activity.text == 'OnTaskModuleFetch'", + "actions": [ + { + "$kind": "Microsoft.SendActivity", + "activity": "OnTaskModuleFetch" + } + ] + }, + { + "$kind": "Teams.OnTabFetch", + "condition": "turn.activity.text == 'OnTabFetch'", + "actions": [ + { + "$kind": "Microsoft.SendActivity", + "activity": "OnTabFetch" + } + ] + }, + { + "$kind": "Teams.OnTaskModuleSubmit", + "condition": "turn.activity.text == 'OnTaskModuleSubmit'", + "actions": [ + { + "$kind": "Microsoft.SendActivity", + "activity": "OnTaskModuleSubmit" + } + ] + }, + { + "$kind": "Teams.OnTabSubmit", + "condition": "turn.activity.text == 'OnTabSubmit'", + "actions": [ + { + "$kind": "Microsoft.SendActivity", + "activity": "OnTabSubmit" + } + ] + }, + { + "$kind": "Teams.OnTeamArchived", + "condition": "turn.activity.text == 'OnTeamArchived'", + "actions": [ + { + "$kind": "Microsoft.SendActivity", + "activity": "OnTeamArchived" + } + ] + }, + { + "$kind": "Teams.OnTeamDeleted", + "condition": "turn.activity.text == 'OnTeamDeleted'", + "actions": [ + { + "$kind": "Microsoft.SendActivity", + "activity": "OnTeamDeleted" + } + ] + }, + { + "$kind": "Teams.OnTeamHardDeleted", + "condition": "turn.activity.text == 'OnTeamHardDeleted'", + "actions": [ + { + "$kind": "Microsoft.SendActivity", + "activity": "OnTeamHardDeleted" + } + ] + }, + { + "$kind": "Teams.OnTeamRenamed", + "condition": "turn.activity.text == 'OnTeamRenamed'", + "actions": [ + { + "$kind": "Microsoft.SendActivity", + "activity": "OnTeamRenamed" + } + ] + }, + { + "$kind": "Teams.OnTeamRestored", + "condition": "turn.activity.text == 'OnTeamRestored'", + "actions": [ + { + "$kind": "Microsoft.SendActivity", + "activity": "OnTeamRestored" + } + ] + }, + { + "$kind": "Teams.OnTeamUnarchived", + "condition": "turn.activity.text == 'OnTeamUnarchived'", + "actions": [ + { + "$kind": "Microsoft.SendActivity", + "activity": "OnTeamUnarchived" + } + ] + } + ], + "autoEndDialog": false, + "defaultResultProperty": "dialog.result" + }, + "script": [ + { + "$kind": "Microsoft.Test.UserActivity", + "activity": { + "type": "invoke", + "text": "OnAppBasedLinkQuery", + "value": {}, + "name": "composeExtension/queryLink" + } + }, + { + "$kind": "Microsoft.Test.AssertReply", + "text": "OnAppBasedLinkQuery" + }, + { + "$kind": "Microsoft.Test.UserActivity", + "activity": { + "type": "invoke", + "text": "OnCardAction", + "value": {} + } + }, + { + "$kind": "Microsoft.Test.AssertReply", + "text": "OnCardAction" + }, + { + "$kind": "Microsoft.Test.UserActivity", + "activity": { + "type": "conversationUpdate", + "text": "OnChannelCreated", + "channelData": { + "eventType": "channelCreated" + } + } + }, + { + "$kind": "Microsoft.Test.AssertReply", + "text": "OnChannelCreated" + }, + { + "$kind": "Microsoft.Test.UserActivity", + "activity": { + "type": "conversationUpdate", + "text": "OnChannelDeleted", + "channelData": { + "eventType": "channelDeleted" + } + } + }, + { + "$kind": "Microsoft.Test.AssertReply", + "text": "OnChannelDeleted" + }, + { + "$kind": "Microsoft.Test.UserActivity", + "activity": { + "type": "conversationUpdate", + "text": "OnChannelRenamed", + "channelData": { + "eventType": "channelRenamed" + } + } + }, + { + "$kind": "Microsoft.Test.AssertReply", + "text": "OnChannelRenamed" + }, + { + "$kind": "Microsoft.Test.UserActivity", + "activity": { + "type": "conversationUpdate", + "text": "OnChannelRestored", + "channelData": { + "eventType": "channelRestored" + } + } + }, + { + "$kind": "Microsoft.Test.AssertReply", + "text": "OnChannelRestored" + }, + { + "$kind": "Microsoft.Test.UserActivity", + "activity": { + "type": "invoke", + "text": "OnFileConsent", + "value": {}, + "name": "fileConsent/invoke" + } + }, + { + "$kind": "Microsoft.Test.AssertReply", + "text": "OnFileConsent" + }, + { + "$kind": "Microsoft.Test.UserActivity", + "activity": { + "type": "invoke", + "text": "OnCardButtonClicked", + "value": {}, + "name": "composeExtension/onCardButtonClicked" + } + }, + { + "$kind": "Microsoft.Test.AssertReply", + "text": "OnCardButtonClicked" + }, + { + "$kind": "Microsoft.Test.UserActivity", + "activity": { + "type": "invoke", + "text": "OnConfigurationQuerySettingUrl", + "value": {}, + "name": "composeExtension/querySettingUrl" + } + }, + { + "$kind": "Microsoft.Test.AssertReply", + "text": "OnConfigurationQuerySettingUrl" + }, + { + "$kind": "Microsoft.Test.UserActivity", + "activity": { + "type": "invoke", + "text": "OnConfigurationSetting", + "value": {}, + "name": "composeExtension/setting" + } + }, + { + "$kind": "Microsoft.Test.AssertReply", + "text": "OnConfigurationSetting" + }, + { + "$kind": "Microsoft.Test.UserActivity", + "activity": { + "type": "invoke", + "text": "OnFetchTask", + "value": {}, + "name": "composeExtension/fetchTask" + } + }, + { + "$kind": "Microsoft.Test.AssertReply", + "text": "OnFetchTask" + }, + { + "$kind": "Microsoft.Test.UserActivity", + "activity": { + "type": "invoke", + "text": "OnQuery", + "value": {}, + "name": "composeExtension/query" + } + }, + { + "$kind": "Microsoft.Test.AssertReply", + "text": "OnQuery" + }, + { + "$kind": "Microsoft.Test.UserActivity", + "activity": { + "type": "invoke", + "text": "OnSelectItem", + "value": {}, + "name": "composeExtension/selectItem" + } + }, + { + "$kind": "Microsoft.Test.AssertReply", + "text": "OnSelectItem" + }, + { + "$kind": "Microsoft.Test.UserActivity", + "activity": { + "type": "invoke", + "text": "OnSubmitAction", + "value": {}, + "name": "composeExtension/submitAction" + } + }, + { + "$kind": "Microsoft.Test.AssertReply", + "text": "OnSubmitAction" + }, + { + "$kind": "Microsoft.Test.UserActivity", + "activity": { + "type": "invoke", + "text": "OnO365ConnectorCardAction", + "value": {}, + "name": "actionableMessage/executeAction" + } + }, + { + "$kind": "Microsoft.Test.AssertReply", + "text": "OnO365ConnectorCardAction" + }, + { + "$kind": "Microsoft.Test.UserActivity", + "activity": { + "type": "invoke", + "text": "OnTabFetch", + "value": {}, + "name": "tab/fetch" + } + }, + { + "$kind": "Microsoft.Test.AssertReply", + "text": "OnTabFetch" + }, + { + "$kind": "Microsoft.Test.UserActivity", + "activity": { + "type": "invoke", + "text": "OnTaskModuleFetch", + "value": {}, + "name": "task/fetch" + } + }, + { + "$kind": "Microsoft.Test.AssertReply", + "text": "OnTaskModuleFetch" + }, + { + "$kind": "Microsoft.Test.UserActivity", + "activity": { + "type": "invoke", + "text": "OnTabSubmit", + "value": {}, + "name": "tab/submit" + } + }, + { + "$kind": "Microsoft.Test.AssertReply", + "text": "OnTabSubmit" + }, + { + "$kind": "Microsoft.Test.UserActivity", + "activity": { + "type": "invoke", + "text": "OnTaskModuleSubmit", + "value": {}, + "name": "task/submit" + } + }, + { + "$kind": "Microsoft.Test.AssertReply", + "text": "OnTaskModuleSubmit" + }, + { + "$kind": "Microsoft.Test.UserActivity", + "activity": { + "type": "conversationUpdate", + "text": "OnTeamArchived", + "channelData": { + "eventType": "teamArchived" + } + } + }, + { + "$kind": "Microsoft.Test.AssertReply", + "text": "OnTeamArchived" + }, + { + "$kind": "Microsoft.Test.UserActivity", + "activity": { + "type": "conversationUpdate", + "text": "OnTeamDeleted", + "channelData": { + "eventType": "teamDeleted" + } + } + }, + { + "$kind": "Microsoft.Test.AssertReply", + "text": "OnTeamDeleted" + }, + { + "$kind": "Microsoft.Test.UserActivity", + "activity": { + "type": "conversationUpdate", + "text": "OnTeamHardDeleted", + "channelData": { + "eventType": "teamHardDeleted" + } + } + }, + { + "$kind": "Microsoft.Test.AssertReply", + "text": "OnTeamHardDeleted" + }, + { + "$kind": "Microsoft.Test.UserActivity", + "activity": { + "type": "conversationUpdate", + "text": "OnTeamRenamed", + "channelData": { + "eventType": "teamRenamed" + } + } + }, + { + "$kind": "Microsoft.Test.AssertReply", + "text": "OnTeamRenamed" + }, + { + "$kind": "Microsoft.Test.UserActivity", + "activity": { + "type": "conversationUpdate", + "text": "OnTeamRestored", + "channelData": { + "eventType": "teamRestored" + } + } + }, + { + "$kind": "Microsoft.Test.AssertReply", + "text": "OnTeamRestored" + }, + { + "$kind": "Microsoft.Test.UserActivity", + "activity": { + "type": "conversationUpdate", + "text": "OnTeamUnarchived", + "channelData": { + "eventType": "teamUnarchived" + } + } + }, + { + "$kind": "Microsoft.Test.AssertReply", + "text": "OnTeamUnarchived" + } + ] +} \ No newline at end of file diff --git a/tests/unit/packages/Teams/dotnet/ActionTests.cs b/tests/unit/packages/Teams/dotnet/ActionTests.cs new file mode 100644 index 0000000000..c4f5ff73f7 --- /dev/null +++ b/tests/unit/packages/Teams/dotnet/ActionTests.cs @@ -0,0 +1,592 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using System.Net.Http; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.Bot.Builder; +using Microsoft.Bot.Builder.Dialogs; +using Microsoft.Bot.Builder.Dialogs.Adaptive; +using Microsoft.Bot.Builder.Dialogs.Adaptive.Testing; +using Microsoft.Bot.Builder.Dialogs.Declarative; +using Microsoft.Bot.Builder.Dialogs.Declarative.Obsolete; +using Microsoft.Bot.Connector; +using Microsoft.Bot.Connector.Authentication; +using Microsoft.Bot.Schema; +using Microsoft.Bot.Schema.Teams; +using Newtonsoft.Json.Linq; +using Xunit; + +namespace Microsoft.Bot.Components.Teams.Tests +{ + [CollectionDefinition("Dialogs.Adaptive")] + public class ActionTests : IClassFixture + { + private readonly ResourceExplorerFixture _resourceExplorerFixture; + + public ActionTests(ResourceExplorerFixture resourceExplorerFixture) + { + ComponentRegistration.Add(new DeclarativeComponentRegistration()); + ComponentRegistration.Add(new DialogsComponentRegistration()); + ComponentRegistration.Add(new AdaptiveComponentRegistration()); + ComponentRegistration.Add(new LanguageGenerationComponentRegistration()); + ComponentRegistration.Add(new AdaptiveTestingComponentRegistration()); + ComponentRegistration.Add(new DeclarativeComponentRegistrationBridge()); + + _resourceExplorerFixture = resourceExplorerFixture.Initialize(nameof(ActionTests)); + } + + [Fact] + public async Task Action_GetMeetingParticipant() + { + var participantResult = GetParticipant().ToString(); + + var uriToContent = new Dictionary() + { + { "/v1/meetings/meeting-id-1/participants/participant-aad-id-1?tenantId=tenant-id-1", participantResult }, + { "/v1/meetings/customMeetingId/participants/customParticipantId?tenantId=customTenantId", participantResult } + }; + + var teamsMiddleware = GetTeamsMiddleware(uriToContent); + await TestUtils.RunTestScript(_resourceExplorerFixture.ResourceExplorer, middleware: new[] { teamsMiddleware }); + } + + [Fact] + public async Task Action_GetMeetingParticipantError() + { + await TestUtils.RunTestScript(_resourceExplorerFixture.ResourceExplorer, adapterChannel: Channels.Test); + } + + [Fact] + public async Task Action_GetMeetingParticipantErrorWithAdapter() + { + await TestUtils.RunTestScript(_resourceExplorerFixture.ResourceExplorer); + } + + [Fact] + public async Task Action_GetMember() + { + var participantResult = GetParticipant().ToString(); + var uriToContent = new Dictionary() + { + { "/v3/conversations/Action_GetMember/members/member-id", participantResult }, + { "/v3/conversations/Action_GetMember/members/customMemberId", participantResult } + }; + + var teamsMiddleware = GetTeamsMiddleware(uriToContent); + await TestUtils.RunTestScript(_resourceExplorerFixture.ResourceExplorer, middleware: new[] { teamsMiddleware }); + } + + [Fact] + public async Task Action_GetMemberError() + { + await TestUtils.RunTestScript(_resourceExplorerFixture.ResourceExplorer, adapterChannel: Channels.Test); + } + + [Fact] + public async Task Action_GetMemberErrorWithAdapter() + { + await TestUtils.RunTestScript(_resourceExplorerFixture.ResourceExplorer); + } + + [Fact] + public async Task Action_GetPagedMembers() + { + var threeMembers = GenerateTeamMembers(3); + threeMembers.ContinuationToken = "customToken"; + + var twoMembers = GenerateTeamMembers(2); + twoMembers.ContinuationToken = "token"; + + var uriToContent = new Dictionary() + { + { "/v3/conversations/Action_GetPagedMembers/pagedmembers", JObject.FromObject(threeMembers).ToString() }, + { "/v3/conversations/Action_GetPagedMembers/pagedmembers?pageSize=2&continuationToken=token", JObject.FromObject(twoMembers).ToString() } + }; + + var teamsMiddleware = GetTeamsMiddleware(uriToContent); + await TestUtils.RunTestScript(_resourceExplorerFixture.ResourceExplorer, middleware: new[] { teamsMiddleware }); + } + + [Fact] + public async Task Action_GetPagedMembersError() + { + await TestUtils.RunTestScript(_resourceExplorerFixture.ResourceExplorer, adapterChannel: Channels.Test); + } + + [Fact] + public async Task Action_GetPagedTeamMembers() + { + var threeMembers = GenerateTeamMembers(3); + threeMembers.ContinuationToken = "token"; + + var twoMembers = GenerateTeamMembers(2); + twoMembers.ContinuationToken = "token"; + + var uriToContent = new Dictionary() + { + { "/v3/conversations/team-id-1/pagedmembers", JObject.FromObject(threeMembers).ToString() }, + { "/v3/conversations/team-id-1/pagedmembers?pageSize=2&continuationToken=token", JObject.FromObject(twoMembers).ToString() } + }; + + var teamsMiddleware = GetTeamsMiddleware(uriToContent); + await TestUtils.RunTestScript(_resourceExplorerFixture.ResourceExplorer, middleware: new[] { teamsMiddleware }); + } + + [Fact] + public async Task Action_GetPagedTeamMembersError() + { + await TestUtils.RunTestScript(_resourceExplorerFixture.ResourceExplorer, adapterChannel: Channels.Test); + } + + [Fact] + public async Task Action_GetTeamChannels() + { + var conversations = JObject.FromObject(new ConversationList + { + Conversations = new List() + { + new ChannelInfo { Id = "19:ChannelIdgeneralChannelId@thread.skype", Name = "Testing0" }, + new ChannelInfo { Id = "19:somechannelId2e5ab3df9ae9b594bdb@thread.skype", Name = "Testing1" }, + new ChannelInfo { Id = "19:somechannelId388ade16aa4dd375e69@thread.skype", Name = "Testing2" }, + } + }).ToString(); + + var uriToContent = new Dictionary() + { + { "/v3/teams/team-id-1/conversations", conversations }, + { "/v3/teams/customTeamId/conversations", conversations } + }; + + var teamsMiddleware = GetTeamsMiddleware(uriToContent); + await TestUtils.RunTestScript(_resourceExplorerFixture.ResourceExplorer, middleware: new[] { teamsMiddleware }); + } + + [Fact] + public async Task Action_GetTeamChannelsError() + { + await TestUtils.RunTestScript(_resourceExplorerFixture.ResourceExplorer, adapterChannel: Channels.Test); + } + + [Fact] + public async Task Action_GetTeamDetails() + { + var details = JObject.FromObject(new TeamDetails + { + Id = "19:generalChannelIdgeneralChannelId@thread.skype", + Name = "TeamName", + AadGroupId = "Team-aadGroupId" + }).ToString(); + + var uriToContent = new Dictionary() + { + { "/v3/teams/team-id-1/team-id-1", details }, + { "/v3/teams/customTeamId", details } + }; + + var teamsMiddleware = GetTeamsMiddleware(uriToContent); + await TestUtils.RunTestScript(_resourceExplorerFixture.ResourceExplorer, middleware: new[] { teamsMiddleware }); + } + + [Fact] + public async Task Action_GetTeamDetailsError() + { + await TestUtils.RunTestScript(_resourceExplorerFixture.ResourceExplorer, adapterChannel: Channels.Test); + } + + [Fact] + public async Task Action_GetTeamMember() + { + var member = JObject.FromObject(GenerateTeamMembers(1).Members.First()).ToString(); + + var uriToContent = new Dictionary() + { + { "/v3/conversations/team-id-1/members/user1", member }, + { "/v3/conversations/customTeamId/members/customMemberId", member } + }; + + var teamsMiddleware = GetTeamsMiddleware(uriToContent); + await TestUtils.RunTestScript(_resourceExplorerFixture.ResourceExplorer, middleware: new[] { teamsMiddleware }); + } + + [Fact] + public async Task Action_GetTeamMemberError() + { + await TestUtils.RunTestScript(_resourceExplorerFixture.ResourceExplorer, adapterChannel: Channels.Test); + } + + [Fact] + public async Task Action_GetTeamMemberErrorWithAdapter() + { + await TestUtils.RunTestScript(_resourceExplorerFixture.ResourceExplorer); + } + + [Fact] + public async Task Action_SendAppBasedLinkQueryResponse() + { + await TestUtils.RunTestScript(_resourceExplorerFixture.ResourceExplorer); + } + + [Fact] + public async Task Action_SendAppBasedLinkQueryResponseError() + { + await TestUtils.RunTestScript(_resourceExplorerFixture.ResourceExplorer, adapterChannel: Channels.Test); + } + + //[Fact] + //public async Task Action_SendMessageToTeamsChannel() + //{ + // NOTE: Current test adapter is not a BotFrameworkAdapter, + // and does not support mocking SendMessageToTeamsChannel + // var teamsMiddleware = GetTeamsMiddleware(new JObject(), "/v3/conversations"); + // await TestUtils.RunTestScript(_resourceExplorerFixture.ResourceExplorer, middleware: new[] { teamsMiddleware }); + //} + + [Fact] + public async Task Action_SendMessageToTeamsChannelError() + { + await TestUtils.RunTestScript(_resourceExplorerFixture.ResourceExplorer, adapterChannel: Channels.Test); + } + + [Fact] + public async Task Action_SendMEActionResponse() + { + await TestUtils.RunTestScript(_resourceExplorerFixture.ResourceExplorer); + } + + [Fact] + public async Task Action_SendMEActionResponseError() + { + await TestUtils.RunTestScript(_resourceExplorerFixture.ResourceExplorer); + } + + [Fact] + public async Task Action_SendMEAttachmentsResponse() + { + await TestUtils.RunTestScript(_resourceExplorerFixture.ResourceExplorer); + } + + [Fact] + public async Task Action_SendMEAttachmentsResponseError() + { + await TestUtils.RunTestScript(_resourceExplorerFixture.ResourceExplorer, adapterChannel: Channels.Test); + } + + [Fact] + public async Task Action_SendMEAuthResponse() + { + await TestUtils.RunTestScript(_resourceExplorerFixture.ResourceExplorer); + } + + //[Fact] + //public async Task Action_SendMEAuthResponseError() + //{ + // NOTE: Current test adapter is not a BotFrameworkAdapter, + // await TestUtils.RunTestScript(_resourceExplorerFixture.ResourceExplorer); + //} + + [Fact] + public async Task Action_SendMEAuthResponseErrorWithAdapter() + { + await TestUtils.RunTestScript(_resourceExplorerFixture.ResourceExplorer, adapterChannel: Channels.Test); + } + + [Fact] + public async Task Action_SendMEBotMessagePreviewResponse() + { + await TestUtils.RunTestScript(_resourceExplorerFixture.ResourceExplorer); + } + + [Fact] + public async Task Action_SendMEBotMessagePreviewResponseError() + { + await TestUtils.RunTestScript(_resourceExplorerFixture.ResourceExplorer, adapterChannel: Channels.Test); + } + + [Fact] + public async Task Action_SendMEConfigQuerySettingUrlResponse() + { + await TestUtils.RunTestScript(_resourceExplorerFixture.ResourceExplorer); + } + + [Fact] + public async Task Action_SendMEConfigQuerySettingUrlResponseError() + { + await TestUtils.RunTestScript(_resourceExplorerFixture.ResourceExplorer, adapterChannel: Channels.Test); + } + + [Fact] + public async Task Action_SendMEMessageResponse() + { + await TestUtils.RunTestScript(_resourceExplorerFixture.ResourceExplorer); + } + + [Fact] + public async Task Action_SendMEMessageResponseError() + { + await TestUtils.RunTestScript(_resourceExplorerFixture.ResourceExplorer, adapterChannel: Channels.Test); + } + + [Fact] + public async Task Action_SendMESelectItemResponse() + { + await TestUtils.RunTestScript(_resourceExplorerFixture.ResourceExplorer); + } + + [Fact] + public async Task Action_SendMESelectItemResponseError() + { + await TestUtils.RunTestScript(_resourceExplorerFixture.ResourceExplorer, adapterChannel: Channels.Test); + } + + [Fact] + public async Task Action_SendTaskModuleCardResponse() + { + await TestUtils.RunTestScript(_resourceExplorerFixture.ResourceExplorer); + } + + [Fact] + public async Task Action_SendTaskModuleCardResponseError() + { + await TestUtils.RunTestScript(_resourceExplorerFixture.ResourceExplorer, adapterChannel: Channels.Test); + } + + [Fact] + public async Task Action_SendTaskModuleMessageResponse() + { + await TestUtils.RunTestScript(_resourceExplorerFixture.ResourceExplorer); + } + + [Fact] + public async Task Action_SendTaskModuleUrlResponse() + { + await TestUtils.RunTestScript(_resourceExplorerFixture.ResourceExplorer); + } + + [Fact] + public async Task Action_SendTaskModuleUrlResponseError() + { + await TestUtils.RunTestScript(_resourceExplorerFixture.ResourceExplorer); + } + + [Fact] + public async Task Action_SendTabCardResponseError() + { + await TestUtils.RunTestScript(_resourceExplorerFixture.ResourceExplorer); + } + + [Fact] + public async Task Action_SendTabCardResponse() + { + await TestUtils.RunTestScript(_resourceExplorerFixture.ResourceExplorer); + } + + [Fact] + public async Task Action_SendTabAuthResponseErrorWithAdapter() + { + await TestUtils.RunTestScript(_resourceExplorerFixture.ResourceExplorer); + } + + //[Fact] + //public async Task Action_SendTabAuthResponseError() + //{ + // NOTE: Current test adapter is not a BotFrameworkAdapter, + // await TestUtils.RunTestScript(_resourceExplorerFixture.ResourceExplorer); + //} + + private IMiddleware GetErrorTeamsMiddleware(string exception) + { + // Create a connector client, setup with a custom httpclient which will + // throw an exception when the connectorclient's outgoing pipeline's SendAsync + // is called + var messageHandler = new ErrorHttpMessageHandler(exception); + return GetTestConnectorClientMiddleware(messageHandler); + } + + private ConversationReference GetGroupConversation() + { + return new ConversationReference + { + ChannelId = Channels.Msteams, + User = new ChannelAccount + { + Id = "29:User-Id", + Name = "User Name", + AadObjectId = "participant-aad-id" + }, + Conversation = new ConversationAccount + { + ConversationType = "groupChat", + TenantId = "tenantId-Guid", + Name = "group", + IsGroup = true, + Id = "19:groupChatId@thread.v2" + } + }; + } + + private TeamsPagedMembersResult GenerateTeamMembers(int total) + { + var accounts = new List(); + + for (int count = 0; count < total; count++) + { + accounts.Add(new TeamsChannelAccount + { + Id = $"29:User-Id-{count}", + Name = $"User Name-{count}", + AadObjectId = $"User-{count}-Object-Id", + Surname = $"Surname-{count}", + Email = $"User.{count}@microsoft.com", + UserPrincipalName = $"user{count}@microsoft.com", + TenantId = "tenant-id-1", + GivenName = "User" + }); + } + + return new TeamsPagedMembersResult() { Members = accounts }; + } + + private JObject GetParticipant(bool groupConversation = false) + { + return JObject.FromObject(new + { + id = "29:User-Id-0", + objectId = "User-0-Object-Id", + name = "User Name-0", + meeting = new { role = "Organizer" }, + surname = "Surname-0", + tenantId = "tenant-id-1", + userPrincipalName = "user0@microsoft.com", + user = new + { + userPrincipalName = "userPrincipalName-1", + }, + email = "User.0@microsoft.com", + givenName = "User", + conversation = new + { + id = groupConversation ? "19:groupChatId@thread.v2" : "a:oneOnOneConversationId", + name = groupConversation ? "group" : "oneOnOne", + tenantId = "tenantId-Guid", + conversationType = groupConversation ? "groupChat" : "personal", + isGroup = groupConversation, + } + }); + } + + private IMiddleware GetTeamsMiddleware(JObject result, string path = null) + { + // Create a connector client, setup with a custom httpclient which will return + // the desired result through the TestHttpMessageHandler. + TestsHttpMessageHandler messageHandler; + if (!string.IsNullOrEmpty(path)) + { + messageHandler = new TestsHttpMessageHandler(path, result.ToString()); + } + else + { + messageHandler = new TestsHttpMessageHandler(result.ToString()); + } + + return GetTestConnectorClientMiddleware(messageHandler); + } + + private IMiddleware GetTeamsMiddleware(Dictionary results) + { + // Create a connector client, setup with a custom httpclient which will return + // the desired result through the TestHttpMessageHandler. + var messageHandler = new TestsHttpMessageHandler(results); + return GetTestConnectorClientMiddleware(messageHandler); + } + + private TestConnectorClientMiddleware GetTestConnectorClientMiddleware(HttpMessageHandler messageHandler) + { + var testHttpClient = new HttpClient(messageHandler); + testHttpClient.BaseAddress = new Uri("https://localhost.coffee"); + var testConnectorClient = new ConnectorClient(new Uri("http://localhost.coffee/"), new MicrosoftAppCredentials(string.Empty, string.Empty), testHttpClient); + return new TestConnectorClientMiddleware(testConnectorClient); + } + + // This middleware sets the turnstate's connector client, + // so it will be found by the adapter, and a new one not created. + private class TestConnectorClientMiddleware : IMiddleware + { + private IConnectorClient _connectorClient; + + public TestConnectorClientMiddleware(IConnectorClient connectorClient) + { + _connectorClient = connectorClient; + } + + public Task OnTurnAsync(ITurnContext turnContext, NextDelegate next, CancellationToken cancellationToken = default) + { + turnContext.TurnState.Add(_connectorClient); + return next(cancellationToken); + } + } + + private class ErrorHttpMessageHandler : HttpMessageHandler + { + private readonly string _error; + + public ErrorHttpMessageHandler(string error) + { + _error = error; + } + + protected override Task SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) + { + throw new Exception(_error); + } + } + + // Message handler to mock returning a specific object when requested from a specified path. + private class TestsHttpMessageHandler : HttpMessageHandler + { + private Dictionary _uriToContent; + private string _content; + + public TestsHttpMessageHandler(string url, string content) + : this(new Dictionary() { { url, content } }) + { + } + + public TestsHttpMessageHandler(string content) + { + _content = content; + } + + public TestsHttpMessageHandler(Dictionary uriToContent) + { + _uriToContent = uriToContent; + } + + protected override Task SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) + { + var response = new HttpResponseMessage(HttpStatusCode.OK); + if (!string.IsNullOrEmpty(_content)) + { + response.Content = new StringContent(_content); + } + else + { + var path = request.RequestUri.PathAndQuery; + foreach (var urlAndContent in _uriToContent) + { + if (urlAndContent.Key.Contains(path, System.StringComparison.OrdinalIgnoreCase)) + { + response.Content = new StringContent(urlAndContent.Value); + } + } + } + + return Task.FromResult(response); + } + } + } +} diff --git a/tests/unit/packages/Teams/dotnet/ConditionalTests.cs b/tests/unit/packages/Teams/dotnet/ConditionalTests.cs new file mode 100644 index 0000000000..d9a73bdc63 --- /dev/null +++ b/tests/unit/packages/Teams/dotnet/ConditionalTests.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.IO; +using System.Threading.Tasks; +using Microsoft.Bot.Builder; +using Microsoft.Bot.Builder.Dialogs; +using Microsoft.Bot.Builder.Dialogs.Adaptive; +using Microsoft.Bot.Builder.Dialogs.Adaptive.Testing; +using Microsoft.Bot.Builder.Dialogs.Declarative; +using Microsoft.Bot.Builder.Dialogs.Declarative.Obsolete; +using Microsoft.Bot.Builder.Dialogs.Declarative.Resources; +using Xunit; + +namespace Microsoft.Bot.Components.Teams.Tests +{ + public class ConditionalTests + { + public ConditionalTests() + { + ComponentRegistration.Add(new DeclarativeComponentRegistration()); + ComponentRegistration.Add(new DialogsComponentRegistration()); + ComponentRegistration.Add(new AdaptiveComponentRegistration()); + ComponentRegistration.Add(new LanguageGenerationComponentRegistration()); + ComponentRegistration.Add(new AdaptiveTestingComponentRegistration()); + ComponentRegistration.Add(new DeclarativeComponentRegistrationBridge()); + + ResourceExplorer = new ResourceExplorer() + .AddFolder(Path.Combine(TestUtils.GetProjectPath(), "..", "Shared Tests", nameof(ConditionalTests)), monitorChanges: false); + } + + public static ResourceExplorer ResourceExplorer { get; set; } + + [Fact] + public async Task ConditionalsTests_OnTeamsActivityTypes() + { + await TestUtils.RunTestScript(ResourceExplorer); + } + } +} diff --git a/tests/unit/packages/Teams/dotnet/Microsoft.Bot.Components.Teams.Tests.csproj b/tests/unit/packages/Teams/dotnet/Microsoft.Bot.Components.Teams.Tests.csproj new file mode 100644 index 0000000000..8418703494 --- /dev/null +++ b/tests/unit/packages/Teams/dotnet/Microsoft.Bot.Components.Teams.Tests.csproj @@ -0,0 +1,35 @@ + + + + netcoreapp2.1 + netcoreapp3.1 + netcoreapp2.1;netcoreapp3.1 + false + Debug;Release + latest + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + Always + + + + diff --git a/tests/unit/packages/Teams/dotnet/ResourceExplorerFixture.cs b/tests/unit/packages/Teams/dotnet/ResourceExplorerFixture.cs new file mode 100644 index 0000000000..1da40ac30a --- /dev/null +++ b/tests/unit/packages/Teams/dotnet/ResourceExplorerFixture.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.IO; +using Microsoft.Bot.Builder.Dialogs.Declarative.Resources; + +namespace Microsoft.Bot.Components.Teams.Tests +{ + public class ResourceExplorerFixture : IDisposable + { + private string _folderPath = string.Empty; + + public ResourceExplorerFixture() + { + ResourceExplorer = new ResourceExplorer(); + } + + public ResourceExplorer ResourceExplorer { get; private set; } + + public ResourceExplorerFixture Initialize(string resourceFolder) + { + if (_folderPath.Length == 0) + { + _folderPath = Path.Combine(TestUtils.GetProjectPath(), "..", "Shared Tests", resourceFolder); + ResourceExplorer = ResourceExplorer.AddFolder(_folderPath, monitorChanges: false); + } + + return this; + } + + public void Dispose() + { + _folderPath = string.Empty; + ResourceExplorer.Dispose(); + } + } +} diff --git a/tests/unit/packages/Teams/dotnet/TestUtils.cs b/tests/unit/packages/Teams/dotnet/TestUtils.cs new file mode 100644 index 0000000000..f8f136dc1b --- /dev/null +++ b/tests/unit/packages/Teams/dotnet/TestUtils.cs @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Runtime.CompilerServices; +using System.Threading.Tasks; +using Microsoft.Bot.Builder; +using Microsoft.Bot.Builder.Adapters; +using Microsoft.Bot.Builder.Dialogs.Adaptive.Testing; +using Microsoft.Bot.Builder.Dialogs.Declarative.Resources; +using Microsoft.Bot.Connector; +using Microsoft.Bot.Schema; +using Microsoft.Extensions.Configuration; + +namespace Microsoft.Bot.Components.Teams.Tests +{ + public class TestUtils + { + public static IConfiguration DefaultConfiguration { get; set; } = new ConfigurationBuilder().AddInMemoryCollection().Build(); + + public static string RootFolder { get; set; } = GetProjectPath(); + + public static IEnumerable GetTestScripts(string relativeFolder) + { + var testFolder = Path.GetFullPath(Path.Combine(RootFolder, PathUtils.NormalizePath(relativeFolder))); + return Directory.EnumerateFiles(testFolder, "*.test.dialog", SearchOption.AllDirectories).Select(s => new object[] { Path.GetFileName(s) }).ToArray(); + } + + public static async Task RunTestScript(ResourceExplorer resourceExplorer, string resourceId = null, IConfiguration configuration = null, [CallerMemberName] string testName = null, IEnumerable middleware = null, string adapterChannel = Channels.Msteams) + { + var storage = new MemoryStorage(); + var convoState = new ConversationState(storage); + var userState = new UserState(storage); + + var adapter = (TestAdapter)new TestAdapter(CreateConversation(adapterChannel, testName)); + + if (middleware != null) + { + foreach (var m in middleware) + { + adapter.Use(m); + } + } + + adapter.Use(new RegisterClassMiddleware(DefaultConfiguration)) + .UseStorage(storage) + .UseBotState(userState, convoState) + .Use(new TranscriptLoggerMiddleware(new TraceTranscriptLogger(traceActivity: false))); + + adapter.OnTurnError += async (context, err) => + { + if (err.Message.EndsWith("MemoryAssertion failed")) + { + throw err; + } + + await context.SendActivityAsync(err.Message); + }; + + var script = resourceExplorer.LoadType(resourceId ?? $"{testName}.test.dialog"); + script.Configuration = configuration ?? new ConfigurationBuilder().AddInMemoryCollection().Build(); + script.Description ??= resourceId; + await script.ExecuteAsync(adapter: adapter, testName: testName, resourceExplorer: resourceExplorer).ConfigureAwait(false); + } + + public static string GetProjectPath() + { + var parent = Environment.CurrentDirectory; + while (!string.IsNullOrEmpty(parent)) + { + if (Directory.EnumerateFiles(parent, "*proj").Any()) + { + break; + } + + parent = Path.GetDirectoryName(parent); + } + + return parent; + } + + public static ConversationReference CreateConversation(string channel, string conversationName) + { + return new ConversationReference + { + ChannelId = channel ?? Channels.Test, + ServiceUrl = "https://test.com", + User = new ChannelAccount("user1", "User1"), + Bot = new ChannelAccount("bot", "Bot"), + Conversation = new ConversationAccount(false, "personal", conversationName), + Locale = "en-US", + }; + } + } +} diff --git a/tests/unit/packages/Teams/js/package.json b/tests/unit/packages/Teams/js/package.json new file mode 100644 index 0000000000..5d23a35710 --- /dev/null +++ b/tests/unit/packages/Teams/js/package.json @@ -0,0 +1,19 @@ +{ + "name": "@microsoft/bot-components-teams-tests", + "private": true, + "scripts": { + "test": "mocha --require ts-node/register tests/*.test.ts", + "lint": "eslint . --ext .js,.ts --config ../../../../../packages/Teams/js/.eslintrc.json" + }, + "dependencies": { + "@microsoft/bot-components-teams": "workspace:packages/Teams/js", + "@types/mocha": "^8.2.2", + "botbuilder": "4.14.0", + "botbuilder-dialogs-adaptive": "4.14.0-preview", + "botbuilder-dialogs-adaptive-testing": "4.14.0-preview", + "botframework-connector": "4.14.0", + "mocha": "^9.0.2", + "nock": "^13.1.1", + "ts-node": "^10.0.0" + } +} diff --git a/tests/unit/packages/Teams/js/tests/actionTests.test.ts b/tests/unit/packages/Teams/js/tests/actionTests.test.ts new file mode 100644 index 0000000000..1492fde260 --- /dev/null +++ b/tests/unit/packages/Teams/js/tests/actionTests.test.ts @@ -0,0 +1,508 @@ +// Licensed under the MIT License. +// Copyright (c) Microsoft Corporation. All rights reserved. + +import { + ConversationState, + useBotState, + MemoryStorage, + UserState, + Channels, + ConversationReference, + ChannelAccount, + ConversationAccount, + BotAdapter, + TestAdapter, + TurnContext, + Middleware, +} from 'botbuilder'; +import { AdaptiveTeamsBotComponent } from '@microsoft/bot-components-teams'; +import { TestUtils } from 'botbuilder-dialogs-adaptive-testing'; +import { + ConnectorClient, + MicrosoftAppCredentials, +} from 'botframework-connector'; +import { ok } from 'assert'; +import nock = require('nock'); +import { makeResourceExplorer } from './utils'; + +const getTeamsTestAdapter = ( + convo?: Partial +): TestAdapter => { + const adapter = new TestAdapter(convo as ConversationReference); + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore: This is required because TeamsInfo checks that the adapter has a createConnectorClient method + // and TestAdapter doesn't have one, natively. + adapter.createConnectorClient = () => { + return new ConnectorClient(new MicrosoftAppCredentials('', '')); + }; + + // DialogManager requires conversationState + const storage = new MemoryStorage(); + const userState = new UserState(storage); + const conversationState = new ConversationState(storage); + useBotState((adapter as unknown) as BotAdapter, userState, conversationState); + + return adapter; +}; + +const getTeamsUser = (): ChannelAccount => { + return { + id: '29:User-Id', + name: 'User Name', + aadObjectId: 'participant-aad-id', + }; +}; + +const getPersonalConversation = (): ConversationAccount => { + return { + id: 'a:oneOnOneConversationId', + name: 'oneOnOne', + tenantId: 'tenantId-Guid', + conversationType: 'personal', + isGroup: false, + }; +}; + +const getGroupConversation = (): ConversationAccount => { + return { + id: '19:groupChatId@thread.v2', + name: 'group', + tenantId: 'tenantId-Guid', + conversationType: 'groupChat', + isGroup: true, + }; +}; + +const getBaseConversationReference = (): ConversationReference => { + return { + user: getTeamsUser(), + channelId: Channels.Msteams, + conversation: getPersonalConversation(), + bot: { + id: 'botId', + name: 'Bot', + }, + serviceUrl: 'https://api.botframework.com', + }; +}; + +const getPersonalConversationReference = (): ConversationReference => { + return { + ...getBaseConversationReference(), + conversation: getPersonalConversation(), + }; +}; + +const getGroupConversationReference = (): ConversationReference => { + return { + ...getBaseConversationReference(), + conversation: getGroupConversation(), + }; +}; + +const generateTeamMembers = (amount: number): Record[] => { + const members = []; + const baseUser = getTeamsUser(); + for (let i = 0; i < amount; i++) { + members.push({ + id: `${baseUser.id}-${i}`, + name: `${baseUser.name}-${i}`, + objectId: `User-${i}-Object-Id`, + givenName: 'User', + surname: `Surname-${i}`, + email: `User.${i}@microsoft.com`, + userPrincipalName: `user${i}@microsoft.com`, + tenantId: 'tenant-id-1', + }); + } + + return members; +}; + +// This is only used for SendMessageToTeamsChannel test since it has a check in turnState for +// credentials and they never get saved is the adapter is TestAdapter. +class AddConnectorClientMiddleware implements Middleware { + async onTurn(context: TurnContext, next: () => Promise): Promise { + context.turnState.set( + context.adapter.ConnectorClientKey, + new ConnectorClient(new MicrosoftAppCredentials('', '')) + ); + await next(); + } +} + +describe('Actions', function () { + before(() => nock.disableNetConnect()); + beforeEach(() => nock.cleanAll()); + after(() => nock.enableNetConnect()); + afterEach(() => nock.cleanAll()); + + const resourceExplorer = makeResourceExplorer( + 'ActionTests', + AdaptiveTeamsBotComponent + ); + + /** + * Note: With mocha, `this.test?.title` refers to the test's name, so runTestScript + * is just calling a file with the same name as the test. + */ + it('Action_GetMeetingParticipant', async function () { + const conversationReference = getPersonalConversationReference(); + const participant = { + user: { + userPrincipalName: 'userPrincipalName-1', + }, + meeting: { + role: 'Organizer', + }, + conversation: conversationReference.conversation, + }; + + const fetchExpectation = nock('https://api.botframework.com') + .get( + '/v1/meetings/meeting-id-1/participants/participant-aad-id-1?tenantId=tenant-id-1' + ) + .reply(200, participant); + + const fetchExpectationCustomProperties = nock( + 'https://api.botframework.com' + ) + .get( + '/v1/meetings/customMeetingId/participants/customParticipantId?tenantId=customTenantId' + ) + .reply(200, participant); + + const adapter = getTeamsTestAdapter(conversationReference); + + await TestUtils.runTestScript(resourceExplorer, this.test?.title, adapter); + + ok(fetchExpectation.isDone()); + ok(fetchExpectationCustomProperties.isDone()); + }); + + it('Action_GetMeetingParticipantError', async function () { + await TestUtils.runTestScript(resourceExplorer, this.test?.title); + }); + + it('Action_GetMeetingParticipantErrorWithAdapter', async function () { + const conversationReference = getPersonalConversationReference(); + const adapter = getTeamsTestAdapter(conversationReference); + + await TestUtils.runTestScript(resourceExplorer, this.test?.title, adapter); + }); + + it('Action_GetMember', async function () { + const conversationReference = getPersonalConversationReference(); + const members = generateTeamMembers(1); + + const fetchExpectation = nock('https://api.botframework.com') + .get('/v3/conversations/a%3AoneOnOneConversationId/members/member-id') + .reply(200, members[0]); + + const fetchExpectationCustomProperties = nock( + 'https://api.botframework.com' + ) + .get( + '/v3/conversations/a%3AoneOnOneConversationId/members/customMemberId' + ) + .reply(200, members[0]); + + const adapter = getTeamsTestAdapter(conversationReference); + + await TestUtils.runTestScript(resourceExplorer, this.test?.title, adapter); + + ok(fetchExpectation.isDone()); + ok(fetchExpectationCustomProperties.isDone()); + }); + + it('Action_GetMemberError', async function () { + await TestUtils.runTestScript(resourceExplorer, this.test?.title); + }); + + it('Action_GetMemberErrorWithAdapter', async function () { + const conversationReference = getPersonalConversationReference(); + const adapter = getTeamsTestAdapter(conversationReference); + + await TestUtils.runTestScript(resourceExplorer, this.test?.title, adapter); + }); + + it('Action_GetPagedMembers', async function () { + const conversationReference = getGroupConversationReference(); + const members = generateTeamMembers(3); + + const fetchExpectation = nock('https://api.botframework.com') + .get('/v3/conversations/19%3AgroupChatId%40thread.v2/pagedmembers') + .reply(200, { continuationToken: 'token', members }); + + const fetchExpectationCustomProperties = nock( + 'https://api.botframework.com' + ) + .get( + '/v3/conversations/19%3AgroupChatId%40thread.v2/pagedmembers?pageSize=2&continuationToken=token' + ) + .reply(200, { + continuationToken: 'customToken', + members: members.slice(0, 2), + }); + + const adapter = getTeamsTestAdapter(conversationReference); + + await TestUtils.runTestScript(resourceExplorer, this.test?.title, adapter); + + ok(fetchExpectation.isDone()); + ok(fetchExpectationCustomProperties.isDone()); + }); + + it('Action_GetPagedMembersError', async function () { + await TestUtils.runTestScript(resourceExplorer, this.test?.title); + }); + + it('Action_GetPagedTeamMembers', async function () { + const conversationReference = getGroupConversationReference(); + const members = generateTeamMembers(3); + + const fetchExpectation = nock('https://api.botframework.com') + .get('/v3/conversations/team-id-1/pagedmembers') + .reply(200, { continuationToken: 'token', members }); + + const fetchExpectationCustomProperties = nock( + 'https://api.botframework.com' + ) + .get( + '/v3/conversations/team-id-1/pagedmembers?pageSize=2&continuationToken=token' + ) + .reply(200, { + continuationToken: 'customToken', + members: members.slice(0, 2), + }); + + const adapter = getTeamsTestAdapter(conversationReference); + + await TestUtils.runTestScript(resourceExplorer, this.test?.title, adapter); + + ok(fetchExpectation.isDone()); + ok(fetchExpectationCustomProperties.isDone()); + }); + + it('Action_GetPagedTeamMembersError', async function () { + await TestUtils.runTestScript(resourceExplorer, this.test?.title); + }); + + it('Action_GetTeamChannels', async function () { + const conversationReference = getGroupConversationReference(); + const conversations = [ + { + id: '19:ChannelIdgeneralChannelId@thread.skype', + name: 'Testing0', + }, + { + id: '19:somechannelId2e5ab3df9ae9b594bdb@thread.skype', + name: 'Testing1', + }, + { + id: '19:somechannelId388ade16aa4dd375e69@thread.skype', + name: 'Testing2', + }, + ]; + + const fetchExpectation = nock('https://api.botframework.com') + .get('/v3/teams/team-id-1/conversations') + .reply(200, { conversations }); + + const fetchExpectationCustomProperties = nock( + 'https://api.botframework.com' + ) + .get('/v3/teams/customTeamId/conversations') + .reply(200, { conversations }); + + const adapter = getTeamsTestAdapter(conversationReference); + + await TestUtils.runTestScript(resourceExplorer, this.test?.title, adapter); + + ok(fetchExpectation.isDone()); + ok(fetchExpectationCustomProperties.isDone()); + }); + + it('Action_GetTeamChannelsError', async function () { + await TestUtils.runTestScript(resourceExplorer, this.test?.title); + }); + + it('Action_GetTeamDetails', async function () { + const conversationReference = getGroupConversationReference(); + const teamDetails = { + id: '19:generalChannelIdgeneralChannelId@thread.skype', + name: 'TeamName', + aadGroupId: 'Team-aadGroupId', + }; + + const fetchExpectation = nock('https://api.botframework.com') + .get('/v3/teams/team-id-1') + .reply(200, teamDetails); + + const fetchExpectationCustomProperties = nock( + 'https://api.botframework.com' + ) + .get('/v3/teams/customTeamId') + .reply(200, teamDetails); + + const adapter = getTeamsTestAdapter(conversationReference); + + await TestUtils.runTestScript(resourceExplorer, this.test?.title, adapter); + + ok(fetchExpectation.isDone()); + ok(fetchExpectationCustomProperties.isDone()); + }); + + it('Action_GetTeamDetailsError', async function () { + await TestUtils.runTestScript(resourceExplorer, this.test?.title); + }); + + it('Action_GetTeamMember', async function () { + const conversationReference = getGroupConversationReference(); + const members = generateTeamMembers(1); + + const fetchExpectation = nock('https://api.botframework.com') + .get('/v3/conversations/team-id-1/members/29%3AUser-Id') + .reply(200, members[0]); + + const fetchExpectationCustomProperties = nock( + 'https://api.botframework.com' + ) + .get('/v3/conversations/customTeamId/members/customMemberId') + .reply(200, members[0]); + + const adapter = getTeamsTestAdapter(conversationReference); + + await TestUtils.runTestScript(resourceExplorer, this.test?.title, adapter); + + ok(fetchExpectation.isDone()); + ok(fetchExpectationCustomProperties.isDone()); + }); + + it('Action_GetTeamMemberError', async function () { + await TestUtils.runTestScript(resourceExplorer, this.test?.title); + }); + + it('Action_GetTeamMemberErrorWithAdapter', async function () { + const conversationReference = getGroupConversationReference(); + const adapter = getTeamsTestAdapter(conversationReference); + + await TestUtils.runTestScript(resourceExplorer, this.test?.title, adapter); + }); + + it('Action_SendAppBasedLinkQueryResponse', async function () { + await TestUtils.runTestScript(resourceExplorer, this.test?.title); + }); + + it('Action_SendAppBasedLinkQueryResponseError', async function () { + await TestUtils.runTestScript(resourceExplorer, this.test?.title); + }); + + it('Action_SendMessageToTeamsChannel', async function () { + const conversationReference = getGroupConversationReference(); + const adapter = getTeamsTestAdapter(conversationReference); + adapter.use(new AddConnectorClientMiddleware()); + + const fetchExpectation = nock('https://api.botframework.com') + .post('/v3/conversations') + .times(2) + .reply(200); + + await TestUtils.runTestScript(resourceExplorer, this.test?.title, adapter); + + ok(fetchExpectation.isDone()); + }); + + it('Action_SendMessageToTeamsChannelError', async function () { + await TestUtils.runTestScript(resourceExplorer, this.test?.title); + }); + + it('Action_SendMEActionResponse', async function () { + await TestUtils.runTestScript(resourceExplorer, this.test?.title); + }); + + it('Action_SendMEActionResponseError', async function () { + await TestUtils.runTestScript(resourceExplorer, this.test?.title); + }); + + it('Action_SendMEAttachmentsResponse', async function () { + await TestUtils.runTestScript(resourceExplorer, this.test?.title); + }); + + it('Action_SendMEAttachmentsResponseError', async function () { + await TestUtils.runTestScript(resourceExplorer, this.test?.title); + }); + + it('Action_SendMEAuthResponse', async function () { + // Note: the test.dialog for this test uses `StartsWith` at the end due to differences in JS and .NET TestAdapter.getSignInlink + const conversationReference = getPersonalConversationReference(); + conversationReference.conversation.id = 'Action_SendMEAuthResponse'; + const adapter = getTeamsTestAdapter(conversationReference); + + await TestUtils.runTestScript(resourceExplorer, this.test?.title, adapter); + }); + + it('Action_SendMEAuthResponseError', async function () { + await TestUtils.runTestScript(resourceExplorer, this.test?.title); + }); + + it('Action_SendMEAuthResponseErrorWithAdapter', async function () { + const adapter = getTeamsTestAdapter(); + // eslint-disable-next-line + // @ts-ignore: We have to set this to null to test the error but tsconfig "strict" doesn't allow it. + adapter.getUserToken = null; + await TestUtils.runTestScript(resourceExplorer, this.test?.title, adapter); + }); + + it('Action_SendMEBotMessagePreviewResponse', async function () { + await TestUtils.runTestScript(resourceExplorer, this.test?.title); + }); + + it('Action_SendMEBotMessagePreviewResponseError', async function () { + await TestUtils.runTestScript(resourceExplorer, this.test?.title); + }); + + it('Action_SendMEConfigQuerySettingUrlResponse', async function () { + await TestUtils.runTestScript(resourceExplorer, this.test?.title); + }); + + it('Action_SendMEConfigQuerySettingUrlResponseError', async function () { + await TestUtils.runTestScript(resourceExplorer, this.test?.title); + }); + + it('Action_SendMEMessageResponse', async function () { + await TestUtils.runTestScript(resourceExplorer, this.test?.title); + }); + + it('Action_SendMEMessageResponseError', async function () { + await TestUtils.runTestScript(resourceExplorer, this.test?.title); + }); + + it('Action_SendMESelectItemResponse', async function () { + await TestUtils.runTestScript(resourceExplorer, this.test?.title); + }); + + it('Action_SendMESelectItemResponseError', async function () { + await TestUtils.runTestScript(resourceExplorer, this.test?.title); + }); + + it('Action_SendTaskModuleCardResponse', async function () { + await TestUtils.runTestScript(resourceExplorer, this.test?.title); + }); + + it('Action_SendTaskModuleCardResponseError', async function () { + await TestUtils.runTestScript(resourceExplorer, this.test?.title); + }); + + it('Action_SendTaskModuleMessageResponse', async function () { + await TestUtils.runTestScript(resourceExplorer, this.test?.title); + }); + + it('Action_SendTaskModuleUrlResponse', async function () { + await TestUtils.runTestScript(resourceExplorer, this.test?.title); + }); + + it('Action_SendTaskModuleUrlResponseError', async function () { + await TestUtils.runTestScript(resourceExplorer, this.test?.title); + }); +}); diff --git a/tests/unit/packages/Teams/js/tests/conditionalTests.test.ts b/tests/unit/packages/Teams/js/tests/conditionalTests.test.ts new file mode 100644 index 0000000000..9c6a66b6ef --- /dev/null +++ b/tests/unit/packages/Teams/js/tests/conditionalTests.test.ts @@ -0,0 +1,21 @@ +// Licensed under the MIT License. +// Copyright (c) Microsoft Corporation. All rights reserved. + +import { TestUtils } from 'botbuilder-dialogs-adaptive-testing'; +import 'mocha'; +import { AdaptiveTeamsBotComponent } from '@microsoft/bot-components-teams'; +import { makeResourceExplorer } from './utils'; + +describe('Conditional Tests', function () { + const resourceExplorer = makeResourceExplorer( + 'ConditionalTests', + AdaptiveTeamsBotComponent + ); + + it('OnTeamsActivityTypes', async () => { + await TestUtils.runTestScript( + resourceExplorer, + 'ConditionalsTests_OnTeamsActivityTypes' + ); + }); +}); diff --git a/tests/unit/packages/Teams/js/tests/utils.ts b/tests/unit/packages/Teams/js/tests/utils.ts new file mode 100644 index 0000000000..8998dbef16 --- /dev/null +++ b/tests/unit/packages/Teams/js/tests/utils.ts @@ -0,0 +1,41 @@ +// Licensed under the MIT License. +// Copyright (c) Microsoft Corporation. All rights reserved. + +import { AdaptiveBotComponent } from 'botbuilder-dialogs-adaptive'; +import { + ServiceCollection, + noOpConfiguration, +} from 'botbuilder-dialogs-adaptive-runtime-core'; +import { AdaptiveTestBotComponent } from 'botbuilder-dialogs-adaptive-testing'; +import { + ResourceExplorer, + ResourceExplorerOptions, +} from 'botbuilder-dialogs-declarative'; +import path from 'path'; +import { BotComponent } from 'botbuilder'; + +export function makeResourceExplorer( + resourceFolder: string, + ...botComponents: Array BotComponent> +): ResourceExplorer { + const services = new ServiceCollection({ + declarativeTypes: [], + }); + + new AdaptiveBotComponent().configureServices(services, noOpConfiguration); + new AdaptiveTestBotComponent().configureServices(services, noOpConfiguration); + + botComponents.forEach((BotComponent) => { + new BotComponent().configureServices(services, noOpConfiguration); + }); + + const declarativeTypes = services.mustMakeInstance('declarativeTypes'); + + return new ResourceExplorer({ + declarativeTypes, + } as ResourceExplorerOptions).addFolder( + path.join(__dirname, '..', '..', 'Shared Tests', resourceFolder), + true, + false + ); +} diff --git a/tests/unit/packages/Teams/js/tsconfig.json b/tests/unit/packages/Teams/js/tsconfig.json new file mode 100644 index 0000000000..fe0f8351e4 --- /dev/null +++ b/tests/unit/packages/Teams/js/tsconfig.json @@ -0,0 +1,10 @@ +{ + "extends": "@tsconfig/recommended", + "compilerOptions": { + "allowSyntheticDefaultImports": true, + "composite": true, + "sourceMap": true, + "strict": true + } + } + \ No newline at end of file diff --git a/tests/unit/skills/calendar/Microsoft.Bot.Dialogs.Tests.Skills.Calendar.csproj b/tests/unit/skills/calendar/Microsoft.Bot.Dialogs.Tests.Skills.Calendar.csproj index e98d945c2c..5646b67ff8 100644 --- a/tests/unit/skills/calendar/Microsoft.Bot.Dialogs.Tests.Skills.Calendar.csproj +++ b/tests/unit/skills/calendar/Microsoft.Bot.Dialogs.Tests.Skills.Calendar.csproj @@ -7,10 +7,10 @@ - - - - + + + + diff --git a/tests/unit/skills/common/Microsoft.Bot.Dialogs.Tests.Common.csproj b/tests/unit/skills/common/Microsoft.Bot.Dialogs.Tests.Common.csproj index 05c521c926..1794802507 100644 --- a/tests/unit/skills/common/Microsoft.Bot.Dialogs.Tests.Common.csproj +++ b/tests/unit/skills/common/Microsoft.Bot.Dialogs.Tests.Common.csproj @@ -6,10 +6,10 @@ - - - - + + + + diff --git a/tests/unit/skills/people/Microsoft.Bot.Dialogs.Tests.Skills.People.csproj b/tests/unit/skills/people/Microsoft.Bot.Dialogs.Tests.Skills.People.csproj index 02c6c2f4e2..497bfefb6c 100644 --- a/tests/unit/skills/people/Microsoft.Bot.Dialogs.Tests.Skills.People.csproj +++ b/tests/unit/skills/people/Microsoft.Bot.Dialogs.Tests.Skills.People.csproj @@ -6,10 +6,10 @@ - - - - + + + + diff --git a/yarn.lock b/yarn.lock index faed4e0a0e..cf061aa36e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5,6 +5,35 @@ __metadata: version: 4 cacheKey: 7 +"@azure/abort-controller@npm:^1.0.0": + version: 1.0.4 + resolution: "@azure/abort-controller@npm:1.0.4" + dependencies: + tslib: ^2.0.0 + checksum: e772f6c9afd2c448260f08ef796e4ff73348c5dfd100ce557cf73dd08d7664e819f11f8e59c19a76daa46c1b271ce3061db23072c2150b112df655d38e82944b + languageName: node + linkType: hard + +"@azure/cognitiveservices-luis-runtime@npm:2.0.0": + version: 2.0.0 + resolution: "@azure/cognitiveservices-luis-runtime@npm:2.0.0" + dependencies: + "@azure/ms-rest-js": ^1.6.0 + tslib: ^1.9.3 + checksum: 15d51d16a707a29e9e72e74e96a4227f43a76e12e920328a8f5c7ebb41c711ac11a9676035b2410a198ba9f0007521f650ebd0046709677b557755327a41a325 + languageName: node + linkType: hard + +"@azure/core-auth@npm:^1.1.4": + version: 1.3.2 + resolution: "@azure/core-auth@npm:1.3.2" + dependencies: + "@azure/abort-controller": ^1.0.0 + tslib: ^2.2.0 + checksum: 66c7d074b55e15ecf75c2de64841693c680c326c969dd037bc3800674b658ae1d1b717975c543a34de2da1a1eb1410983d7d2f96ad1d26b61f0372d9214feeb7 + languageName: node + linkType: hard + "@azure/ms-rest-js@npm:1.9.1": version: 1.9.1 resolution: "@azure/ms-rest-js@npm:1.9.1" @@ -21,6 +50,22 @@ __metadata: languageName: node linkType: hard +"@azure/ms-rest-js@npm:^1.6.0": + version: 1.11.2 + resolution: "@azure/ms-rest-js@npm:1.11.2" + dependencies: + "@azure/core-auth": ^1.1.4 + axios: ^0.21.1 + form-data: ^2.3.2 + tough-cookie: ^2.4.3 + tslib: ^1.9.2 + tunnel: 0.0.6 + uuid: ^3.2.1 + xml2js: ^0.4.19 + checksum: a96f2f075ecbef968ad85606087ad8a1d40382d4b9581d184049c46027f2d470b6b669d5dfec722545f54b10e75f8d60ea5a950a69393bc8c431ec81dd5f561b + languageName: node + linkType: hard + "@babel/code-frame@npm:7.12.11": version: 7.12.11 resolution: "@babel/code-frame@npm:7.12.11" @@ -85,39 +130,93 @@ __metadata: languageName: node linkType: hard +"@eslint/eslintrc@npm:^0.4.2": + version: 0.4.2 + resolution: "@eslint/eslintrc@npm:0.4.2" + dependencies: + ajv: ^6.12.4 + debug: ^4.1.1 + espree: ^7.3.0 + globals: ^13.9.0 + ignore: ^4.0.6 + import-fresh: ^3.2.1 + js-yaml: ^3.13.1 + minimatch: ^3.0.4 + strip-json-comments: ^3.1.1 + checksum: 60b66ce4257bf5c36a920dea83a056102fef746e7afd7100a6fe245a126ff455f67f4948e75d28ed73090bff8f8556b6a996e74a124911ca703440bc245dbc23 + languageName: node + linkType: hard + +"@humanwhocodes/config-array@npm:^0.5.0": + version: 0.5.0 + resolution: "@humanwhocodes/config-array@npm:0.5.0" + dependencies: + "@humanwhocodes/object-schema": ^1.2.0 + debug: ^4.1.1 + minimatch: ^3.0.4 + checksum: 71e3c1fef40166ecaacbe29b681499dc6bab3fe45df5bfb3e137baf6e50f22813cf14f24ff759a4da43b6743d7f5a776298ae1e0e266c9602bab62da2ee3b302 + languageName: node + linkType: hard + +"@humanwhocodes/object-schema@npm:^1.2.0": + version: 1.2.0 + resolution: "@humanwhocodes/object-schema@npm:1.2.0" + checksum: ef533ee0d227b8036e4220013575fedc3d0346e2e40bc5f5536ba5761825f23577eb4b71e52f18a2d3b827c9d83cfa60c821a71e30d5f6537918a94bc1990963 + languageName: node + linkType: hard + "@microsoft/bot-components-helpandcancel@workspace:packages/HelpAndCancel": version: 0.0.0-use.local resolution: "@microsoft/bot-components-helpandcancel@workspace:packages/HelpAndCancel" languageName: unknown linkType: soft +"@microsoft/bot-components-teams-tests@workspace:tests/unit/packages/Teams/js": + version: 0.0.0-use.local + resolution: "@microsoft/bot-components-teams-tests@workspace:tests/unit/packages/Teams/js" + dependencies: + "@microsoft/bot-components-teams": "workspace:packages/Teams/js" + "@types/mocha": ^8.2.2 + botbuilder: 4.14.0 + botbuilder-dialogs-adaptive: 4.14.0-preview + botbuilder-dialogs-adaptive-testing: 4.14.0-preview + botframework-connector: 4.14.0 + mocha: ^9.0.2 + nock: ^13.1.1 + ts-node: ^10.0.0 + languageName: unknown + linkType: soft + "@microsoft/bot-components-teams@workspace:packages/Teams/js": version: 0.0.0-use.local resolution: "@microsoft/bot-components-teams@workspace:packages/Teams/js" dependencies: "@tsconfig/recommended": ^1.0.1 "@types/lodash": ^4.14.168 - "@typescript-eslint/eslint-plugin": latest - "@typescript-eslint/parser": latest - adaptive-expressions: 4.13.4 - botbuilder: 4.13.4 - botbuilder-dialogs: 4.13.4 - botbuilder-dialogs-adaptive: 4.13.4-preview - botbuilder-dialogs-adaptive-runtime-core: 4.13.4-preview - botbuilder-dialogs-declarative: 4.13.4-preview - botbuilder-stdlib: 4.13.4-internal - eslint: latest + "@typescript-eslint/eslint-plugin": ^4.28.2 + "@typescript-eslint/parser": ^4.28.2 + adaptive-expressions: 4.14.0 + botbuilder: 4.14.0 + botbuilder-dialogs: 4.14.0 + botbuilder-dialogs-adaptive: 4.14.0-preview + botbuilder-dialogs-adaptive-runtime-core: 4.14.0-preview + botbuilder-dialogs-declarative: 4.14.0-preview + botbuilder-stdlib: 4.14.0-internal + botframework-connector: 4.14.0 + eslint: ^7.30.0 + eslint-plugin-prettier: latest lodash: ^4.17.21 rimraf: ^3.0.2 typescript: ^4.0.5 peerDependencies: - adaptive-expressions: ~4.13.4 - botbuilder: ~4.13.4 - botbuilder-dialogs: ~4.13.4 - botbuilder-dialogs-adaptive: ~4.13.4-preview - botbuilder-dialogs-adaptive-runtime-core: ~4.13.4-preview - botbuilder-dialogs-declarative: ~4.13.4-preview - botbuilder-stdlib: ~4.13.4-internal + adaptive-expressions: ~4.14.0 + botbuilder: ~4.14.0 + botbuilder-dialogs: ~4.14.0 + botbuilder-dialogs-adaptive: ~4.14.0-preview + botbuilder-dialogs-adaptive-runtime-core: ~4.14.0-preview + botbuilder-dialogs-declarative: ~4.14.0-preview + botbuilder-stdlib: ~4.14.0-internal + botframework-connector: ~4.14.0 lodash: ^4.17.21 languageName: unknown linkType: soft @@ -134,7 +233,7 @@ __metadata: languageName: unknown linkType: soft -"@microsoft/generator-bot-adaptive@workspace:^1.0.0, @microsoft/generator-bot-adaptive@workspace:generators/generator-bot-adaptive": +"@microsoft/generator-bot-adaptive@workspace:^1.1.0, @microsoft/generator-bot-adaptive@workspace:^1.1.0-preview.0, @microsoft/generator-bot-adaptive@workspace:generators/generator-bot-adaptive": version: 0.0.0-use.local resolution: "@microsoft/generator-bot-adaptive@workspace:generators/generator-bot-adaptive" dependencies: @@ -157,7 +256,7 @@ __metadata: version: 0.0.0-use.local resolution: "@microsoft/generator-bot-core-assistant@workspace:generators/generator-bot-core-assistant" dependencies: - "@microsoft/generator-bot-adaptive": "workspace:^1.0.0" + "@microsoft/generator-bot-adaptive": "workspace:^1.1.0-preview.0" eslint: latest eslint-config-prettier: latest eslint-plugin-prettier: latest @@ -171,7 +270,7 @@ __metadata: version: 0.0.0-use.local resolution: "@microsoft/generator-bot-core-language@workspace:generators/generator-bot-core-language" dependencies: - "@microsoft/generator-bot-adaptive": "workspace:^1.0.0" + "@microsoft/generator-bot-adaptive": "workspace:^1.1.0" eslint: latest eslint-config-prettier: latest eslint-plugin-prettier: latest @@ -185,7 +284,7 @@ __metadata: version: 0.0.0-use.local resolution: "@microsoft/generator-bot-core-qna@workspace:generators/generator-bot-core-qna" dependencies: - "@microsoft/generator-bot-adaptive": "workspace:^1.0.0" + "@microsoft/generator-bot-adaptive": "workspace:^1.1.0-preview.0" eslint: latest eslint-config-prettier: latest eslint-plugin-prettier: latest @@ -199,7 +298,7 @@ __metadata: version: 0.0.0-use.local resolution: "@microsoft/generator-bot-empty@workspace:generators/generator-bot-empty" dependencies: - "@microsoft/generator-bot-adaptive": "workspace:^1.0.0" + "@microsoft/generator-bot-adaptive": "workspace:^1.1.0-preview.0" eslint: latest eslint-config-prettier: latest eslint-plugin-prettier: latest @@ -213,9 +312,9 @@ __metadata: version: 0.0.0-use.local resolution: "@microsoft/generator-bot-enterprise-assistant@workspace:generators/generator-bot-enterprise-assistant" dependencies: - "@microsoft/generator-bot-adaptive": "workspace:^1.0.0" - "@microsoft/generator-bot-enterprise-calendar": "workspace:^1.0.0" - "@microsoft/generator-bot-enterprise-people": "workspace:^1.0.0" + "@microsoft/generator-bot-adaptive": "workspace:^1.1.0-preview.0" + "@microsoft/generator-bot-enterprise-calendar": "workspace:^1.1.0-preview.0" + "@microsoft/generator-bot-enterprise-people": "workspace:^1.1.0-preview.0" eslint: latest eslint-config-prettier: latest eslint-plugin-prettier: latest @@ -226,11 +325,11 @@ __metadata: languageName: unknown linkType: soft -"@microsoft/generator-bot-enterprise-calendar@workspace:^1.0.0, @microsoft/generator-bot-enterprise-calendar@workspace:generators/generator-bot-enterprise-calendar": +"@microsoft/generator-bot-enterprise-calendar@workspace:^1.1.0-preview.0, @microsoft/generator-bot-enterprise-calendar@workspace:generators/generator-bot-enterprise-calendar": version: 0.0.0-use.local resolution: "@microsoft/generator-bot-enterprise-calendar@workspace:generators/generator-bot-enterprise-calendar" dependencies: - "@microsoft/generator-bot-adaptive": "workspace:^1.0.0" + "@microsoft/generator-bot-adaptive": "workspace:^1.1.0-preview.0" eslint: latest eslint-config-prettier: latest eslint-plugin-prettier: latest @@ -240,11 +339,11 @@ __metadata: languageName: unknown linkType: soft -"@microsoft/generator-bot-enterprise-people@workspace:^1.0.0, @microsoft/generator-bot-enterprise-people@workspace:generators/generator-bot-enterprise-people": +"@microsoft/generator-bot-enterprise-people@workspace:^1.1.0-preview.0, @microsoft/generator-bot-enterprise-people@workspace:generators/generator-bot-enterprise-people": version: 0.0.0-use.local resolution: "@microsoft/generator-bot-enterprise-people@workspace:generators/generator-bot-enterprise-people" dependencies: - "@microsoft/generator-bot-adaptive": "workspace:^1.0.0" + "@microsoft/generator-bot-adaptive": "workspace:^1.1.0-preview.0" eslint: latest eslint-config-prettier: latest eslint-plugin-prettier: latest @@ -467,6 +566,34 @@ __metadata: languageName: node linkType: hard +"@tsconfig/node10@npm:^1.0.7": + version: 1.0.8 + resolution: "@tsconfig/node10@npm:1.0.8" + checksum: 0336493b89fb7c06409a1247a3fb00fac2755f21f3f8ae4b9dd2457859abfc5e8ca42b6d9ca5a279fe81bc70fe1f3450eef61e5dd5a63a7b4a6946ff31874816 + languageName: node + linkType: hard + +"@tsconfig/node12@npm:^1.0.7": + version: 1.0.9 + resolution: "@tsconfig/node12@npm:1.0.9" + checksum: 5532bfb5df47ed3a507da533c731a2fb80ee2e886edadbf20e664dcd3172d5c159577a281d15733b8d0c30bfa4e6b48496bef0704192c085520bc76bb9938068 + languageName: node + linkType: hard + +"@tsconfig/node14@npm:^1.0.0": + version: 1.0.1 + resolution: "@tsconfig/node14@npm:1.0.1" + checksum: d0068287dba46dc98e7d49c229b0fee034fbac2bb4bc2efe12cc67227a1c68ec0728ca1e535dff7f033f7455de6c67e9b8f9d90f4fc3bb07c0d9ac08186fe65c + languageName: node + linkType: hard + +"@tsconfig/node16@npm:^1.0.1": + version: 1.0.1 + resolution: "@tsconfig/node16@npm:1.0.1" + checksum: c389a4a81c291a27b96705de7fbe46d29aa4eb771450a41dfc075d89e1fdd63141898043a0d9f627460a1c409d06635a044dc4b3a4516173769a7d0a1558c51d + languageName: node + linkType: hard + "@tsconfig/recommended@npm:^1.0.1": version: 1.0.1 resolution: "@tsconfig/recommended@npm:1.0.1" @@ -498,10 +625,10 @@ __metadata: languageName: node linkType: hard -"@types/json-schema@npm:^7.0.3": - version: 7.0.7 - resolution: "@types/json-schema@npm:7.0.7" - checksum: b9d2c509fa4e0b82f58e73f5e6ab76c60ff1884ba41bb82f37fb1cece226d4a3e5a62fedf78a43da0005373a6713d9abe61c1e592906402c41c08ad6ab26d52b +"@types/json-schema@npm:^7.0.7": + version: 7.0.8 + resolution: "@types/json-schema@npm:7.0.8" + checksum: 435a3d18a88aeac7bc88c2cdd2c19466c62ce79303493edd72380cd4af9775c05f35d424d5e76ffe3f94575ebb535305c6cae928c5bfb9c39eafbfb6932520a1 languageName: node linkType: hard @@ -523,6 +650,22 @@ __metadata: languageName: node linkType: hard +"@types/lodash.isequal@npm:^4.5.5": + version: 4.5.5 + resolution: "@types/lodash.isequal@npm:4.5.5" + dependencies: + "@types/lodash": "*" + checksum: 141df617686010657bb3e46b21facce2dd15b771fdfebd9df2f3d6fd3603d6336b64da4027257402c640f71b65d91eca9305b53d282cf604bcbb88e662034aad + languageName: node + linkType: hard + +"@types/lodash@npm:*": + version: 4.14.171 + resolution: "@types/lodash@npm:4.14.171" + checksum: e48668fb030ad7d8c0c7751061bd332ad8704937d976bd4e24fd9e2128f80c17112be11e5c13d39f6a210336dc3549f7fb00eaebb56b94c2bfb89ad64c57d721 + languageName: node + linkType: hard + "@types/lodash@npm:^4.14.168": version: 4.14.168 resolution: "@types/lodash@npm:4.14.168" @@ -544,6 +687,13 @@ __metadata: languageName: node linkType: hard +"@types/mocha@npm:^8.2.2": + version: 8.2.2 + resolution: "@types/mocha@npm:8.2.2" + checksum: 3455211b134b0cfcfc71fee2d4f22a6ac3e313a93bf6c0cd3519c1e85653ffb8c9bb68dcff083b8e9e15b4ea3cb4f50d9916709946c082f072807aeba747575b + languageName: node + linkType: hard + "@types/node@npm:*": version: 14.14.31 resolution: "@types/node@npm:14.14.31" @@ -606,103 +756,102 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/eslint-plugin@npm:latest": - version: 4.22.0 - resolution: "@typescript-eslint/eslint-plugin@npm:4.22.0" +"@typescript-eslint/eslint-plugin@npm:^4.28.2": + version: 4.28.2 + resolution: "@typescript-eslint/eslint-plugin@npm:4.28.2" dependencies: - "@typescript-eslint/experimental-utils": 4.22.0 - "@typescript-eslint/scope-manager": 4.22.0 - debug: ^4.1.1 + "@typescript-eslint/experimental-utils": 4.28.2 + "@typescript-eslint/scope-manager": 4.28.2 + debug: ^4.3.1 functional-red-black-tree: ^1.0.1 - lodash: ^4.17.15 - regexpp: ^3.0.0 - semver: ^7.3.2 - tsutils: ^3.17.1 + regexpp: ^3.1.0 + semver: ^7.3.5 + tsutils: ^3.21.0 peerDependencies: "@typescript-eslint/parser": ^4.0.0 eslint: ^5.0.0 || ^6.0.0 || ^7.0.0 peerDependenciesMeta: typescript: optional: true - checksum: 40485bbf51283616b5098b33fa5285104a80419c4dcf75659442ae780352289bc238a64591939012ebc47823485497ae6ba8a35e653b0e33ff7f58743b46c34e + checksum: 6af8ea7665d5eaf0bafe241d71e3a85df07c0c82e59f530bd6627e0371e66a2d4a517cacd00d030680fe13d423b065c53185d3f48daa174fea316f024b1ab545 languageName: node linkType: hard -"@typescript-eslint/experimental-utils@npm:4.22.0": - version: 4.22.0 - resolution: "@typescript-eslint/experimental-utils@npm:4.22.0" +"@typescript-eslint/experimental-utils@npm:4.28.2": + version: 4.28.2 + resolution: "@typescript-eslint/experimental-utils@npm:4.28.2" dependencies: - "@types/json-schema": ^7.0.3 - "@typescript-eslint/scope-manager": 4.22.0 - "@typescript-eslint/types": 4.22.0 - "@typescript-eslint/typescript-estree": 4.22.0 - eslint-scope: ^5.0.0 - eslint-utils: ^2.0.0 + "@types/json-schema": ^7.0.7 + "@typescript-eslint/scope-manager": 4.28.2 + "@typescript-eslint/types": 4.28.2 + "@typescript-eslint/typescript-estree": 4.28.2 + eslint-scope: ^5.1.1 + eslint-utils: ^3.0.0 peerDependencies: eslint: "*" - checksum: afabf0d6f9e70b910575d8bc2e8ccd3416e8d05ed968296fc56379f71f8cf3a27107598b98f7c76a91e6b0be796dc102c866381a3af5bf24799a333532d1e997 + checksum: 5b3fed818af9882ae54bf258351c2740a92aa0bb5a85478ce1d4d957e594882ece42048149b1a1a8500023c1d334d9846048bc96f309ed60715232be8ef5d1a8 languageName: node linkType: hard -"@typescript-eslint/parser@npm:latest": - version: 4.22.0 - resolution: "@typescript-eslint/parser@npm:4.22.0" +"@typescript-eslint/parser@npm:^4.28.2": + version: 4.28.2 + resolution: "@typescript-eslint/parser@npm:4.28.2" dependencies: - "@typescript-eslint/scope-manager": 4.22.0 - "@typescript-eslint/types": 4.22.0 - "@typescript-eslint/typescript-estree": 4.22.0 - debug: ^4.1.1 + "@typescript-eslint/scope-manager": 4.28.2 + "@typescript-eslint/types": 4.28.2 + "@typescript-eslint/typescript-estree": 4.28.2 + debug: ^4.3.1 peerDependencies: eslint: ^5.0.0 || ^6.0.0 || ^7.0.0 peerDependenciesMeta: typescript: optional: true - checksum: 679e14a5cec5bae3b392b1736f5d919897fd1a269a9d25366babfd12c1d275b320ae36a0b8be215ba14780cb1feec2b386001b4e0225ef82bd0040bf5dbaf99f + checksum: 4d71ddbe039007f366b6e9deca12183e45ea165053a29b64e8e4534451a134fe664fd3bf8ec06951e2afe8b5fd14143fb2ef3182a9ee8d2b20a89a3c0f4f2529 languageName: node linkType: hard -"@typescript-eslint/scope-manager@npm:4.22.0": - version: 4.22.0 - resolution: "@typescript-eslint/scope-manager@npm:4.22.0" +"@typescript-eslint/scope-manager@npm:4.28.2": + version: 4.28.2 + resolution: "@typescript-eslint/scope-manager@npm:4.28.2" dependencies: - "@typescript-eslint/types": 4.22.0 - "@typescript-eslint/visitor-keys": 4.22.0 - checksum: c6f5565f517373cba61d29be919c69ad0e178f2a007eed6f1d8f80518853c3c4e6a3a059e492920b71675f0828e093eb36ec9eef318b9e2b4e9e65b0e93f03b6 + "@typescript-eslint/types": 4.28.2 + "@typescript-eslint/visitor-keys": 4.28.2 + checksum: 31c30f428ba50087fc6a8dacc00b4d007d6653f1ea261a468e0a5425d730c5bf1e87bea581494862687c294d1f2ace30813f919800a05190fa332db6cd192bef languageName: node linkType: hard -"@typescript-eslint/types@npm:4.22.0": - version: 4.22.0 - resolution: "@typescript-eslint/types@npm:4.22.0" - checksum: db2717132540feba39b002cdb2483aa822e0b50c17f9deff918a52609178df071444188a1e76c07c51018c353b01509dd741272b6d482edf7d9e7d60adc6c70e +"@typescript-eslint/types@npm:4.28.2": + version: 4.28.2 + resolution: "@typescript-eslint/types@npm:4.28.2" + checksum: 9f5e6bf3df4540adf8eb1f83909bac778257f60a6ef7fcafa7df5224949839a63dba61fe4b58de538ffe17517e88ff6b29f691209f80a55df87935bac6349f69 languageName: node linkType: hard -"@typescript-eslint/typescript-estree@npm:4.22.0": - version: 4.22.0 - resolution: "@typescript-eslint/typescript-estree@npm:4.22.0" +"@typescript-eslint/typescript-estree@npm:4.28.2": + version: 4.28.2 + resolution: "@typescript-eslint/typescript-estree@npm:4.28.2" dependencies: - "@typescript-eslint/types": 4.22.0 - "@typescript-eslint/visitor-keys": 4.22.0 - debug: ^4.1.1 - globby: ^11.0.1 + "@typescript-eslint/types": 4.28.2 + "@typescript-eslint/visitor-keys": 4.28.2 + debug: ^4.3.1 + globby: ^11.0.3 is-glob: ^4.0.1 - semver: ^7.3.2 - tsutils: ^3.17.1 + semver: ^7.3.5 + tsutils: ^3.21.0 peerDependenciesMeta: typescript: optional: true - checksum: 538d932361d1463c9450c155fc5696f4cc1a07db2bfd4ca9079e1f919e5062fd95d8dc128fc2fa8368c9582787cfc97ee6284083b94fe8d580cd1a9fca688efa + checksum: 4fe36863b8af9808ee86b3cf64d6076a8b9a3224f9e1c17650d06ea46d80225b7e94903f71e7330a682b84eb1045189f1f09dc896165e9cab36714d24992ee84 languageName: node linkType: hard -"@typescript-eslint/visitor-keys@npm:4.22.0": - version: 4.22.0 - resolution: "@typescript-eslint/visitor-keys@npm:4.22.0" +"@typescript-eslint/visitor-keys@npm:4.28.2": + version: 4.28.2 + resolution: "@typescript-eslint/visitor-keys@npm:4.28.2" dependencies: - "@typescript-eslint/types": 4.22.0 + "@typescript-eslint/types": 4.28.2 eslint-visitor-keys: ^2.0.0 - checksum: 645896d05aa757fac02d952574ecda0eecd0be120162e28533c4528bb70d2162e9df62c3547217c69f18a72ceecaf212ea585afd20f976db64b59ac6de0d1ec8 + checksum: cec563831f563bb057f00045104db7ed92576755065d7563607c5f3581e5588fe8b83229767cd81763136aeb663dd49b99e7ee24decfbfc5fc7bd7b36bb1a525 languageName: node linkType: hard @@ -792,30 +941,31 @@ __metadata: languageName: node linkType: hard -"adal-node@npm:0.2.1": - version: 0.2.1 - resolution: "adal-node@npm:0.2.1" +"adal-node@npm:0.2.2": + version: 0.2.2 + resolution: "adal-node@npm:0.2.2" dependencies: "@types/node": ^8.0.47 async: ^2.6.3 + axios: ^0.21.1 date-utils: "*" jws: 3.x.x - request: ^2.88.0 underscore: ">= 1.3.1" uuid: ^3.1.0 xmldom: ">= 0.1.x" xpath.js: ~1.1.0 - checksum: 93cbb8a159873865996194cbc0ef2036927622c8ff21d2be0b093a476785b6d31e97cba80bc23fdd4ff0714aae62a43f507e3742a7c27e5ced92078519ecd554 + checksum: eafd8acda0ff50d57ce5939a801f6d72596aaeea26798d3ca006af713abd124d942f1a83d338c1472c23ca743b1940a7dc27e67b0bd63efb44e0568f6c2a96a8 languageName: node linkType: hard -"adaptive-expressions@npm:4.13.4": - version: 4.13.4 - resolution: "adaptive-expressions@npm:4.13.4" +"adaptive-expressions@npm:4.14.0": + version: 4.14.0 + resolution: "adaptive-expressions@npm:4.14.0" dependencies: "@microsoft/recognizers-text-data-types-timex-expression": 1.3.0 "@types/atob-lite": ^2.0.0 "@types/btoa-lite": ^1.0.0 + "@types/lodash.isequal": ^4.5.5 "@types/lru-cache": ^5.1.0 "@types/xmldom": ^0.1.30 antlr4ts: 0.5.0-alpha.3 @@ -825,13 +975,14 @@ __metadata: d3-format: ^1.4.4 dayjs: ^1.10.3 jspath: ^0.4.0 + lodash.isequal: ^4.5.0 lru-cache: ^5.1.1 uuid: ^8.3.2 x2js: ^3.4.0 xml2js: ^0.4.23 xmldom: ^0.5.0 xpath: ^0.0.32 - checksum: fc5a86ec925509d28275eec36a9285e8beb67a6b5b670de77a858ab9ea95cb03b53737f3dc657f4d5ce90275d60c7a98fef0c72dbb9ac69756c66e8678757e57 + checksum: de9b382e92ffe2bea6236ad40a19e73ab797e65943180e54392159c1731f3dc2138dda1d1af81c51bcc36e9a41410f64783f3ca13085933d36cbb2826e3a55b0 languageName: node linkType: hard @@ -859,6 +1010,18 @@ __metadata: languageName: node linkType: hard +"ajv@npm:^8.0.1": + version: 8.6.1 + resolution: "ajv@npm:8.6.1" + dependencies: + fast-deep-equal: ^3.1.1 + json-schema-traverse: ^1.0.0 + require-from-string: ^2.0.2 + uri-js: ^4.2.2 + checksum: 9abb66b4ced54f0e955313387183615028df1affc28859332d5d935258e391ead880ad5a4e5c59e3b82367486b3824faefdaf7b87cfd3a5b6629f14e8edc2fd7 + languageName: node + linkType: hard + "ansi-colors@npm:4.1.1, ansi-colors@npm:^4.1.1": version: 4.1.1 resolution: "ansi-colors@npm:4.1.1" @@ -945,7 +1108,7 @@ __metadata: languageName: node linkType: hard -"anymatch@npm:~3.1.1": +"anymatch@npm:~3.1.1, anymatch@npm:~3.1.2": version: 3.1.2 resolution: "anymatch@npm:3.1.2" dependencies: @@ -981,6 +1144,13 @@ __metadata: languageName: node linkType: hard +"arg@npm:^4.1.0": + version: 4.1.3 + resolution: "arg@npm:4.1.3" + checksum: 81b3b40b1529c4fbf75b12f7c3e6fb2dcce9e78072063babc169de9b4f40777788f3d2b04380f659ef676a756e03ccfbfe78adf4477353bda906295fa69dab89 + languageName: node + linkType: hard + "argparse@npm:^1.0.7": version: 1.0.10 resolution: "argparse@npm:1.0.10" @@ -1122,16 +1292,6 @@ __metadata: languageName: node linkType: hard -"assert@npm:^1.4.1": - version: 1.5.0 - resolution: "assert@npm:1.5.0" - dependencies: - object-assign: ^4.1.1 - util: 0.10.3 - checksum: 9bd01a7a574d99656d3998b95e904c35fe41c9e18b8193a4b1bb3b1df2772f4fb03bf75897093daca9d883ed888d9be5da2a9a952da6f1da9101f4147a2f00c1 - languageName: node - linkType: hard - "assign-symbols@npm:^1.0.0": version: 1.0.0 resolution: "assign-symbols@npm:1.0.0" @@ -1508,6 +1668,13 @@ __metadata: languageName: node linkType: hard +"bitwise@npm:^2.0.4": + version: 2.1.0 + resolution: "bitwise@npm:2.1.0" + checksum: 51c7ae49c2c109444c6aafaf221b86c8caf10c60c3ac0316b0cb1a76d12c8af383170bec22863bdd378ac05730a145a0026a9ce1fe2ff4925dc75c3288e45011 + languageName: node + linkType: hard + "bl@npm:^4.1.0": version: 4.1.0 resolution: "bl@npm:4.1.0" @@ -1519,156 +1686,194 @@ __metadata: languageName: node linkType: hard -"botbuilder-core@npm:4.13.4": - version: 4.13.4 - resolution: "botbuilder-core@npm:4.13.4" +"botbuilder-ai@npm:4.14.0": + version: 4.14.0 + resolution: "botbuilder-ai@npm:4.14.0" dependencies: - assert: ^1.4.1 - botbuilder-dialogs-adaptive-runtime-core: 4.13.4-preview - botbuilder-stdlib: 4.13.4-internal - botframework-connector: 4.13.4 - botframework-schema: 4.13.4 + "@azure/cognitiveservices-luis-runtime": 2.0.0 + "@azure/ms-rest-js": 1.9.1 + adaptive-expressions: 4.14.0 + botbuilder-core: 4.14.0 + botbuilder-dialogs: 4.14.0 + botbuilder-dialogs-adaptive-runtime-core: 4.14.0-preview + botbuilder-dialogs-declarative: 4.14.0-preview + botbuilder-stdlib: 4.14.0-internal + lodash: ^4.17.21 + node-fetch: ^2.6.0 + url-parse: ^1.5.1 + zod: ~1.11.17 + checksum: 1da331cc766169cf5b1a2ecca9e8c242ad51eced86656bafc134f3a53683aedb26d8bd1806e43ec14be2bba1950abbd7ef8a389b686f6d4e6339fb9eb2588f38 + languageName: node + linkType: hard + +"botbuilder-core@npm:4.14.0": + version: 4.14.0 + resolution: "botbuilder-core@npm:4.14.0" + dependencies: + botbuilder-dialogs-adaptive-runtime-core: 4.14.0-preview + botbuilder-stdlib: 4.14.0-internal + botframework-connector: 4.14.0 + botframework-schema: 4.14.0 uuid: ^8.3.2 - checksum: 6aaff87b1213008c6f3f49efb066a2866a89017bea3cf8b521842387068fafe74854f188df5a9c3753e767d9a72a9c63a1f964232f4b1bf2d9ded04dfb70efbd + zod: ~1.11.17 + checksum: b617e7fea0120460113d59062cdf12f7903eea36d7941089dfe55aae3ba4abf8b3990e09273d76a584095303c972712762a0d87263360f7b4eab3e2c5ed6e017 languageName: node linkType: hard -"botbuilder-dialogs-adaptive-runtime-core@npm:4.13.4-preview": - version: 4.13.4-preview - resolution: "botbuilder-dialogs-adaptive-runtime-core@npm:4.13.4-preview" +"botbuilder-dialogs-adaptive-runtime-core@npm:4.14.0-preview": + version: 4.14.0-preview + resolution: "botbuilder-dialogs-adaptive-runtime-core@npm:4.14.0-preview" dependencies: dependency-graph: ^0.10.0 - runtypes: ~5.1.0 - checksum: 6cd8217d06c11ed97867967986af875d3ac1c8b404bc5ed57e9a8a3111cac1d9b22918eaabbb2a4497ce45d97e86add3e75b76ddf01b015c35daabe66675b552 + checksum: 8bc38639faa59e541a32feac99d7eb3428d6a5a2071d2cdaaee3b1480224ed213cfa00f974236f76b4169848bf2189e19e4e08a1415b4646b4e58ebc3aee1da1 + languageName: node + linkType: hard + +"botbuilder-dialogs-adaptive-testing@npm:4.14.0-preview": + version: 4.14.0-preview + resolution: "botbuilder-dialogs-adaptive-testing@npm:4.14.0-preview" + dependencies: + adaptive-expressions: 4.14.0 + bitwise: ^2.0.4 + botbuilder-ai: 4.14.0 + botbuilder-core: 4.14.0 + botbuilder-dialogs: 4.14.0 + botbuilder-dialogs-adaptive: 4.14.0-preview + botbuilder-dialogs-adaptive-runtime-core: 4.14.0-preview + botbuilder-dialogs-declarative: 4.14.0-preview + botbuilder-stdlib: 4.14.0-internal + murmurhash-js: ^1.0.0 + nock: ^11.9.1 + url-parse: ^1.5.1 + checksum: 6bff035cf41273596df50a0755026a34a7b55ae31af21d2c0574b961e84d3622ae545a74db296de7df533f028daa96c563ba70df3dc864b291cccce35d4c61d2 languageName: node linkType: hard -"botbuilder-dialogs-adaptive@npm:4.13.4-preview": - version: 4.13.4-preview - resolution: "botbuilder-dialogs-adaptive@npm:4.13.4-preview" +"botbuilder-dialogs-adaptive@npm:4.14.0-preview": + version: 4.14.0-preview + resolution: "botbuilder-dialogs-adaptive@npm:4.14.0-preview" dependencies: "@microsoft/recognizers-text-suite": 1.1.4 - adaptive-expressions: 4.13.4 - botbuilder: 4.13.4 - botbuilder-dialogs: 4.13.4 - botbuilder-dialogs-adaptive-runtime-core: 4.13.4-preview - botbuilder-dialogs-declarative: 4.13.4-preview - botbuilder-lg: 4.13.4 - botframework-connector: 4.13.4 - botframework-schema: 4.13.4 + adaptive-expressions: 4.14.0 + botbuilder: 4.14.0 + botbuilder-dialogs: 4.14.0 + botbuilder-dialogs-adaptive-runtime-core: 4.14.0-preview + botbuilder-dialogs-declarative: 4.14.0-preview + botbuilder-lg: 4.14.0 lodash: ^4.17.21 node-fetch: ^2.6.0 - checksum: d11907e44030b3dc2ed1c822679de512642ec1d0ad222d4e318292922c45d36cd37d82645f9835c4928065aca5cc75ab11f2e34aea124baac2b7ac6c0ab86686 + checksum: 622237a71b8f63e8cb5e536910a0e6997dc47c1f130c09877d134dd9909873fb1a12677e4d3228c97ae7a4dd1933cdd2314c4a1c5dda059ff879687eec151ecc languageName: node linkType: hard -"botbuilder-dialogs-declarative@npm:4.13.4-preview": - version: 4.13.4-preview - resolution: "botbuilder-dialogs-declarative@npm:4.13.4-preview" +"botbuilder-dialogs-declarative@npm:4.14.0-preview": + version: 4.14.0-preview + resolution: "botbuilder-dialogs-declarative@npm:4.14.0-preview" dependencies: - botbuilder-core: 4.13.4 - botbuilder-dialogs: 4.13.4 - botbuilder-stdlib: 4.13.4-internal + botbuilder-core: 4.14.0 + botbuilder-dialogs: 4.14.0 + botbuilder-stdlib: 4.14.0-internal chokidar: ^3.4.0 - checksum: e18d637ca5cff9d0df34d813ac57108a617bc989dc37ae85130a2dc8756e11bb695fa47b8283fea8e629f47acae65d067ef9bd064411e8d27fc82d0e053e4d15 + checksum: 25863f1a2e4edd5982a5d103c44aa8f66c2ff16adf07a2fff8d49c48084f2c2143470478b978fbae0c6c82cf2f88e6fcd82a6887453f53526d186bd96d462c50 languageName: node linkType: hard -"botbuilder-dialogs@npm:4.13.4": - version: 4.13.4 - resolution: "botbuilder-dialogs@npm:4.13.4" +"botbuilder-dialogs@npm:4.14.0": + version: 4.14.0 + resolution: "botbuilder-dialogs@npm:4.14.0" dependencies: "@microsoft/recognizers-text-choice": 1.1.4 "@microsoft/recognizers-text-date-time": 1.1.4 "@microsoft/recognizers-text-number": 1.1.4 "@microsoft/recognizers-text-suite": 1.1.4 - botbuilder-core: 4.13.4 - botbuilder-dialogs-adaptive-runtime-core: 4.13.4-preview - botbuilder-stdlib: 4.13.4-internal - botframework-connector: 4.13.4 + botbuilder-core: 4.14.0 + botbuilder-dialogs-adaptive-runtime-core: 4.14.0-preview + botbuilder-stdlib: 4.14.0-internal + botframework-connector: 4.14.0 globalize: ^1.4.2 lodash: ^4.17.21 - runtypes: ~5.1.0 - uuid: ^8.3.2 - checksum: b7ac611bbf67946d0e32383a2df03c8b16f15d80850bb2e235686d588150c015db8d3c1475cad7d452c03d61ac8c5d0e70e30e86508489936e9862090da9cbe7 + zod: ~1.11.17 + checksum: c1f58e6b4bddeeea500f5bea3e1552478b39e11ea679f7d7771cf1bfb29cb79df627ac8405f3997a713338dde6861e0c465e4ab5fa78bf817264b5e49132a56a languageName: node linkType: hard -"botbuilder-lg@npm:4.13.4": - version: 4.13.4 - resolution: "botbuilder-lg@npm:4.13.4" +"botbuilder-lg@npm:4.14.0": + version: 4.14.0 + resolution: "botbuilder-lg@npm:4.14.0" dependencies: - adaptive-expressions: 4.13.4 + adaptive-expressions: 4.14.0 antlr4ts: 0.5.0-alpha.3 lodash: ^4.17.19 - path: ^0.12.7 uuid: ^8.3.2 - checksum: d1788d7ad6cc6fc64d818b89200e7d65b2a3e62e26267838b6b5861030f46fd54250bb46e6aa6da4c04425e317c002c51d00d09c22b894468cecd27ab20c4ee6 + checksum: b7602b0fabdb80994c6949f78fcd6f467917799586d857be37add227a8c261a6b4e4b24ad4d12e41ab458c062fa6fe68cb0bdb8cffa0f4f60b5ef7ea291add08 languageName: node linkType: hard -"botbuilder-stdlib@npm:4.13.4-internal": - version: 4.13.4-internal - resolution: "botbuilder-stdlib@npm:4.13.4-internal" - checksum: c6dd92a039fcca421841d9c0ebec88438152edcc8cab6ef16b2e3653c0cee5d287b4b0df02117c24b51af72a13c095c0b25e34fe2631cd5572addc15a8b735ce +"botbuilder-stdlib@npm:4.14.0-internal": + version: 4.14.0-internal + resolution: "botbuilder-stdlib@npm:4.14.0-internal" + checksum: e38630a1ae535c06422033b1301b764977cfd06259904d25c6a8bd72a676865c456fcdb792ce3abf03a3bb508bb212ab93a4b81702a32384cf297abe7dc9b8d4 languageName: node linkType: hard -"botbuilder@npm:4.13.4": - version: 4.13.4 - resolution: "botbuilder@npm:4.13.4" +"botbuilder@npm:4.14.0": + version: 4.14.0 + resolution: "botbuilder@npm:4.14.0" dependencies: "@azure/ms-rest-js": 1.9.1 axios: ^0.21.1 - botbuilder-core: 4.13.4 - botbuilder-dialogs-adaptive-runtime-core: 4.13.4-preview - botbuilder-stdlib: 4.13.4-internal - botframework-connector: 4.13.4 - botframework-streaming: 4.13.4 + botbuilder-core: 4.14.0 + botbuilder-stdlib: 4.14.0-internal + botframework-connector: 4.14.0 + botframework-streaming: 4.14.0 dayjs: ^1.10.3 filenamify: ^4.1.0 fs-extra: ^7.0.1 htmlparser2: ^6.0.1 uuid: ^8.3.2 - checksum: 20b1ca64457e1c371401f3e79476d4395f829ef7c74ef529958d2a58f90c214f68e679c7c9d73beeee1ec94fda2ad41ad017778a9d05c55c11a0b36a5b11573e + zod: ~1.11.17 + checksum: a916227bc341fc106be36f8fde60f7e83ebb8e05014d5c314c0a515711cd70595615d183989286557bad1ef08a5ad923a4bb03758a03cbc28440facafb9b0932 languageName: node linkType: hard -"botframework-connector@npm:4.13.4": - version: 4.13.4 - resolution: "botframework-connector@npm:4.13.4" +"botframework-connector@npm:4.14.0": + version: 4.14.0 + resolution: "botframework-connector@npm:4.14.0" dependencies: "@azure/ms-rest-js": 1.9.1 "@types/jsonwebtoken": 7.2.8 "@types/node": ^10.17.27 - adal-node: 0.2.1 + adal-node: 0.2.2 + axios: ^0.21.1 base64url: ^3.0.0 - botframework-schema: 4.13.4 + botbuilder-stdlib: 4.14.0-internal + botframework-schema: 4.14.0 cross-fetch: ^3.0.5 jsonwebtoken: 8.0.1 rsa-pem-from-mod-exp: ^0.8.4 - checksum: 2d1ab8b2fd4af68634cb23e31014bbc5464abfe4d76722a275a551a0b81819f15ee89bc343a8a1b918498aecb062020d638a0b2ed3c660169bd005443986dc1d + checksum: 565e2475524cd3ee3d2e4ddd83890e58a15e68f128daf9be5ad943e38c3088e8ed1a7f04c082825059a83fb007106ec1047e90aec19235665c27a526d0e9443e languageName: node linkType: hard -"botframework-schema@npm:4.13.4": - version: 4.13.4 - resolution: "botframework-schema@npm:4.13.4" +"botframework-schema@npm:4.14.0": + version: 4.14.0 + resolution: "botframework-schema@npm:4.14.0" dependencies: - botbuilder-stdlib: 4.13.4-internal - checksum: 5cf0ec42293396802b083e8099077fcb86e40ab41efd4b955aeb76253754b50f35e7d602bf3d88dafb90586bc05ad1d55d959f793333fce6f522d831a1e487ac + botbuilder-stdlib: 4.14.0-internal + uuid: ^8.3.2 + checksum: fd86f0a6eb5be4f84c90bdb58de20129fdd92138652aaebc4cc29ccdf7e0f7944e85c1c007ecb654d576b734fce984466ff2d7edc2f98c344f1210b23f0badf1 languageName: node linkType: hard -"botframework-streaming@npm:4.13.4": - version: 4.13.4 - resolution: "botframework-streaming@npm:4.13.4" +"botframework-streaming@npm:4.14.0": + version: 4.14.0 + resolution: "botframework-streaming@npm:4.14.0" dependencies: "@types/node": ^10.17.27 "@types/ws": ^6.0.3 uuid: ^8.3.2 ws: ^7.1.2 - checksum: b85af5123e04968e5cf89518f643531b15e33da0a42153b33ff8f6f39aebe6b2a5083707c6c6a87a45d755a5f6243216acaee9d3ca24338d2d207c6af05f4f4e + checksum: c23f75c1ddd95f2265bbf77c68ba0c188492398daaa0cda1cab113e9d22dcf63aec1831a5ce1df7382b91f20c0202c12e9afa4c6de799d64690825d3c3b5f76a languageName: node linkType: hard @@ -1991,6 +2196,25 @@ __metadata: languageName: node linkType: hard +"chokidar@npm:3.5.2": + version: 3.5.2 + resolution: "chokidar@npm:3.5.2" + dependencies: + anymatch: ~3.1.2 + braces: ~3.0.2 + fsevents: ~2.3.2 + glob-parent: ~5.1.2 + is-binary-path: ~2.1.0 + is-glob: ~4.0.1 + normalize-path: ~3.0.0 + readdirp: ~3.6.0 + dependenciesMeta: + fsevents: + optional: true + checksum: 52fbff3acebf06ec0125872110f6c8403e66cd3d613264c83405496e199554d99380342d9b3a7ffd7910c53c5865e242ed7dd72fcb2e883d8e3ad3f3883aee6c + languageName: node + linkType: hard + "chownr@npm:^2.0.0": version: 2.0.0 resolution: "chownr@npm:2.0.0" @@ -2292,6 +2516,13 @@ __metadata: languageName: node linkType: hard +"create-require@npm:^1.1.0": + version: 1.1.1 + resolution: "create-require@npm:1.1.1" + checksum: babd307893abfb26d77ae11cb9d6b6cfa6d18c9cee435cf70b5a3fb44aa8d90c9ec26ea89cbb16e0a94b8d34f5fcaee164b90ed526cdd3158955673ab9652d01 + languageName: node + linkType: hard + "cross-fetch@npm:^3.0.5": version: 3.1.4 resolution: "cross-fetch@npm:3.1.4" @@ -2433,7 +2664,7 @@ __metadata: languageName: node linkType: hard -"debug@npm:^4.0.1, debug@npm:^4.1.0": +"debug@npm:^4.0.1, debug@npm:^4.1.0, debug@npm:^4.3.1": version: 4.3.2 resolution: "debug@npm:4.3.2" dependencies: @@ -2864,7 +3095,7 @@ __metadata: languageName: node linkType: hard -"escape-string-regexp@npm:4.0.0": +"escape-string-regexp@npm:4.0.0, escape-string-regexp@npm:^4.0.0": version: 4.0.0 resolution: "escape-string-regexp@npm:4.0.0" checksum: c747be8d5ff7873127e3e0cffe7d2206a37208077fa9c30a3c1bb4f26bebd081c8c24d5fba7a99449f9d20670bea3dc5e1b6098b0f074b099bd38766271a272f @@ -2930,7 +3161,7 @@ __metadata: languageName: node linkType: hard -"eslint-scope@npm:^5.0.0, eslint-scope@npm:^5.1.1": +"eslint-scope@npm:^5.1.1": version: 5.1.1 resolution: "eslint-scope@npm:5.1.1" dependencies: @@ -2940,7 +3171,7 @@ __metadata: languageName: node linkType: hard -"eslint-utils@npm:^2.0.0, eslint-utils@npm:^2.1.0": +"eslint-utils@npm:^2.1.0": version: 2.1.0 resolution: "eslint-utils@npm:2.1.0" dependencies: @@ -2949,6 +3180,17 @@ __metadata: languageName: node linkType: hard +"eslint-utils@npm:^3.0.0": + version: 3.0.0 + resolution: "eslint-utils@npm:3.0.0" + dependencies: + eslint-visitor-keys: ^2.0.0 + peerDependencies: + eslint: ">=5" + checksum: 035451529f016e28edd26e8951f15e28a6a4e58adff67bd0cb494879f360080750b9c779e46561369aec0657ac2b89dd8b0aa38476e8cdf50e635aa872fa27b6 + languageName: node + linkType: hard + "eslint-visitor-keys@npm:^1.1.0, eslint-visitor-keys@npm:^1.3.0": version: 1.3.0 resolution: "eslint-visitor-keys@npm:1.3.0" @@ -2963,6 +3205,56 @@ __metadata: languageName: node linkType: hard +"eslint@npm:^7.30.0": + version: 7.30.0 + resolution: "eslint@npm:7.30.0" + dependencies: + "@babel/code-frame": 7.12.11 + "@eslint/eslintrc": ^0.4.2 + "@humanwhocodes/config-array": ^0.5.0 + ajv: ^6.10.0 + chalk: ^4.0.0 + cross-spawn: ^7.0.2 + debug: ^4.0.1 + doctrine: ^3.0.0 + enquirer: ^2.3.5 + escape-string-regexp: ^4.0.0 + eslint-scope: ^5.1.1 + eslint-utils: ^2.1.0 + eslint-visitor-keys: ^2.0.0 + espree: ^7.3.1 + esquery: ^1.4.0 + esutils: ^2.0.2 + fast-deep-equal: ^3.1.3 + file-entry-cache: ^6.0.1 + functional-red-black-tree: ^1.0.1 + glob-parent: ^5.1.2 + globals: ^13.6.0 + ignore: ^4.0.6 + import-fresh: ^3.0.0 + imurmurhash: ^0.1.4 + is-glob: ^4.0.0 + js-yaml: ^3.13.1 + json-stable-stringify-without-jsonify: ^1.0.1 + levn: ^0.4.1 + lodash.merge: ^4.6.2 + minimatch: ^3.0.4 + natural-compare: ^1.4.0 + optionator: ^0.9.1 + progress: ^2.0.0 + regexpp: ^3.1.0 + semver: ^7.2.1 + strip-ansi: ^6.0.0 + strip-json-comments: ^3.1.0 + table: ^6.0.9 + text-table: ^0.2.0 + v8-compile-cache: ^2.0.3 + bin: + eslint: bin/eslint.js + checksum: 028048847e0252d6c972ac612fe37be55822ae2255d10d1bf68255749f7ae1364b2aa538cd95f3bc4d951fc7d36195e46b62fe8d215297ef9a6a8aeb8ca28a90 + languageName: node + linkType: hard + "eslint@npm:latest": version: 7.21.0 resolution: "eslint@npm:7.21.0" @@ -3252,7 +3544,7 @@ __metadata: languageName: node linkType: hard -"fast-deep-equal@npm:^3.1.1": +"fast-deep-equal@npm:^3.1.1, fast-deep-equal@npm:^3.1.3": version: 3.1.3 resolution: "fast-deep-equal@npm:3.1.3" checksum: 451526766b219503131d11e823eaadd1533080b0be4860e316670b039dcaf31cd1007c2fe036a9b922abba7c040dfad5e942ed79d21f2ff849e50049f36e0fb7 @@ -3641,7 +3933,7 @@ fsevents@^1.2.3: languageName: node linkType: hard -"fsevents@patch:fsevents@~2.3.1#builtin": +"fsevents@patch:fsevents@~2.3.1#builtin, fsevents@patch:fsevents@~2.3.2#builtin": version: 2.3.2 resolution: "fsevents@patch:fsevents@npm%3A2.3.2#builtin::version=2.3.2&hash=11e9ea" dependencies: @@ -3650,7 +3942,7 @@ fsevents@^1.2.3: languageName: node linkType: hard -fsevents@~2.3.1: +"fsevents@~2.3.1, fsevents@~2.3.2": version: 2.3.2 resolution: "fsevents@npm:2.3.2" dependencies: @@ -3841,7 +4133,7 @@ fsevents@~2.3.1: languageName: node linkType: hard -"glob-parent@npm:^5.0.0, glob-parent@npm:^5.1.0, glob-parent@npm:~5.1.0": +"glob-parent@npm:^5.0.0, glob-parent@npm:^5.1.0, glob-parent@npm:^5.1.2, glob-parent@npm:~5.1.0, glob-parent@npm:~5.1.2": version: 5.1.2 resolution: "glob-parent@npm:5.1.2" dependencies: @@ -3871,6 +4163,20 @@ fsevents@~2.3.1: languageName: node linkType: hard +"glob@npm:7.1.7": + version: 7.1.7 + resolution: "glob@npm:7.1.7" + dependencies: + fs.realpath: ^1.0.0 + inflight: ^1.0.4 + inherits: 2 + minimatch: ^3.0.4 + once: ^1.3.0 + path-is-absolute: ^1.0.0 + checksum: 352f74f08247db5420161a2f68f2bd84b53228b5fcfc9dcc37cd54d3f19ec0232495d84aeff1286d0727059e9fdc1031400e00b971bdc59e30f8f82b199c9d02 + languageName: node + linkType: hard + "globalize@npm:^1.4.2": version: 1.6.0 resolution: "globalize@npm:1.6.0" @@ -3889,6 +4195,15 @@ fsevents@~2.3.1: languageName: node linkType: hard +"globals@npm:^13.6.0, globals@npm:^13.9.0": + version: 13.10.0 + resolution: "globals@npm:13.10.0" + dependencies: + type-fest: ^0.20.2 + checksum: ae5f8d4ef26b845a3d2a370a0dd0b7cc8bce09d11bf75dbde8dce8a0855e8ad4f34613090eaad8e71d24fb01fe00d8b2708533b32da08f104c0ddd19b70219f1 + languageName: node + linkType: hard + "globals@npm:^9.18.0": version: 9.18.0 resolution: "globals@npm:9.18.0" @@ -3896,9 +4211,9 @@ fsevents@~2.3.1: languageName: node linkType: hard -"globby@npm:^11.0.1, globby@npm:^11.0.3": - version: 11.0.3 - resolution: "globby@npm:11.0.3" +"globby@npm:^11.0.2": + version: 11.0.2 + resolution: "globby@npm:11.0.2" dependencies: array-union: ^2.1.0 dir-glob: ^3.0.1 @@ -3906,13 +4221,13 @@ fsevents@~2.3.1: ignore: ^5.1.4 merge2: ^1.3.0 slash: ^3.0.0 - checksum: f17da0f869918656ec8c16c15ad100f025fbd13e4c157286cf340811eb1355a7d06dde77be1685a7a051970ec6abeff96a9b2a1a97525f84bc94fbd518c1d1db + checksum: d23f2a6b8897b97fb27422cde243e0fd406ebbaa821929293b27c977d169884f8112494cda4f456a51d0ec1e133e3ac703ec24bfed484e327305ea34a665eb06 languageName: node linkType: hard -"globby@npm:^11.0.2": - version: 11.0.2 - resolution: "globby@npm:11.0.2" +"globby@npm:^11.0.3": + version: 11.0.3 + resolution: "globby@npm:11.0.3" dependencies: array-union: ^2.1.0 dir-glob: ^3.0.1 @@ -3920,7 +4235,7 @@ fsevents@~2.3.1: ignore: ^5.1.4 merge2: ^1.3.0 slash: ^3.0.0 - checksum: d23f2a6b8897b97fb27422cde243e0fd406ebbaa821929293b27c977d169884f8112494cda4f456a51d0ec1e133e3ac703ec24bfed484e327305ea34a665eb06 + checksum: f17da0f869918656ec8c16c15ad100f025fbd13e4c157286cf340811eb1355a7d06dde77be1685a7a051970ec6abeff96a9b2a1a97525f84bc94fbd518c1d1db languageName: node linkType: hard @@ -4377,20 +4692,6 @@ fsevents@~2.3.1: languageName: node linkType: hard -"inherits@npm:2.0.1": - version: 2.0.1 - resolution: "inherits@npm:2.0.1" - checksum: 6f59f627a64cff6f4b5a2723184d831e6fc376cf88b8a94821caa2cad9d44da6d79583335024c01a541d9a25767785928a28f6e2192bb14be9ce800b315b4faa - languageName: node - linkType: hard - -"inherits@npm:2.0.3": - version: 2.0.3 - resolution: "inherits@npm:2.0.3" - checksum: 9488f9433effbc24474f6baee8014e5337c7f99305ecb4204fa5864ae7655c24225780d87fc65ed8d3d374715a18c5dc8c69fe3bf9745cde2e7acd0ac068a07b - languageName: node - linkType: hard - "ini@npm:~1.3.0": version: 1.3.8 resolution: "ini@npm:1.3.8" @@ -5530,6 +5831,17 @@ fsevents@~2.3.1: languageName: node linkType: hard +"js-yaml@npm:4.1.0": + version: 4.1.0 + resolution: "js-yaml@npm:4.1.0" + dependencies: + argparse: ^2.0.1 + bin: + js-yaml: bin/js-yaml.js + checksum: 8973cf4296c944cc2551d1e3d3d064e7de0d0a6db3f7bafe40339ee9e5e0329560b52c4b8492b9b22365404c9be0822b62340ab49884e1dedfcc7ff80158abe0 + languageName: node + linkType: hard + "js-yaml@npm:^3.13.1, js-yaml@npm:^3.7.0": version: 3.14.1 resolution: "js-yaml@npm:3.14.1" @@ -5641,7 +5953,7 @@ fsevents@~2.3.1: languageName: node linkType: hard -"json-stringify-safe@npm:~5.0.1": +"json-stringify-safe@npm:^5.0.1, json-stringify-safe@npm:~5.0.1": version: 5.0.1 resolution: "json-stringify-safe@npm:5.0.1" checksum: 261dfb8eb3e72c8b0dda11fd7c20c151ffc1d1b03e529245d51708c8dd8d8c6a225880464adf41a570dff6e5c805fd9d1f47fed948cfb526e4fbe5a67ce4e5f4 @@ -5902,6 +6214,13 @@ fsevents@~2.3.1: languageName: node linkType: hard +"lodash.clonedeep@npm:^4.5.0": + version: 4.5.0 + resolution: "lodash.clonedeep@npm:4.5.0" + checksum: 41e2fe4c57c56a66a4775a6ddeebe9272f0ce4d257d97b3cb8724a9b01eeec9b09ce7e8603d6926baf5f48c287d988f0de4bf5aa244ea86b1f22c1e6f203cc27 + languageName: node + linkType: hard + "lodash.escaperegexp@npm:^4.1.2": version: 4.1.2 resolution: "lodash.escaperegexp@npm:4.1.2" @@ -5979,6 +6298,13 @@ fsevents@~2.3.1: languageName: node linkType: hard +"lodash.merge@npm:^4.6.2": + version: 4.6.2 + resolution: "lodash.merge@npm:4.6.2" + checksum: 4e2bb42a87a148991458d7c384bc197e96f7115e9536fc8e2c86ae9e99ce1c1f693ff15eb85761952535f48d72253aed8e673d9f32dde3e671cd91e3fde220a7 + languageName: node + linkType: hard + "lodash.once@npm:^4.0.0": version: 4.1.1 resolution: "lodash.once@npm:4.1.1" @@ -5986,6 +6312,13 @@ fsevents@~2.3.1: languageName: node linkType: hard +"lodash.set@npm:^4.3.2": + version: 4.3.2 + resolution: "lodash.set@npm:4.3.2" + checksum: 4dfedacae1c1cf86385a2b6e30ba538f06c90d703a0abd83a11432d80ec24b4016fe27359cdc0554a02a31a468789cbb282801dd755e54581cf0295477e2341d + languageName: node + linkType: hard + "lodash.sortby@npm:^4.7.0": version: 4.7.0 resolution: "lodash.sortby@npm:4.7.0" @@ -6007,6 +6340,13 @@ fsevents@~2.3.1: languageName: node linkType: hard +"lodash.truncate@npm:^4.4.2": + version: 4.4.2 + resolution: "lodash.truncate@npm:4.4.2" + checksum: b1b0d7d993bb73d0032fe909d4523a836b6aa91566fa88ff78c3eac008bd3d3b2ba0f2e8381d7f906b1d6913a64982f34bea95dd556355c0d418bfddf3ab7b06 + languageName: node + linkType: hard + "lodash.zip@npm:^4.0.0": version: 4.2.0 resolution: "lodash.zip@npm:4.2.0" @@ -6014,7 +6354,7 @@ fsevents@~2.3.1: languageName: node linkType: hard -"lodash@npm:^4.17.10, lodash@npm:^4.17.11, lodash@npm:^4.17.14, lodash@npm:^4.17.15, lodash@npm:^4.17.19, lodash@npm:^4.17.20, lodash@npm:^4.17.21, lodash@npm:^4.17.4, lodash@npm:^4.3.0": +"lodash@npm:^4.17.10, lodash@npm:^4.17.11, lodash@npm:^4.17.13, lodash@npm:^4.17.14, lodash@npm:^4.17.15, lodash@npm:^4.17.19, lodash@npm:^4.17.20, lodash@npm:^4.17.21, lodash@npm:^4.17.4, lodash@npm:^4.3.0": version: 4.17.21 resolution: "lodash@npm:4.17.21" checksum: 4983720b9abca930a4a46f18db163d7dad8dd00dbed6db0cc7b499b33b717cce69f80928b27bbb1ff2cbd3b19d251ee90669a8b5ea466072ca81c2ebe91e7468 @@ -6030,16 +6370,7 @@ fsevents@~2.3.1: languageName: node linkType: hard -"log-symbols@npm:^2.2.0": - version: 2.2.0 - resolution: "log-symbols@npm:2.2.0" - dependencies: - chalk: ^2.0.1 - checksum: e2dfd255f3e3080134055597fb67bd67798d65383488683ed90f0376f7264dd21028f30d4c3a0686251dcfc4dc71172e8061cef21e89c6deabb8b375450d5166 - languageName: node - linkType: hard - -"log-symbols@npm:^4.1.0": +"log-symbols@npm:4.1.0, log-symbols@npm:^4.1.0": version: 4.1.0 resolution: "log-symbols@npm:4.1.0" dependencies: @@ -6049,6 +6380,15 @@ fsevents@~2.3.1: languageName: node linkType: hard +"log-symbols@npm:^2.2.0": + version: 2.2.0 + resolution: "log-symbols@npm:2.2.0" + dependencies: + chalk: ^2.0.1 + checksum: e2dfd255f3e3080134055597fb67bd67798d65383488683ed90f0376f7264dd21028f30d4c3a0686251dcfc4dc71172e8061cef21e89c6deabb8b375450d5166 + languageName: node + linkType: hard + "lolex@npm:^2.4.2": version: 2.7.5 resolution: "lolex@npm:2.7.5" @@ -6126,6 +6466,13 @@ fsevents@~2.3.1: languageName: node linkType: hard +"make-error@npm:^1.1.1": + version: 1.3.6 + resolution: "make-error@npm:1.3.6" + checksum: 2c780bab8409b865e8ee86697c599a2bf2765ec64d21eb67ccda27050e039f983feacad05a0d43aba3c966ea03d305d2612e94fec45474bcbc61181f57c5bb88 + languageName: node + linkType: hard + "makeerror@npm:1.0.x": version: 1.0.11 resolution: "makeerror@npm:1.0.11" @@ -6507,6 +6854,42 @@ fsevents@~2.3.1: languageName: node linkType: hard +"mocha@npm:^9.0.2": + version: 9.0.2 + resolution: "mocha@npm:9.0.2" + dependencies: + "@ungap/promise-all-settled": 1.1.2 + ansi-colors: 4.1.1 + browser-stdout: 1.3.1 + chokidar: 3.5.2 + debug: 4.3.1 + diff: 5.0.0 + escape-string-regexp: 4.0.0 + find-up: 5.0.0 + glob: 7.1.7 + growl: 1.10.5 + he: 1.2.0 + js-yaml: 4.1.0 + log-symbols: 4.1.0 + minimatch: 3.0.4 + ms: 2.1.3 + nanoid: 3.1.23 + serialize-javascript: 6.0.0 + strip-json-comments: 3.1.1 + supports-color: 8.1.1 + which: 2.0.2 + wide-align: 1.1.3 + workerpool: 6.1.5 + yargs: 16.2.0 + yargs-parser: 20.2.4 + yargs-unparser: 2.0.0 + bin: + _mocha: bin/_mocha + mocha: bin/mocha + checksum: 305d820f2e7237f54c2c034198978c1ef7c0cf99ddf0c511c8e65e0d7cd00a2b87f7826dc91afa080473152159c1402f419f18d67f831dc55ebc84710ee97823 + languageName: node + linkType: hard + "moment@npm:^2.15.1, moment@npm:^2.24.0": version: 2.29.1 resolution: "moment@npm:2.29.1" @@ -6573,6 +6956,13 @@ fsevents@~2.3.1: languageName: node linkType: hard +"murmurhash-js@npm:^1.0.0": + version: 1.0.0 + resolution: "murmurhash-js@npm:1.0.0" + checksum: 7b0f02796fde7a6fe0e41ed3197b758e6824f33b284a5cbdcca0942e629d34309a4e344760204ad5503dc1d75f9ba7574b72406ac654dc56ab69f22b1e9ee821 + languageName: node + linkType: hard + "mute-stream@npm:0.0.7": version: 0.0.7 resolution: "mute-stream@npm:0.0.7" @@ -6605,6 +6995,15 @@ fsevents@~2.3.1: languageName: node linkType: hard +"nanoid@npm:3.1.23": + version: 3.1.23 + resolution: "nanoid@npm:3.1.23" + bin: + nanoid: bin/nanoid.cjs + checksum: e6dea1da5a593ffdc8cf2676d1d02f0626f07a54a5947a7a1f5ff1fd07901b2f53044c285e98b87eb367f016fde285fd8785d54a2dceeab9c3721f4e618f8326 + languageName: node + linkType: hard + "nanomatch@npm:^1.2.9": version: 1.2.13 resolution: "nanomatch@npm:1.2.13" @@ -6671,6 +7070,31 @@ fsevents@~2.3.1: languageName: node linkType: hard +"nock@npm:^11.9.1": + version: 11.9.1 + resolution: "nock@npm:11.9.1" + dependencies: + debug: ^4.1.0 + json-stringify-safe: ^5.0.1 + lodash: ^4.17.13 + mkdirp: ^0.5.0 + propagate: ^2.0.0 + checksum: 4cbbe7ee50d7a1514c60dfdbd40e10b9ec51035b8f0282dbb1bdd795ae2dd6d8612713b5edcf7fb1034f2d6b4449f672be71880702f1f5d36e06b0e718731ffc + languageName: node + linkType: hard + +"nock@npm:^13.1.1": + version: 13.1.1 + resolution: "nock@npm:13.1.1" + dependencies: + debug: ^4.1.0 + json-stringify-safe: ^5.0.1 + lodash.set: ^4.3.2 + propagate: ^2.0.0 + checksum: fa118c2c62a432b4665fa2a8fe549959ba41666bebf5939873a0fbc3a860310580272de74b3ea9538758a7f08dddd807edf35f162854763a0056f2ed892b210f + languageName: node + linkType: hard + "node-fetch@npm:2.6.1, node-fetch@npm:^2.6.0": version: 2.6.1 resolution: "node-fetch@npm:2.6.1" @@ -6845,7 +7269,7 @@ fsevents@~2.3.1: languageName: node linkType: hard -"object-assign@npm:^4.1.0, object-assign@npm:^4.1.1": +"object-assign@npm:^4.1.0": version: 4.1.1 resolution: "object-assign@npm:4.1.1" checksum: 66cf021898fc1b13ea573ea8635fbd5a76533f50cecbc2fcd5eee1e8029af41bcebe7023788b6d0e06cbe4401ecea075d972f78ec74467cdc571a0f1a4d1a081 @@ -7322,16 +7746,6 @@ fsevents@~2.3.1: languageName: node linkType: hard -"path@npm:^0.12.7": - version: 0.12.7 - resolution: "path@npm:0.12.7" - dependencies: - process: ^0.11.1 - util: ^0.10.3 - checksum: 0e2d3342ca6f91aba8e514919cae8a08ad12071297a3a99da6e3ea493f5296d9bb323ca9bece4d035fc280e91b701a740ce1e48ff65802004deaaae2f2cd623e - languageName: node - linkType: hard - "performance-now@npm:^2.1.0": version: 2.1.0 resolution: "performance-now@npm:2.1.0" @@ -7504,13 +7918,6 @@ fsevents@~2.3.1: languageName: node linkType: hard -"process@npm:^0.11.1": - version: 0.11.10 - resolution: "process@npm:0.11.10" - checksum: ed93a85e9185b40fb01788c588a87c1a9da0eb925ef7cebebbe1b8bbf0eba1802130366603a29e3b689c116969d4fe018de6aed3474bbeb5aefb3716b85d6449 - languageName: node - linkType: hard - "progress@npm:^2.0.0": version: 2.0.3 resolution: "progress@npm:2.0.3" @@ -7528,6 +7935,13 @@ fsevents@~2.3.1: languageName: node linkType: hard +"propagate@npm:^2.0.0": + version: 2.0.1 + resolution: "propagate@npm:2.0.1" + checksum: dd67518106bb3f1ee230b7e246a18285467e010b89703844f120c38e1462b52d79bddd4be0f8db080377a3d55218209674eae9eb672c29a033bf6b44cfc42828 + languageName: node + linkType: hard + "psl@npm:^1.1.28": version: 1.8.0 resolution: "psl@npm:1.8.0" @@ -7570,6 +7984,13 @@ fsevents@~2.3.1: languageName: node linkType: hard +"querystringify@npm:^2.1.1": + version: 2.2.0 + resolution: "querystringify@npm:2.2.0" + checksum: 6235036be3aedff7919dfc06b23f759264915c5794c6352d52a917401d40d2b9bb43b1d82e4e5be983e469aa320e06992aefc218192f6fa1d9eba4f54dc4786c + languageName: node + linkType: hard + "queue-microtask@npm:^1.2.2": version: 1.2.2 resolution: "queue-microtask@npm:1.2.2" @@ -7740,6 +8161,15 @@ fsevents@~2.3.1: languageName: node linkType: hard +"readdirp@npm:~3.6.0": + version: 3.6.0 + resolution: "readdirp@npm:3.6.0" + dependencies: + picomatch: ^2.2.1 + checksum: 7da2fe8d5abf17ae0bf97a052718e16d29fa185f3e461153035728d93642326ae8e44c17b9a9b3a5fa616dff160e96be3184e0323efaac7211f80c0aab5f622b + languageName: node + linkType: hard + "realpath-native@npm:^1.0.0": version: 1.1.0 resolution: "realpath-native@npm:1.1.0" @@ -7784,7 +8214,7 @@ fsevents@~2.3.1: languageName: node linkType: hard -"regexpp@npm:^3.0.0, regexpp@npm:^3.1.0": +"regexpp@npm:^3.1.0": version: 3.1.0 resolution: "regexpp@npm:3.1.0" checksum: 69d0ce6b449cf35d3732d6341a1e70850360ffc619f8eef10629871c462e614853fffb80d3f00fc17cd0bb5b8f34b0cde5be4b434e72c0eb3fbba2360c8b5ac4 @@ -7861,7 +8291,7 @@ fsevents@~2.3.1: languageName: node linkType: hard -"request@npm:^2.87.0, request@npm:^2.88.0, request@npm:^2.88.2": +"request@npm:^2.87.0, request@npm:^2.88.2": version: 2.88.2 resolution: "request@npm:2.88.2" dependencies: @@ -7910,6 +8340,13 @@ fsevents@~2.3.1: languageName: node linkType: hard +"requires-port@npm:^1.0.0": + version: 1.0.0 + resolution: "requires-port@npm:1.0.0" + checksum: 0db25fb2ac9b4f2345a350846b7ba99d1f25a6686b1728246d14f05450c8f2fc066bdfae4561b4be2627c184a030a27e17268cfefdf46836e271db13734bc49e + languageName: node + linkType: hard + "resolve-cwd@npm:^2.0.0": version: 2.0.0 resolution: "resolve-cwd@npm:2.0.0" @@ -8205,6 +8642,17 @@ resolve@1.1.7: languageName: node linkType: hard +"semver@npm:^7.3.5": + version: 7.3.5 + resolution: "semver@npm:7.3.5" + dependencies: + lru-cache: ^6.0.0 + bin: + semver: bin/semver.js + checksum: c53624ddf4b9779bcbf55a1eb8b37074cc44bfeca416f3cc263429408202a8a3c59b00eef8c647d697303bc39b95c022a5c61959221d3814bfb1270ff7c14986 + languageName: node + linkType: hard + "serialize-javascript@npm:5.0.1": version: 5.0.1 resolution: "serialize-javascript@npm:5.0.1" @@ -8214,6 +8662,15 @@ resolve@1.1.7: languageName: node linkType: hard +"serialize-javascript@npm:6.0.0": + version: 6.0.0 + resolution: "serialize-javascript@npm:6.0.0" + dependencies: + randombytes: ^2.1.0 + checksum: e086a40bfcb9d341c37a4e52bc200d143b54397cf1bb486f38cd40cdbaac4b82437d981472df94dbcff6334269e0d82daffbd6b75dd50fe54a5a5da2273f2360 + languageName: node + linkType: hard + "set-blocking@npm:^2.0.0, set-blocking@npm:~2.0.0": version: 2.0.0 resolution: "set-blocking@npm:2.0.0" @@ -8445,7 +8902,7 @@ resolve@1.1.7: languageName: node linkType: hard -"source-map-support@npm:^0.5.6": +"source-map-support@npm:^0.5.17, source-map-support@npm:^0.5.6": version: 0.5.19 resolution: "source-map-support@npm:0.5.19" dependencies: @@ -8835,6 +9292,20 @@ resolve@1.1.7: languageName: node linkType: hard +"table@npm:^6.0.9": + version: 6.7.1 + resolution: "table@npm:6.7.1" + dependencies: + ajv: ^8.0.1 + lodash.clonedeep: ^4.5.0 + lodash.truncate: ^4.4.2 + slice-ansi: ^4.0.0 + string-width: ^4.2.0 + strip-ansi: ^6.0.0 + checksum: 66107046b7226051552d53c1260facfed03f4050373d3888620af7b1353f6a5429d9a4a5fb796c56c29b9dd5ffca7b661a815f42ec392cb5956432585578772a + languageName: node + linkType: hard + "tar@npm:^6.0.2": version: 6.1.0 resolution: "tar@npm:6.1.0" @@ -9029,14 +9500,55 @@ resolve@1.1.7: languageName: node linkType: hard -"tslib@npm:^1.8.1, tslib@npm:^1.9.0, tslib@npm:^1.9.2": +"ts-node@npm:^10.0.0": + version: 10.0.0 + resolution: "ts-node@npm:10.0.0" + dependencies: + "@tsconfig/node10": ^1.0.7 + "@tsconfig/node12": ^1.0.7 + "@tsconfig/node14": ^1.0.0 + "@tsconfig/node16": ^1.0.1 + arg: ^4.1.0 + create-require: ^1.1.0 + diff: ^4.0.1 + make-error: ^1.1.1 + source-map-support: ^0.5.17 + yn: 3.1.1 + peerDependencies: + "@swc/core": ">=1.2.45" + "@swc/wasm": ">=1.2.45" + "@types/node": "*" + typescript: ">=2.7" + peerDependenciesMeta: + "@swc/core": + optional: true + "@swc/wasm": + optional: true + bin: + ts-node: dist/bin.js + ts-node-cwd: dist/bin-cwd.js + ts-node-script: dist/bin-script.js + ts-node-transpile-only: dist/bin-transpile.js + ts-script: dist/bin-script-deprecated.js + checksum: dc461e2b9b931b00ff065530a0247f86da1d035e72a7ef6d7ed072dd8e6b236d1879f113dcc73a354d240c81b6b845445c3d32b16eeb68022ed27ab6d130c049 + languageName: node + linkType: hard + +"tslib@npm:^1.8.1, tslib@npm:^1.9.0, tslib@npm:^1.9.2, tslib@npm:^1.9.3": version: 1.14.1 resolution: "tslib@npm:1.14.1" checksum: f44fe7f216946b17d3e3074df3746372703cf24e9127b4c045511456e8e4bf25515fb0a1bb3937676cc305651c5d4fcb6377b0588a4c6a957e748c4c28905d17 languageName: node linkType: hard -"tsutils@npm:^3.17.1": +"tslib@npm:^2.0.0, tslib@npm:^2.2.0": + version: 2.3.0 + resolution: "tslib@npm:2.3.0" + checksum: 7b4fc9feff0f704743c3760f5d8d708f6417fac6458159e63df3a6b1100f0736e3b99edb9fe370f274ad15160a1f49ff05cb49402534c818ff552c48e38c3e6e + languageName: node + linkType: hard + +"tsutils@npm:^3.21.0": version: 3.21.0 resolution: "tsutils@npm:3.21.0" dependencies: @@ -9102,6 +9614,13 @@ resolve@1.1.7: languageName: node linkType: hard +"type-fest@npm:^0.20.2": + version: 0.20.2 + resolution: "type-fest@npm:0.20.2" + checksum: 1f887bc6150e632fb772fd28e33c22a4ab036c6f484fa9ac2e2115f6cae9d62bba7ca0368e3332b539d85bd2c8391c7bff22ad410abcbc9ab3774d61e250b210 + languageName: node + linkType: hard + "type-fest@npm:^0.6.0": version: 0.6.0 resolution: "type-fest@npm:0.6.0" @@ -9257,6 +9776,16 @@ typescript@^4.0.5: languageName: node linkType: hard +"url-parse@npm:^1.5.1": + version: 1.5.1 + resolution: "url-parse@npm:1.5.1" + dependencies: + querystringify: ^2.1.1 + requires-port: ^1.0.0 + checksum: d8342b597bf1760c4b9e3c78458524d783fa1c901658f3db8b576fc73451c89e6686d218ddca4845b082a63b23971b4a8b916cccc91f4156cc9f97ffdabe0079 + languageName: node + linkType: hard + "url-to-options@npm:^1.0.1": version: 1.0.1 resolution: "url-to-options@npm:1.0.1" @@ -9291,24 +9820,6 @@ typescript@^4.0.5: languageName: node linkType: hard -"util@npm:0.10.3": - version: 0.10.3 - resolution: "util@npm:0.10.3" - dependencies: - inherits: 2.0.1 - checksum: 05c1a09f3af90250365386331b3986c0753af1900f20279f9302409b27e9d9d3c03a9cf4efba48aae859d04348ebfe56d68f89688113f61171da9c4fbe6baaca - languageName: node - linkType: hard - -"util@npm:^0.10.3": - version: 0.10.4 - resolution: "util@npm:0.10.4" - dependencies: - inherits: 2.0.3 - checksum: 6682ea8239076243495c45e81f19c2c002e02805de4de08554dc815500805923f27f504ec1a9c7599d420b62bf7452efbab6fa078219d529188b0ca830f142a5 - languageName: node - linkType: hard - "uuid@npm:^3.1.0, uuid@npm:^3.2.1, uuid@npm:^3.3.2": version: 3.4.0 resolution: "uuid@npm:3.4.0" @@ -9558,6 +10069,13 @@ typescript@^4.0.5: languageName: node linkType: hard +"workerpool@npm:6.1.5": + version: 6.1.5 + resolution: "workerpool@npm:6.1.5" + checksum: aaf220c463d32c146887d28b45f0291e803c8c41d77a559ff525347f178b3b53b3b029a240bb92529a72771093f7cf5afdc81a28396ecc2f2f3179ad31d03456 + languageName: node + linkType: hard + "wrap-ansi@npm:^2.0.0": version: 2.1.0 resolution: "wrap-ansi@npm:2.1.0" @@ -9960,9 +10478,23 @@ typescript@^4.0.5: languageName: node linkType: hard +"yn@npm:3.1.1": + version: 3.1.1 + resolution: "yn@npm:3.1.1" + checksum: bff63b80568d80c711670935427494dde47cdf97e8b04196b140ce0af519c81c5ee857eddad0caa8b422dd65aea0157bbfaacbb1546bebba623f0f383d5d9ae5 + languageName: node + linkType: hard + "yocto-queue@npm:^0.1.0": version: 0.1.0 resolution: "yocto-queue@npm:0.1.0" checksum: 096c3b40beb2804659539be1605a35c58eb0c85285f94b77b3e924f42ee265c1a40bf9f4153770039517146b469a964d51742395f35ca8135fc9f7e4982b785d languageName: node linkType: hard + +"zod@npm:~1.11.17": + version: 1.11.17 + resolution: "zod@npm:1.11.17" + checksum: 27e8799fa87ea4478a3155f40c39c4bef331b3c3273f00252ca646879c92eef54a5c36dcf31b6cd29bfd723fa4c1502e24d59e252d657183eab1252f273dfd7f + languageName: node + linkType: hard