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

[Android] Add tests for validators #4556

Merged
merged 24 commits into from
Aug 27, 2020

Conversation

almedina-ms
Copy link
Contributor

@almedina-ms almedina-ms commented Aug 7, 2020

Related Issue

Fixes #4554

Description

Adds unit tests for all validation types in android.

Fixes in other places:

  • Fixes SetInput for time input
  • Fixes Text length validation to be performed by validators
  • Fixes empty number, date and time values to not be validated if the value is empty
  • Fixes empty non required input text validating as false if the regex conflicted with it
  • Fixes empty date value being converted to actual date
  • Fixes empty time value being converted to actual time
  • Fixes behaviour for empty input number to differentiate between empty value (valid if not required) and a not numerical value (always invalid)
  • Fixes combobox input handler to return default empty value if the value trying to be set does not exist

How Verified

This includes a lot of unit tests so it verifies itself

Microsoft Reviewers: Open in CodeFlow

@shalinijoshi19
Copy link
Member

If this PR has fixes for other issues, can you please reference those in the description here for proper correlation? Thanks

@shalinijoshi19
Copy link
Member

Related Issue

Fixes #4554

Description

Adds unit tests for all validation types in android.

Fixes in other places:

  • Fixes SetInput for time input
  • Fixes Text length validation to be performed by validators
  • Fixes empty number, date and time values to not be validated if the value is empty

How Verified

This includes a lot of unit tests so it verifies itself

Microsoft Reviewers: Open in CodeFlow

Ideally try to avoid bundling in different unrelated commits in a single one. And if you do, pls do make sure the PR title/description reflects that :) Eg this looks to be many more fixes and not just new unit tests that have been added. Do ensure the PR title reflects this.

@almedina-ms almedina-ms added this to the 20.08 milestone Aug 24, 2020
@almedina-ms almedina-ms merged commit 4031cec into main Aug 27, 2020
@almedina-ms almedina-ms deleted the user/almedina-ms/IE_AndroidValidationTesting branch August 27, 2020 01:51
rankush pushed a commit to rankush/AdaptiveCards that referenced this pull request May 8, 2024
* Add validation testing for number and text input

* Add tests for all input handlers

* Update input handlers to fix invalid inputs

* Update test files

* Update invaluid values for tests

* Update invalid cases

* Refactor date input tests

* Refactor number validation tests

* Refactor TimeInput validation tests

* Refactor toggle input tests

* Refactor choiceSet tests

* Fix small stuff

* Cleanup some unnnecesary imports

* Refactor input text tests

* Fix comments

Co-authored-by: shalinijoshi19 <shalinij@microsoft.com>
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.

[Android][Testing] Add testing for input validation
2 participants