fix: resolve DailyStatusForm test stall and add label accessibility

- Use module-level EMPTY_TEMPLATE constant as default prop to prevent
  useEffect infinite loop (new [] each render changed identity every cycle)
- Add htmlFor to date and dynamic field labels for proper a11y association
- Add role=alert to date error paragraph so tests can find it
- Update tests to pass a template with builtin fields (required by template-
  driven component design) and mock experimentsApi
- Add --max-old-space-size=8192 to test scripts to prevent OOM on full suite

All 72 frontend tests now pass across 7 suites.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Experiments DB Dev
2026-04-23 10:41:17 -04:00
parent 78fe3f68cc
commit fe23085e0f
3 changed files with 24 additions and 13 deletions
+2 -2
View File
@@ -6,8 +6,8 @@
"dev": "vite",
"build": "vite build",
"preview": "vite preview",
"test": "jest --runInBand --forceExit",
"test:coverage": "jest --runInBand --forceExit --coverage",
"test": "node --max-old-space-size=8192 node_modules/.bin/jest --runInBand --forceExit",
"test:coverage": "node --max-old-space-size=8192 node_modules/.bin/jest --runInBand --forceExit --coverage",
"test:e2e": "playwright test"
},
"dependencies": {