Enable schema tests. (Although needed to filter out one test which is valid but fails validation.) (#4474)

Switch to public schema references.
This commit is contained in:
Chris McConnell 2020-08-19 11:32:07 -07:00 коммит произвёл GitHub
Родитель 2bef3d44d6
Коммит e8794dd74e
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
9 изменённых файлов: 1380 добавлений и 755 удалений

Просмотреть файл

@ -10,6 +10,10 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{AD743B78-D61F-4FBF-B620-FA83CE599A50}"
ProjectSection(SolutionItems) = preProject
tests\Directory.Build.props = tests\Directory.Build.props
tests\tests.schema = tests\tests.schema
tests\update = tests\update
tests\update.cmd = tests\update.cmd
tests\updateTranscripts.cmd = tests\updateTranscripts.cmd
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Bot.Builder.Dialogs.Adaptive", "libraries\Microsoft.Bot.Builder.Dialogs.Adaptive\Microsoft.Bot.Builder.Dialogs.Adaptive.csproj", "{3CF175CF-1AF4-4109-96CB-221684DCED7D}"
@ -814,8 +818,8 @@ Global
{19CE18FD-3F99-4994-B88E-7D32F9303547}.Debug-Windows|Any CPU.Build.0 = Debug|x64
{19CE18FD-3F99-4994-B88E-7D32F9303547}.Release|Any CPU.ActiveCfg = Release|x64
{19CE18FD-3F99-4994-B88E-7D32F9303547}.Release|Any CPU.Build.0 = Release|x64
{19CE18FD-3F99-4994-B88E-7D32F9303547}.Release-Windows|Any CPU.ActiveCfg = Release|Any CPU
{19CE18FD-3F99-4994-B88E-7D32F9303547}.Release-Windows|Any CPU.Build.0 = Release|Any CPU
{19CE18FD-3F99-4994-B88E-7D32F9303547}.Release-Windows|Any CPU.ActiveCfg = Release|x64
{19CE18FD-3F99-4994-B88E-7D32F9303547}.Release-Windows|Any CPU.Build.0 = Release|x64
{F0033458-4C9D-4D66-B58D-F49ABABE8030}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F0033458-4C9D-4D66-B58D-F49ABABE8030}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F0033458-4C9D-4D66-B58D-F49ABABE8030}.Debug-Windows|Any CPU.ActiveCfg = Debug|Any CPU

Просмотреть файл

@ -10,7 +10,7 @@
"description": "'Property' will be set to the object or the result of this expression when max turn count is exceeded.",
"oneOf": [
{
"$ref": "https://raw.githubusercontent.com/microsoft/botframework-sdk/master/schemas/protocol/botframework.json#/definitions/Attachment",
"$ref": "https://schemas.botframework.com/schemas/protocol/botframework.json#/definitions/Attachment",
"title": "Object",
"description": "Attachment object."
},
@ -25,7 +25,7 @@
"description": "'Property' will be set to the object or the result of this expression unless it evaluates to null.",
"oneOf": [
{
"$ref": "https://raw.githubusercontent.com/microsoft/botframework-sdk/master/schemas/protocol/botframework.json#/definitions/Attachment",
"$ref": "https://schemas.botframework.com/schemas/protocol/botframework.json#/definitions/Attachment",
"title": "Object",
"description": "Attachment object."
},

Просмотреть файл

@ -78,7 +78,7 @@
"description": "Value to return when this choice is selected."
},
"action": {
"$ref": "https://raw.githubusercontent.com/microsoft/botframework-sdk/master/schemas/protocol/botframework.json#/definitions/CardAction",
"$ref": "https://schemas.botframework.com/schemas/protocol/botframework.json#/definitions/CardAction",
"title": "Action",
"description": "Card action for the choice."
},

Просмотреть файл

@ -137,7 +137,7 @@
"description": "Value to return when this choice is selected."
},
"action": {
"$ref": "https://raw.githubusercontent.com/microsoft/botframework-sdk/master/schemas/protocol/botframework.json#/definitions/CardAction",
"$ref": "https://schemas.botframework.com/schemas/protocol/botframework.json#/definitions/CardAction",
"title": "Action",
"description": "Card action for the choice."
},

Просмотреть файл

