Closed ojeytonwilliams closed 10 months ago
Sorry for the notification spam (last one...). It took me a while to understand how to test the effect of signing in with a new user (basically follow the playwright docs) but I'm finally happy with this.
I might have missed something, but the tests seem to be failing locally for me.
@Sembauke it looks like your db is missing the invited user. As we discussed in chat, a reset-db script would be helpful to resolve cases like this. Then you could run that script, then seed again and it should be resolved.
Regardless, dropping the db and seeding again should resolve this.
Also, I get the same error as Sem even with seeding against a fresh DB. I'm not 100% sure but it seems the test run in parallel making the tests related to invited status fail. https://playwright.dev/docs/test-parallel
If I set --workers=1
those tests passed. But after all, I couldn't get rid of a timeout error (could be because of my machine)
Checklist:
Update index.md
)As well as testing the first sign in, I wanted to provide an example of the kinds of tests I think we should be writing.
The basic idea is that each suite should follow the form
This gives us a couple of nice benefits. Avoiding the relatively expensive seeding step means the tests should be faster. In principle these tests can be run against any version of the site that accepts the api calls. i.e. they could run against a deployed test site.