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

feat(frontend): write FieldVerificationService in TypeScript #1259

Merged
merged 17 commits into from
Mar 10, 2021

Conversation

karrui
Copy link
Contributor

@karrui karrui commented Mar 1, 2021

Problem

This PR migrates the old verification.client.factory Angularjs module to FieldVerificationService in TypeScript.

Solution

Features:

  • replace old verification.client.factory with FieldVerificationService

Tests

  • Add unit tests for FieldVerificationService. Note that all the tests are for the happy path as there is no error handling in the services as of yet (all errors are handled outside the service, due to legacy AngularJS code and not worth effort to refactor yet)

Manual tests

  • Create a form with no verified fields. The call to POST /transaction should return an empty object {}
  • Create a form with some verified fields. The call to POST /transaction should return an object with expiry and transaction id.
  • In a form with email verified fields, attempt to verify email. The OTP should be sent successfully to the email.
    • Provide an invalid OTP. Should show invalid OTP message below the OTP input field.
    • Correctly input OTP. Should successfully be verified.
  • In a form with mobile verified fields, attempt to verify mobile. The OTP should be sent successfully to the number.
    • Provide an invalid OTP. Should show invalid OTP message below the OTP input field.
    • Correctly input OTP. Should successfully be verified.
  • Should successfully submit form with verified fields as per normal

@karrui karrui requested a review from mantariksh March 3, 2021 08:25
@karrui karrui merged commit 72ad2d2 into develop Mar 10, 2021
@karrui karrui deleted the feat/fe-verifn-service-ts branch March 10, 2021 02:26
@tshuli tshuli mentioned this pull request Mar 10, 2021
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.

None yet

2 participants