# End-to-end Real browsers and a real Postgres, against a stack that is created and thrown away. Nothing here touches the running site. ```bash cd e2e npm install npx playwright install --with-deps chromium webkit npm run stack:up # build the stack, apply the schema, seed it npm test # every project npm run test:phone # just the iPhone and Pixel projects npm run stack:down # and take the data with it ``` ## Why there are five projects | Project | What it is for | |---|---| | `desktop` | 1440×900 Chrome. The layout most of the work is done in. | | `iphone` | iPhone 13, WebKit. Where an SVG with no intrinsic size renders as nothing, and where a sub-16px input zooms the page and never zooms back. | | `android` | Pixel 7, Chrome. The other half of "mobile". | | `tablet` | iPad Mini landscape — the width where the reading rail turns into a drawer. | | `api` | No browser. The contract over HTTP: addresses, error shapes, who may see an answer, refresh-token rotation. | Every bug this suite was written after was a phone bug reported as a screenshot. A desktop-only suite would have passed through all of them. ## Fixtures `seed.py` builds the smallest world the tests name: two accounts (an educator and a learner), three questions, one session, two articles with a cross-reference between them, and a shared deck. Re-running it is safe. Accounts are `educator@e2e.example.com` and `learner@e2e.example.com`; the passwords are in `tests/helpers.js`, which is fine, because that database exists for about four minutes.