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

Fix: shouldShowNumberKeyboard logic #611

Merged
merged 4 commits into from
Sep 17, 2024

Conversation

beatrizmaselli
Copy link
Contributor

@beatrizmaselli beatrizmaselli commented Sep 14, 2024

What is the purpose of this pull request?

Fix the behavior implemented here: #610

And add tests to guarantee that all the cases are covered so the function shouldShowNumberKeyboard:
✓ Should return true for mask rule undefined (1 ms)
✓ Should return true for mask rule null
✓ Should return true for mask rule empty string
✓ Should return true for mask rule numeric string without separators (1 ms)
✓ Should return true for mask rule numeric string with spaces
✓ Should return true for mask rule numeric string with dashes
✓ Should return false for mask rulee for string with letters
✓ Should return false for mask rulee for string with mixed letters and spaces
✓ Should return false for mask rulee for mixed numeric and letter string with dashes (1 ms)
✓ Should return false for mask rulee for NaN

What problem is this solving?

This validation is not correct implemented:
https://github.com/vtex/address-form/pull/610/files#diff-ba3efeb1ca67806eaaa1c0260a917dec21401eb72f01f9311243c42e73c57717R95

How should this be manually tested?

You can run yarn test and use this workspace for validation:
https://debug--dunnesstoresqa.myvtex.com/account#/addresses/new

image

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Requires change to documentation, which has been updated accordingly.

Copy link
Contributor

vtex-io-ci-cd bot commented Sep 14, 2024

Hi! I'm VTEX IO CI/CD Bot and I'll be helping you to publish your app! 🤖

Please select which version do you want to release:

  • Patch (backwards-compatible bug fixes)

  • Minor (backwards-compatible functionality)

  • Major (incompatible API changes)

And then you just need to merge your PR when you are ready! There is no need to create a release commit/tag.

  • No thanks, I would rather do it manually 😞

@beatrizmaselli beatrizmaselli requested a review from a team September 16, 2024 11:15
Copy link

@rbussola rbussola left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@jeffersontuc jeffersontuc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jeffersontuc jeffersontuc merged commit 422c0cb into 4.x Sep 17, 2024
7 checks passed
@jeffersontuc jeffersontuc deleted the fix/shouldShowNumberKeyboard-myAccount branch September 17, 2024 13:12
Copy link
Contributor

vtex-io-ci-cd bot commented Sep 17, 2024

Your PR has been merged! App is being published. 🚀
Version 4.25.0 → 4.25.1

After the publishing process has been completed (check #vtex-io-releases) and doing A/B tests with the new version, you can deploy your release by running:

vtex deploy [email protected]

After that your app will be updated on all accounts.

For more information on the deployment process check the docs. 📖

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.

3 participants