2 out of 4 of our Cypress tests were failing due to not being able to find the users in the database.
Implementation
Upon research I realized these tests did not need to be rewritten and instead it was a problem with seeding our db. I discovered that running 'python seed.py' does not seed our development database like I thought. Instead I found the file tasks.py in the backend directory that contains commands to seed, upgrade, drop, create, etc our dev db.
Steps I took to fix the tests:
navigated to backend directory
ran python tasks.py db:dev:seed
updated the password fields in the feature files to reflect the seeded passwords
Testing
seed the dev database using the command above from tasks.py
run psql -U postgres
run select * from users; to verify seeded users are in the users table
navigate to frontend directory and run npm run test:e2e to verify all tests pass (takes ~10 mins to run)
Problems Faced
I could not figure out how to seed the dev database, but the commands in tasks.py solved this issue. I will be posting those in our quickstart wiki page.
Notes
See the quickstart wiki page for more info on tasks.py. Since no tests needed to be re-written this was really a 1 point issue instead of 3.
Overview
2 out of 4 of our Cypress tests were failing due to not being able to find the users in the database.
Implementation
Upon research I realized these tests did not need to be rewritten and instead it was a problem with seeding our db. I discovered that running 'python seed.py' does not seed our development database like I thought. Instead I found the file tasks.py in the backend directory that contains commands to seed, upgrade, drop, create, etc our dev db. Steps I took to fix the tests:
python tasks.py db:dev:seed
Testing
psql -U postgres
select * from users;
to verify seeded users are in the users tablenpm run test:e2e
to verify all tests pass (takes ~10 mins to run)Problems Faced
I could not figure out how to seed the dev database, but the commands in tasks.py solved this issue. I will be posting those in our quickstart wiki page.
Notes
See the quickstart wiki page for more info on tasks.py. Since no tests needed to be re-written this was really a 1 point issue instead of 3.