test(e2e): schedule editor flows for fixed-time, interval, PRN, days-of-week#85
Conversation
…of-week Adds Playwright coverage for the three schedule-kind editor flows that the existing suite leaves untested: fixed-time, interval, and PRN creation, plus the day-of-week restriction edit. Each test asserts the persisted medication_schedules row directly against the DB (kind, timeOfDay, intervalHours, daysOfWeek) and cleans up via a cascade delete in finally so reruns stay deterministic. Extends tests/e2e/helpers/db.ts with getMedicationIdByName, getSchedulesForMedication, and deleteMedicationCascade. Wires the new file into the authed project's testMatch regex. Full E2E run deferred to CI (no DB configured locally).
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
tests/e2e/schedule-editor.test.tswith four Playwright tests undertest.describe("schedule editor"):08:00, no day restriction)daysOfWeek = [1,3,5])medication_schedulesrow directly (scheduleKind,timeOfDay,intervalHours,daysOfWeek) and cleans up infinallyvia a cascade delete so reruns stay deterministic.tests/e2e/helpers/db.tswithgetMedicationIdByName,getSchedulesForMedication, anddeleteMedicationCascade— keeps the dynamic-import-of-db trick already used bydose-logging.test.ts.authedproject'stestMatchregex inplaywright.config.ts.Why
The existing E2E suite covers auth, smoke, medication lifecycle, dose-logging, analytics, accessibility, and exports — but does NOT exercise the three schedule-kind editor flows end-to-end against the
medication_schedulestable. This closes that gap.Test plan
npm test— Vitest passes (363 tests).npm run check— 0 errors (pre-existing warnings unchanged).DATABASE_URL=<placeholder> npm run build— passes.npx playwright test --list tests/e2e/schedule-editor.test.ts— 4 tests discovered under the[authed]project.