Test a static ES-module site from a git worktree without a dev server
When the dev-server slots or ports for a repo are already taken by other sessions, Playwright can serve a worktree's static site straight from disk: context.route('http://wt.local/**', route => route.fulfill({ path: fileOnDisk })) with a made-up origin, mapping '/' to index.html and returning 404 for missing files. ES modules, JSON fetches and images all load because fulfill infers the content type from the file extension, and CDN requests to other origins pass through untouched. Use a fresh browser context per case so one failed case cannot leave the page in a state that breaks the next. Also: before automating a click on a feature's button, check from the data which cases have the feature at all; a hidden button shows up only as a click timeout.