Add guest limit test cases and fix enforcement gaps#7
Conversation
- Created testcase.md with comprehensive test scenarios. - Added max="16" attribute to maxGuests input in BecomeHost.tsx. - Improved backend error handling in listingController.ts to return 400 for validation errors. Co-authored-by: sudiptap-cpu <250333639+sudiptap-cpu@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
GitHub Pages Preview
This preview updates automatically on each push. |
I have created a
testcase.mdfile that documents comprehensive test cases for the maximum 16 guests limit across both frontend and backend.Additionally, I identified and fixed a few gaps in the existing enforcement:
max="16"to themaxGuestsinput field in theBecomeHostpage to provide native browser-level validation.listingController.tsto properly catch and return a400 Bad Requestwhen Mongoose validation fails (e.g., when a listing is created or updated with more than 16 guests).I verified the changes using Playwright, confirming that the Search Bar guest picker correctly disables increment buttons at 16 guests and taking a screenshot for visual confirmation.
PR created automatically by Jules for task 3159006919125941936 started by @sudiptap-cpu