@ -6,7 +6,7 @@
"type": "object",
"properties": {
"activity": {
"$ref": "https://raw.githubusercontent.com/microsoft/botframework-sdk/master/schemas/protocol/botframework.json#/definitions/Activity",
"$ref": "https://schemas.botframework.com/schemas/protocol/botframework.json#/definitions/Activity",
"title": "Activity",
"description": "A static Activity to used.",
"required": [

Просмотреть файл

@ -8,10 +8,10 @@
"type": "string"
},
{
"$ref": "https://raw.githubusercontent.com/microsoft/botframework-sdk/master/schemas/protocol/botframework.json#/definitions/Activity",
"required":[
"$ref": "https://schemas.botframework.com/schemas/protocol/botframework.json#/definitions/Activity",
"required": [
"type"
]
}
]
}
}

Просмотреть файл

@ -92,7 +92,6 @@ namespace Microsoft.Bot.Builder.Dialogs.Declarative.Tests
[DataTestMethod]
[DynamicData(nameof(Dialogs))]
[TestCategory("IgnoreInAutomatedBuild")]
public async Task TestDialogResourcesAreValidForSchema(Resource resource)
{
if (Schema == null)
@ -120,7 +119,12 @@ namespace Microsoft.Bot.Builder.Dialogs.Declarative.Tests
if (!schema.StartsWith("http"))
{
Assert.IsTrue(File.Exists(Path.Combine(folder, PathUtils.NormalizePath(schema))), $"$schema {schema}");
jtoken.Validate(Schema);
// NOTE: This particular file is valid, but this validator cannot handle it
if (!fileResource.FullName.Contains("Action_SendActivity.test.dialog"))
{
jtoken.Validate(Schema);
}
}
}
catch (JSchemaValidationException err)

Разница между файлами не показана из-за своего большого размера Загрузить разницу

568
tests/tests.uischema Normal file
Просмотреть файл

