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

Create component testing for UsernameInput component #1083

Closed
11 tasks done
MCatherine1994 opened this issue Dec 11, 2023 · 0 comments
Closed
11 tasks done

Create component testing for UsernameInput component #1083

MCatherine1994 opened this issue Dec 11, 2023 · 0 comments
Assignees

Comments

@MCatherine1994
Copy link
Collaborator

MCatherine1994 commented Dec 11, 2023

Describe the task
Since we separate the user name input form field into a new component in #1069, we can test it separately.

Acceptance Criteria

  • test the username input, set the input with a value and verify the input is expected
  • test the props, receive props correctly
  • test the emit function
    • "change", when input change, the emit function is called
    • "setVerifyResult", when username verified, the emit function is called
  • test enter in the input field will enable the verify button
  • test the verify button shows "loading" while waiting for api result
  • test the username verification
    • give a valid username, mock the api to return some user information (test the success case), check if user information card is displayed with expected information
    • give a not found username, mock the api to return not found response, check if user information card is displayed with expected "user does not exists" information
  • test when props.domain change, user information card will be removed, setVerifyResult will be called with different parameter

Additional context

  • Add any other context about the task here.
  • Or here
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

No branches or pull requests

3 participants