-
Notifications
You must be signed in to change notification settings - Fork 486
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure EndDialog action within a ForEachElement will end the dialog (#…
…6160) (#6164) * Ensure EndDialog action within a ForEachElement will end the dialog * EndDialog from a nested ForEach * Add clarifying comments to ForEachElement
- Loading branch information
1 parent
5fd508f
commit 5581313
Showing
4 changed files
with
151 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
117 changes: 117 additions & 0 deletions
117
...der.Dialogs.Adaptive.Tests/Tests/AdaptiveDialogTests/TestForeachWithEndDialog.test.dialog
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
{ | ||
"$schema": "../../../tests.schema", | ||
"$kind": "Microsoft.Test.Script", | ||
"dialog": { | ||
"$kind": "Microsoft.AdaptiveDialog", | ||
"id": "AdaptiveDialog", | ||
"generator": { | ||
"$kind": "Microsoft.TemplateEngineLanguageGenerator" | ||
}, | ||
"triggers": [ | ||
{ | ||
"$kind": "Microsoft.OnBeginDialog", | ||
"actions": [ | ||
{ | ||
"$kind": "Microsoft.SetProperty", | ||
"property": "$loopTwoThenEnd", | ||
"value": "=createArray('one', 'two', 'end')" | ||
}, | ||
{ | ||
"$kind": "Microsoft.SetProperty", | ||
"property": "$loopTwo", | ||
"value": "=createArray('1', '2')" | ||
}, | ||
{ | ||
"$kind": "Microsoft.SetProperty", | ||
"property": "$loopTwoAgain", | ||
"value": "=createArray('a', 'b')" | ||
}, | ||
{ | ||
"$kind": "Microsoft.Foreach", | ||
"itemsProperty": "$loopTwo", | ||
"value": "dialog.foreach0.value", | ||
"index": "dialog.foreach0.index", | ||
"actions": [ | ||
{ | ||
"$kind": "Microsoft.Foreach", | ||
"itemsProperty": "$loopTwoAgain", | ||
"value": "dialog.foreach1.value", | ||
"index": "dialog.foreach1.index", | ||
"actions": [ | ||
{ | ||
"$kind": "Microsoft.Foreach", | ||
"value": "dialog.foreach2.value", | ||
"index": "dialog.foreach2.index", | ||
"itemsProperty": "$loopTwoThenEnd", | ||
"actions": [ | ||
{ | ||
"$kind": "Microsoft.IfCondition", | ||
"condition": "($foreach2.value == 'end')", | ||
"actions": [ | ||
{ | ||
"$kind": "Microsoft.EndDialog" | ||
} | ||
] | ||
}, | ||
{ | ||
"$kind": "Microsoft.SendActivity", | ||
"activity": "${$foreach2.value}" | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
{ | ||
"$kind": "Microsoft.SendActivity", | ||
"activity": "This should never happen2" | ||
} | ||
] | ||
}, | ||
{ | ||
"$kind": "Microsoft.SendActivity", | ||
"activity": "This should never happen" | ||
} | ||
] | ||
} | ||
], | ||
"autoEndDialog": true, | ||
"defaultResultProperty": "dialog.result" | ||
}, | ||
"script": [ | ||
{ | ||
"$kind": "Microsoft.Test.UserConversationUpdate" | ||
}, | ||
{ | ||
"$kind": "Microsoft.Test.AssertReply", | ||
"text": "one" | ||
}, | ||
{ | ||
"$kind": "Microsoft.Test.AssertReply", | ||
"text": "two" | ||
}, | ||
{ | ||
"$kind": "Microsoft.Test.UserSays", | ||
"text": "hi" | ||
}, | ||
{ | ||
"$kind": "Microsoft.Test.AssertReply", | ||
"text": "one" | ||
}, | ||
{ | ||
"$kind": "Microsoft.Test.AssertReply", | ||
"text": "two" | ||
}, | ||
{ | ||
"$kind": "Microsoft.Test.UserSays", | ||
"text": "hi" | ||
}, | ||
{ | ||
"$kind": "Microsoft.Test.AssertReply", | ||
"text": "one" | ||
}, | ||
{ | ||
"$kind": "Microsoft.Test.AssertReply", | ||
"text": "two" | ||
} | ||
] | ||
} |