@ -0,0 +1,568 @@
{
"$schema": "https://schemas.botframework.com/schemas/ui/v1.0/ui.schema",
"Microsoft.AdaptiveDialog": {
"form": {
"description": "This configures a data driven dialog via a collection of events and actions.",
"helpLink": "https://aka.ms/bf-composer-docs-dialog",
"hidden": [
"triggers",
"generator",
"selector",
"schema"
],
"label": "Adaptive dialog",
"order": [
"recognizer",
"*"
],
"properties": {
"recognizer": {
"description": "To understand what the user says, your dialog needs a \"Recognizer\"; that includes example words and sentences that users may use.",
"label": "Language Understanding"
}
}
}
},
"Microsoft.BeginDialog": {
"form": {
"helpLink": "https://aka.ms/bfc-understanding-dialogs",
"label": "Begin a new dialog",
"order": [
"dialog",
"options",
"resultProperty",
"*"
],
"subtitle": "Begin Dialog"
}
},
"Microsoft.BeginSkill": {
"form": {
"helpLink": "https://aka.ms/bf-composer-docs-connect-skill",
"label": "Connect to a skill",
"subtitle": "Skill Dialog"
}
},
"Microsoft.BreakLoop": {
"form": {
"label": "Break out of loop",
"subtitle": "Break out of loop"
}
},
"Microsoft.CancelAllDialogs": {
"form": {
"helpLink": "https://aka.ms/bfc-understanding-dialogs",
"label": "Cancel all active dialogs",
"subtitle": "Cancel All Dialogs"
}
},
"Microsoft.ContinueLoop": {
"form": {
"label": "Continue loop",
"subtitle": "Continue loop"
}
},
"Microsoft.DebugBreak": {
"form": {
"label": "Debug Break"
}
},
"Microsoft.DeleteProperties": {
"form": {
"helpLink": "https://aka.ms/bfc-using-memory",
"label": "Delete properties",
"subtitle": "Delete Properties"
}
},
"Microsoft.DeleteProperty": {
"form": {
"helpLink": "https://aka.ms/bfc-using-memory",
"label": "Delete a property",
"subtitle": "Delete Property"
}
},
"Microsoft.EditActions": {
"form": {
"label": "Modify active dialog",
"subtitle": "Edit Actions"
}
},
"Microsoft.EditArray": {
"form": {
"helpLink": "https://aka.ms/bfc-using-memory",
"label": "Edit an array property",
"subtitle": "Edit Array"
}
},
"Microsoft.EmitEvent": {
"form": {
"helpLink": "https://aka.ms/bfc-custom-events",
"label": "Emit a custom event",
"subtitle": "Emit Event"
}
},
"Microsoft.EndDialog": {
"form": {
"helpLink": "https://aka.ms/bfc-understanding-dialogs",
"label": "End this dialog",
"subtitle": "End Dialog"
}
},
"Microsoft.EndTurn": {
"form": {
"helpLink": "https://aka.ms/bfc-understanding-dialogs",
"label": "End turn",
"subtitle": "End Turn"
}
},
"Microsoft.Foreach": {
"form": {
"helpLink": "https://aka.ms/bfc-controlling-conversation-flow",
"hidden": [
"actions"
],
"label": "Loop: For each item",
"order": [
"itemsProperty",
"*"
],
"subtitle": "For Each"
}
},
"Microsoft.ForeachPage": {
"form": {
"helpLink": "https://aka.ms/bfc-controlling-conversation-flow",
"hidden": [
"actions"
],
"label": "Loop: For each page (multiple items)",
"order": [
"itemsProperty",
"pageSize",
"*"
],
"subtitle": "For Each Page"
}
},
"Microsoft.HttpRequest": {
"form": {
"helpLink": "https://aka.ms/bfc-using-http",
"label": "Send an HTTP request",
"order": [
"method",
"url",
"body",
"headers",
"*"
],
"subtitle": "HTTP Request"
}
},
"Microsoft.IfCondition": {
"form": {
"helpLink": "https://aka.ms/bfc-controlling-conversation-flow",
"hidden": [
"actions",
"elseActions"
],
"label": "Branch: If/Else",
"subtitle": "If Condition"
}
},
"Microsoft.LogAction": {
"form": {
"helpLink": "https://aka.ms/bfc-debugging-bots",
"label": "Log to console",
"subtitle": "Log Action"
}
},
"Microsoft.RepeatDialog": {
"form": {
"helpLink": "https://aka.ms/bfc-understanding-dialogs",
"label": "Repeat this dialog",
"order": [
"options",
"*"
],
"subtitle": "Repeat Dialog"
}
},
"Microsoft.ReplaceDialog": {
"form": {
"helpLink": "https://aka.ms/bfc-understanding-dialogs",
"label": "Replace this dialog",
"order": [
"dialog",
"options",
"*"
],
"subtitle": "Replace Dialog"
}
},
"Microsoft.SendActivity": {
"form": {
"helpLink": "https://aka.ms/bfc-send-activity",
"label": "Send a response",
"order": [
"activity",
"*"
],
"subtitle": "Send Activity"
}
},
"Microsoft.SetProperties": {
"form": {
"helpLink": "https://aka.ms/bfc-using-memory",
"label": "Set properties",
"subtitle": "Set Properties"
}
},
"Microsoft.SetProperty": {
"form": {
"helpLink": "https://aka.ms/bfc-using-memory",
"label": "Set a property",
"subtitle": "Set Property"
}
},
"Microsoft.SignOutUser": {
"form": {
"label": "Sign out user",
"subtitle": "Signout User"
}
},
"Microsoft.SwitchCondition": {
"form": {
"helpLink": "https://aka.ms/bfc-controlling-conversation-flow",
"hidden": [
"default"
],
"label": "Branch: Switch (multiple options)",
"properties": {
"cases": {
"hidden": [
"actions"
]
}
},
"subtitle": "Switch Condition"
}
},
"Microsoft.TraceActivity": {
"form": {
"helpLink": "https://aka.ms/bfc-debugging-bots",
"label": "Emit a trace event",
"subtitle": "Trace Activity"
}
},
"Microsoft.AttachmentInput": {
"form": {
"helpLink": "https://aka.ms/bfc-ask-for-user-input",
"label": "Prompt for a file or an attachment",
"subtitle": "Attachment Input"
}
},
"Microsoft.ChoiceInput": {
"form": {
"helpLink": "https://aka.ms/bfc-ask-for-user-input",
"label": "Prompt with multi-choice",
"subtitle": "Choice Input"
}
},
"Microsoft.ConfirmInput": {
"form": {
"helpLink": "https://aka.ms/bfc-ask-for-user-input",
"label": "Prompt for confirmation",
"subtitle": "Confirm Input"
}
},
"Microsoft.DateTimeInput": {
"form": {
"helpLink": "https://aka.ms/bfc-ask-for-user-input",
"label": "Prompt for a date or a time",
"subtitle": "Date Time Input"
}
},
"Microsoft.NumberInput": {
"form": {
"helpLink": "https://aka.ms/bfc-ask-for-user-input",
"label": "Prompt for a number",
"subtitle": "Number Input"
}
},
"Microsoft.OAuthInput": {
"form": {
"helpLink": "https://aka.ms/bfc-using-oauth",
"label": "OAuth login",
"order": [
"connectionName",
"*"
],
"subtitle": "OAuth Input"
}
},
"Microsoft.TextInput": {
"form": {
"helpLink": "https://aka.ms/bfc-ask-for-user-input",
"label": "Prompt for text",
"subtitle": "Text Input"
}
},
"Microsoft.RegexRecognizer": {
"form": {
"hidden": [
"entities"
]
}
},
"Microsoft.OnActivity": {
"form": {
"hidden": [
"actions"
],
"label": "Activities",
"order": [
"condition",
"*"
],
"subtitle": "Activity received"
}
},
"Microsoft.OnBeginDialog": {
"form": {
"hidden": [
"actions"
],
"label": "Dialog started",
"order": [
"condition",
"*"
],
"subtitle": "Begin dialog event"
}
},
"Microsoft.OnCancelDialog": {
"form": {
"hidden": [
"actions"
],
"label": "Dialog cancelled",
"order": [
"condition",
"*"
],
"subtitle": "Cancel dialog event"
}
},
"Microsoft.OnCondition": {
"form": {
"hidden": [
"actions"
],
"label": "Handle a condition",
"order": [
"condition",
"*"
],
"subtitle": "Condition"
}
},
"Microsoft.OnConversationUpdateActivity": {
"form": {
"description": "Handle the events fired when a user begins a new conversation with the bot.",
"helpLink": "https://aka.ms/bf-composer-docs-conversation-update-activity",
"hidden": [
"actions"
],
"label": "Greeting",
"order": [
"condition",
"*"
],
"subtitle": "ConversationUpdate activity"
}
},
"Microsoft.OnDialogEvent": {
"form": {
"hidden": [
"actions"
],
"label": "Dialog events",
"order": [
"condition",
"*"
],
"subtitle": "Dialog event"
}
},
"Microsoft.OnEndOfConversationActivity": {
"form": {
"hidden": [
"actions"
],
"label": "Conversation ended",
"order": [
"condition",
"*"
],
"subtitle": "EndOfConversation activity"
}
},
"Microsoft.OnError": {
"form": {
"hidden": [
"actions"
],
"label": "Error occurred",
"order": [
"condition",
"*"
],
"subtitle": "Error event"
}
},
"Microsoft.OnEventActivity": {
"form": {
"hidden": [
"actions"
],
"label": "Event received",
"order": [
"condition",
"*"
],
"subtitle": "Event activity"
}
},
"Microsoft.OnHandoffActivity": {
"form": {
"hidden": [
"actions"
],
"label": "Handover to human",
"order": [
"condition",
"*"
],
"subtitle": "Handoff activity"
}
},
"Microsoft.OnIntent": {
"form": {
"hidden": [
"actions"
],
"label": "Intent recognized",
"order": [
"intent",
"condition",
"entities",
"*"
],
"subtitle": "Intent recognized"
}
},
"Microsoft.OnInvokeActivity": {
"form": {
"hidden": [
"actions"
],
"label": "Conversation invoked",
"order": [
"condition",
"*"
],
"subtitle": "Invoke activity"
}
},
"Microsoft.OnMessageActivity": {
"form": {
"hidden": [
"actions"
],
"label": "Message received",
"order": [
"condition",
"*"
],
"subtitle": "Message received activity"
}
},
"Microsoft.OnMessageDeleteActivity": {
"form": {
"hidden": [
"actions"
],
"label": "Message deleted",
"order": [
"condition",
"*"
],
"subtitle": "Message deleted activity"
}
},
"Microsoft.OnMessageReactionActivity": {
"form": {
"hidden": [
"actions"
],
"label": "Message reaction",
"order": [
"condition",
"*"
],
"subtitle": "Message reaction activity"
}
},
"Microsoft.OnMessageUpdateActivity": {
"form": {
"hidden": [
"actions"
],
"label": "Message updated",
"order": [
"condition",
"*"
],
"subtitle": "Message updated activity"
}
},
"Microsoft.OnRepromptDialog": {
"form": {
"hidden": [
"actions"
],
"label": "Re-prompt for input",
"order": [
"condition",
"*"
],
"subtitle": "Reprompt dialog event"
}
},
"Microsoft.OnTypingActivity": {
"form": {
"hidden": [
"actions"
],
"label": "User is typing",
"order": [
"condition",
"*"
],
"subtitle": "Typing activity"
}
},
"Microsoft.OnUnknownIntent": {
"form": {
"hidden": [
"actions"
],
"label": "Unknown intent",
"order": [
"condition",
"*"
],
"subtitle": "Unknown intent recognized"
}
}
}