79774296

Date: 2025-09-25 01:11:13
Score: 1
Natty:
Report link

Old thread but I was facing the same issue. Since my project is small and maintained by only me, this is the solution I found:

I created a run_e2e.js script that sets up a test sqlite database, a test API using that database, and a test react app using that API (so as to not collide ports).

Then I run Playwright against that react app. This allows me to set the DB records in such a way as to avoid collisions in tests; for example, in my seed file I create 3 users: the user with ID 1 is going to be fixed, the user with ID 2 is going to be used by the edit user test, and ID 3 used by the delete user test.

This allows me to test a clean state for everything but makes testing slow.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: luana schelb