test(loans): behavioral E2E for the discussion #238 loan-form UX - #350
test(loans): behavioral E2E for the discussion #238 loan-form UX#350fabiodalez-dev wants to merge 1 commit into
Conversation
The loan-form UX shipped in v0.7.59 (from discussion #238 comments of 08-04 and 08-11) had only source-invariant coverage. Add browser behavioral tests: - "Me" button (#utente_me_btn) fills the logged-in admin as the borrower — DB-verified id. - A rejected submit re-renders the form with the entered values retained (session loan_form_old flash), asserting a custom date survives, not just the default. - "Salva e registra un'altra copia" (save_and_new) creates the loan, keeps the user + dates, and clears only the copy code for the next scan. - The "Prestito creato" success alert is removed on the first form edit (the input/change trigger), including the created=1 URL-flag cleanup. Self-contained fixtures (two tagged books + copies + a borrower), cleaned in before/afterAll. Green twice, deterministic (4 passed).
|
Warning Review limit reached
Next review available in: 49 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
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 |
The loan-form UX requested in discussion #238 (comments of 08-04 and 08-11) shipped in v0.7.59 but had only source-invariant test coverage. This adds the missing browser behavioral tests — no application code changes.
Four tests (
tests/discussion-238-loan-form-ux.spec.js,4 passed, deterministic across runs):#utente_me_btn) fills the logged-in admin as the borrower — asserts#utente_idgoes0→ the admin's realutenti.id(queried from the DB) and the name shows in the visible field.copy_not_found, DB confirms no loan row) re-renders the form via theloan_form_oldsession flash; a custom due date is retained, proving it's real retention, not the default re-applied.save_and_new) creates the loan (DB row pinned to the scanned copy), keeps the user + dates, and clears only the copy code for the next scan.input/changetrigger), including thecreated=1URL-flag cleanup.Self-contained fixtures (two tagged books + copies + a borrower), cleaned in before/afterAll.