Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#6430] Adaptive ForEachElement does not exit when child action CancelAllDialogs is called #6452

Merged
merged 2 commits into from
Aug 29, 2022

Conversation

ceciliaavila
Copy link
Collaborator

Fixes #6430

Description

This PR fixes the issue in the ForEachElement action that wasn't exiting the loop after a call to the CancelAllDialogs action.
The fix also considers the nested ForEachElement loops scenario.

Specific Changes

  • Updated the ShouldEndDialog method of the ForEachElement class to consider also Cancelled status as well as Complete to end the dialogs.
  • Added a unit test in the ActionTests class to cover the nested ForEachElement's loops with a CancelAllDialogs call scenario.
  • Added the Action_Foreach_Nested_WithCancel.test.dialog test script.

Testing

These images show the issue fixed after the changes.
image

@ceciliaavila ceciliaavila added the Automation: No parity PR does not need to be applied to other languages. label Aug 25, 2022
@ceciliaavila ceciliaavila requested a review from a team as a code owner August 25, 2022 17:50
@coveralls
Copy link
Collaborator

Pull Request Test Coverage Report for Build 318702

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 4 unchanged lines in 3 files lost coverage.
  • Overall coverage decreased (-0.006%) to 79.052%

Files with Coverage Reduction New Missed Lines %
/libraries/AdaptiveExpressions/BuiltinFunctions/GetNextViableTime.cs 1 90.91%
/libraries/AdaptiveExpressions/BuiltinFunctions/GetPreviousViableTime.cs 1 90.91%
/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Actions/ForEachElement.cs 2 89.39%
Totals Coverage Status
Change from base Build 318566: -0.006%
Covered Lines: 25529
Relevant Lines: 32294

💛 - Coveralls

@tracyboehrer tracyboehrer merged commit c572be3 into main Aug 29, 2022
@tracyboehrer tracyboehrer deleted the southworks/fix/foreachelement-cancel-dialog branch August 29, 2022 20:01
tracyboehrer added a commit that referenced this pull request Sep 1, 2022
* README version to 4.18 (#6425)

Co-authored-by: Tracy Boehrer <[email protected]>

* [#6434] Priority broken for RegexRecognizer (#6435)

* Consider priority in OnRecognizeAsync method

* Add unit test

* Update Bool function to use Convert.ToBoolean (#6431)

* Update IsMatch empty string values (#6426)

* [#6428] Adaptive ForEachElement loop's incorrectly when changes cause ContinueDialogAsync to be recalled (#6448)

* Reacquire childDialogState after ContinueDialogAsync

* Add unit test

* Support passing sas token url's for token service (#6449)

Co-authored-by: Swagat Mishra <[email protected]>

* Bump @actions/core from 1.6.0 to 1.9.1 in /actions/verify-pr-labels (#6445)

Bumps [@actions/core](https://github.com/actions/toolkit/tree/HEAD/packages/core) from 1.6.0 to 1.9.1.
- [Release notes](https://github.com/actions/toolkit/releases)
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/core/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/core)

---
updated-dependencies:
- dependency-name: "@actions/core"
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Support passing sas token url's for token service (#6449)

Co-authored-by: Swagat Mishra <[email protected]>

* [#6428] Adaptive ForEachElement loop's incorrectly when changes cause ContinueDialogAsync to be recalled (#6448)

* Reacquire childDialogState after ContinueDialogAsync

* Add unit test

* Delete vnext code which is dead (#6440)

* Fix PublishToCoveralls.ps1 (#6439)

* Remove failing Powershell patch download

* Upgrade coveralls.net to 4.0.1

* [#6430] Adaptive ForEachElement does not exit when child action CancelAllDialogs is called (#6452)

* Consider canceled status to end the dialog

* Add unit test

* [#6432] TeamsInfo.GetMemberAsync(...) doesn't work properly in Skill Bot scenario, it returns http 405 error (#6443)

* Implement GetMemberAsync for skills

* Add unit test

* [#6433] Error in AdaptiveDialog.ContinueActionAsync with native dialog SDK (#6444)

* Add condition before loading the resource

* Add unit tests

* Load AdaptiveDialogs dynamically on DialogContext

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Tracy Boehrer <[email protected]>
Co-authored-by: Cecilia Avila <[email protected]>
Co-authored-by: Joel Mut <[email protected]>
Co-authored-by: swagat mishra <[email protected]>
Co-authored-by: Swagat Mishra <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: BruceHaley <[email protected]>
tracyboehrer pushed a commit that referenced this pull request Sep 7, 2022
…on CancelAllDialogs is called (#6452)"

This reverts commit c572be3.
tracyboehrer pushed a commit that referenced this pull request Sep 7, 2022
…on CancelAllDialogs is called (#6452)"

This reverts commit c572be3.
tracyboehrer added a commit that referenced this pull request Sep 7, 2022
…on CancelAllDialogs is called (#6452)" (#6466)

This reverts commit c572be3.

Co-authored-by: Tracy Boehrer <[email protected]>
tracyboehrer added a commit that referenced this pull request Sep 7, 2022
…on CancelAllDialogs is called (#6452)" (#6466)

This reverts commit c572be3.

Co-authored-by: Tracy Boehrer <[email protected]>
tracyboehrer added a commit that referenced this pull request Sep 7, 2022
* Revert "[#6430] Adaptive ForEachElement does not exit when child action CancelAllDialogs is called (#6452)" (#6466)

This reverts commit c572be3.

Co-authored-by: Tracy Boehrer <[email protected]>

* Add cancellation token to TeamsOperation class (#6458)

* Fix typing indicator shown after bot has replied (#6460)

Co-authored-by: Tracy Boehrer <[email protected]>
Co-authored-by: Joel Mut <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Automation: No parity PR does not need to be applied to other languages.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adaptive ForEachElement does not exit when child action CancelAllDialogs is called
3 participants