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 an e2e test using Cypress that tests the authentication #2

Open
ahderman opened this issue May 3, 2020 · 0 comments
Open

Add an e2e test using Cypress that tests the authentication #2

ahderman opened this issue May 3, 2020 · 0 comments
Labels

Comments

@ahderman
Copy link
Owner

ahderman commented May 3, 2020

Note: Until we have an actual database for the authentication, we can use our currently hard-coded username and password for the test.

Context

The authentication flow currently consists of:

  1. trying to access any page in the frontend, for example the root of the application
  2. getting redirected to /login
  3. entering valid credentials
  4. being allowed on the home page
  5. pressing the logout button
  6. being sent back to the login page

Acceptance Criteria

We should have the following:

  • a Cypress test that runs as part of the e2e tests
  • the test should create a test user in the database if it doesn't exist yet, using the same hashing method as the normal authentication for generating the password hash stored in the DB
  • the test should assert that the steps described above work as expected
  • the test could optionally remove the created test user from DB
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant