Steps to replicate the issue :
- Edit a wish through the "Edit with Form"
- Enter spaces only in the title field
- Submit the form.
What happens?:
- The system successfully submits the form and the title is now blank.
What should have happened instead?:
- The system should show an error message in the title field. The form should not submit.
Derived Requirement
Ensure that users cannot submit a wish form with only spaces in the title field. If the title field contains only whitespace, the system must:
- Prevent form submission
- Display an inline error message on the title field
Test Steps
Test Case 1: Prevent submission with only spaces in wish title
- Navigate to Special:WishlistIntake and create or edit a wish using "Edit with Form".
- In the title field, enter only spaces (e.g., " ").
- Submit the form.
- ✅❓❌⬜ AC1: Confirm that the form does not submit when the title contains only spaces.
- ✅❓❌⬜ AC2: Confirm that an error message is displayed inline on the title field.
Test Case 2: Ensure valid title submits successfully
- Navigate to the same form.
- Enter a valid non-whitespace title (e.g., "Improved translation tool").
- Submit the form.
- ✅❓❌⬜ AC3: Confirm that the form submits successfully and the wish is created/updated.
Test Case 3: Ensure trimming works with spaces and valid characters
- Enter a title with leading and trailing spaces (e.g., " Better search ").
- Submit the form.
- ✅❓❌⬜ AC4: Confirm that the form trims the spaces and saves the title as "Better search".
QA Results - Meta Beta
| AC | Status | Details |
|---|---|---|
| 1 | ✅ | T403682#11168111 |
| 2 | ✅ | pass per T403682#11169643 |
| 3 | ✅ | T403682#11168111 |
| 4 | ✅ | T403682#11168111 |
