Move Playwright test isolation into Playwright#497
Merged
Conversation
Start one dev server per Playwright worker and restart it with a fresh SQLite database for each test so e2e isolation no longer depends on app-level per-session DB routing.
Use the server's store and authenticator fields directly now that request-scoped database selection is gone, and delete the dead getDB/getAuthenticator helpers.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previously, we had a mechanism in the debug built of the app to load per-request databases. This pulls this behavior out of the app and makes test isolation Playwright's job instead.
When we got to #481, there was just too much complexity to the per-request DB and it was making request handling for auth too complicated. It's simpler if we don't have to bend the app to satisfy the test isolation goal.
This implementation starts one dev server per Playwright worker and restarts it with a fresh SQLite database for each test so e2e isolation no longer depends on app-level per-session DB routing.