Stop the test runner tripping the rate limiter, and level the rows
The end-to-end suite had never been run. Its first run failed six ways, all of them the page sitting on the login screen: every browser page load re-obtains an access token, the refresh endpoint allows thirty a minute per address, and a twenty-test run makes about fifty of them from one address. Half came back 429, and a failed refresh is indistinguishable from being logged out. Raising the ceiling would only move it and make a green suite depend on how fast the machine is, so the limiter is switched off for the test backend alone — it measures a client, and the runner is not one. It stays on everywhere else. With that gone, one real failure was left, and it belonged to the commit that claimed to have fixed it: cell widths were held, but a week whose cell carries a holiday name still stood taller than its neighbours, because each week is its own grid and none can see another's height. The weeks now share one grid whose rows are all a single fraction, so the tallest sets the rest and no cell can grow its own row. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ei7gCZzdd751uZtPzb1Pep
This commit is contained in:
@@ -39,6 +39,19 @@ export default defineConfig({
|
||||
command: 'uv run uvicorn app.main:app --port 8000',
|
||||
cwd: path.resolve(__dirname, '../backend'),
|
||||
url: BACKEND_HEALTH_URL,
|
||||
// The backend rate-limits per remote IP (slowapi's
|
||||
// `get_remote_address`), which assumes one IP is one client. This
|
||||
// suite breaks that assumption: every page load in the whole run
|
||||
// comes from 127.0.0.1. `POST /api/auth/refresh` fires once per page
|
||||
// load (AuthProvider re-obtains the access token on mount, see
|
||||
// AuthContext.tsx) and is capped at 30/minute, so a ~20-test run's
|
||||
// ~50 refreshes start returning 429 partway through — and a failed
|
||||
// refresh renders the login screen, which is why unrelated specs
|
||||
// failed on `getByTestId('dashboard')`/`('calendar')` not being
|
||||
// found. Raising the cap would only move the cliff and make green-ness
|
||||
// a function of machine speed; the limiter simply does not apply to a
|
||||
// single-IP test runner, so it is switched off here.
|
||||
env: { APP_RATE_LIMIT_ENABLED: 'false' },
|
||||
reuseExistingServer: !process.env.CI,
|
||||
timeout: 60_000,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user