-
Notifications
You must be signed in to change notification settings - Fork 487
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#6430] Adaptive ForEachElement does not exit when child action Cance…
…lAllDialogs is called (#6452) * Consider canceled status to end the dialog * Add unit test
- Loading branch information
1 parent
c58e322
commit c572be3
Showing
3 changed files
with
76 additions
and
2 deletions.
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
67 changes: 67 additions & 0 deletions
67
...der.Dialogs.Adaptive.Tests/Tests/ActionTests/Action_Foreach_Nested_WithCancel.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,67 @@ | ||
{ | ||
"$schema": "../../../tests.schema", | ||
"$kind": "Microsoft.Test.Script", | ||
"dialog": { | ||
"$kind": "Microsoft.AdaptiveDialog", | ||
"id": "root", | ||
"triggers": [ | ||
{ | ||
"$kind": "Microsoft.OnBeginDialog", | ||
"actions": [ | ||
{ | ||
"$kind": "Microsoft.SetProperty", | ||
"property": "dialog.todo", | ||
"value": "=['1', '2', '3']" | ||
}, | ||
{ | ||
"$kind": "Microsoft.Foreach", | ||
"itemsProperty": "dialog.todo", | ||
"actions": [ | ||
{ | ||
"$kind": "Microsoft.SendActivity", | ||
"activity": "I'm the Parent loop - index is: ${dialog.foreach.index}" | ||
}, | ||
{ | ||
"$kind": "Microsoft.Foreach", | ||
"itemsProperty": "dialog.todo", | ||
"actions": [ | ||
{ | ||
"$kind": "Microsoft.SendActivity", | ||
"activity": "I'm the child loop and I will cancel all dialogs" | ||
}, | ||
{ | ||
"$kind": "Microsoft.CancelAllDialogs" | ||
}, | ||
{ | ||
"$kind": "Microsoft.SendActivity", | ||
"activity": "This shouldn't be sent" | ||
} | ||
] | ||
}, | ||
{ | ||
"$kind": "Microsoft.SendActivity", | ||
"activity": "This shouldn't be sent either" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
], | ||
"autoEndDialog": true, | ||
"defaultResultProperty": "dialog.result" | ||
}, | ||
"script": [ | ||
{ | ||
"$kind": "Microsoft.Test.UserSays", | ||
"text": "hi" | ||
}, | ||
{ | ||
"$kind": "Microsoft.Test.AssertReply", | ||
"text": "I'm the Parent loop - index is: 0" | ||
}, | ||
{ | ||
"$kind": "Microsoft.Test.AssertReply", | ||
"text": "I'm the child loop and I will cancel all dialogs" | ||
} | ||
] | ||
} |