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

Add E2E test for login #306

Closed
4 tasks done
fyliu opened this issue Mar 21, 2020 · 3 comments
Closed
4 tasks done

Add E2E test for login #306

fyliu opened this issue Mar 21, 2020 · 3 comments
Assignees
Labels
dev: tests enhancement Release Note: Shows as visual or user experience Enhancement level: missing priority: missing role: missing

Comments

@fyliu
Copy link
Member

fyliu commented Mar 21, 2020

Integration/E2E test:

  • Write cypress test -- visit app, login, validate that you can see your name [Louis]
  • Add cypress helper to auto login as different types of users (regular, admin, security admin) [Claire]
  • valid login (Cypress automatically adds cookies in the browser) [Claire]
  • invalid login with wrong password [Claire]

does not include unit tests anymore

@fyliu fyliu added enhancement Release Note: Shows as visual or user experience Enhancement dev: tests labels Mar 21, 2020
@fyliu fyliu self-assigned this Mar 21, 2020
@fyliu fyliu added this to the 0.3.0 milestone Mar 28, 2020
@fyliu
Copy link
Member Author

fyliu commented Apr 4, 2020

I had trouble mocking async code and tried jest/enzyme and react testing library. React testing library seems to do the trick. I still need to add the actual tests. This should be done by Wednesday if no other issues come up.

@nclairesays
Copy link
Member

nclairesays commented Apr 4, 2020

Cypress tests in progress. Adding edge cases for what happens during failed login attempts. Learning and figuring out the right architecture to writing these tests. Eta hopefully Wednesday also.

@fyliu you can try mocking out async calls using the nock library or using the act block in react testing library

@nclairesays nclairesays changed the title Add test for login Add E2E test for login Apr 30, 2020
@fyliu fyliu assigned fyliu and unassigned fyliu May 2, 2020
@fyliu
Copy link
Member Author

fyliu commented May 4, 2020

I checked that this works and the code looks good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dev: tests enhancement Release Note: Shows as visual or user experience Enhancement level: missing priority: missing role: missing
Projects
Archived in project
Development

No branches or pull requests

5 participants