involveMINT / iMPublic

Public involveMINT repo
https://app.involvemint.io
7 stars 20 forks source link

Fix API E2E tests to test only the endpoint #296

Open QuinnNTonic opened 3 weeks ago

QuinnNTonic commented 3 weeks ago

Currently we are doing e2e tests by making multiple calls to the backend api. We are doing this for things like creating a user when testing the change maker endpoints. We also do it in enrollments. We use the project endpoint to create a project before testing the enrollment code. This is fine when all the code works, but we aren't truly testing an api end point in isolation since if the project creation endpoint is broken, it will cause the enrollment code to fail. I think we should seed data into the db as needed instead. We do this in some places but not all.