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

[PORT] Return invalid state instead of throwing exceptions for non-string input of TextInput action #3277

Merged
merged 1 commit into from
Feb 7, 2021

Conversation

feich-ms
Copy link
Contributor

@feich-ms feich-ms commented Feb 7, 2021

Port microsoft/botbuilder-dotnet#4966

Description

In adaptive dialog, TextInput action only accept string values, but in some cases, non-string values such as objects will be passed into TextInput action, in such cases, it will throw exceptions instead of throw invalid prompt to users for a valid input. This is not friendly. In this fix, we added the validation of string format for all values and if it's value is not string, it will go into invalid state instead of throwing exceptions.

Specific Changes

  • textInput.ts

Testing

Test cases added

@coveralls
Copy link

coveralls commented Feb 7, 2021

Pull Request Test Coverage Report for Build 544423737

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.05%) to 84.679%

Totals Coverage Status
Change from base Build 540977548: 0.05%
Covered Lines: 18215
Relevant Lines: 20521

💛 - Coveralls

@feich-ms feich-ms requested a review from chon219 February 7, 2021 03:15
@chon219 chon219 merged commit 69b1e0d into main Feb 7, 2021
@chon219 chon219 deleted the feich/portDotnet#4966 branch February 7, 2021 03:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants