Page MenuHomePhabricator

Community Wishlist edit form shouldn't fail if a wish title is too long
Closed, ResolvedPublicBUG REPORT

Assigned To
Authored By
Pppery
Sep 8 2024, 2:42 PM
Referenced Files
F57534679: 2024-09-24_11-31-33.mp4.gif
Sep 24 2024, 6:33 PM
F57534665: 2024-09-24_11-25-19.mp4.gif
Sep 24 2024, 6:30 PM
F57534662: 2024-09-24_11-23-37.mp4.gif
Sep 24 2024, 6:30 PM
F57534652: 2024-09-24_11-17-41.mp4.gif
Sep 24 2024, 6:30 PM
F57532674: 2024-09-23_13-50-44.mp4.gif
Sep 23 2024, 8:56 PM
F57532671: 2024-09-23_13-48-48.mp4.gif
Sep 23 2024, 8:56 PM

Description

Steps to replicate the issue (include links if applicable):

What happens?:

It fails with "Please enter a value for this field (between 5 and 100 characters)." in the Wish title field.

What should have happened instead?:

It should work. If you want to enforce a max length for the title then only enforce it if the title is actually changed.

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):

Other information (browser name/version, screenshots, etc.):

Derived Requirement

Ensure that the "Wish title" field validation in the form only enforces the character limit (5-100 characters) if the title is actually changed during the edit process.

BDD

Feature: Form validation for Wish title field on Meta-Wiki

Scenario: Ensure Wish title validation is only enforced when the title is changed

Given the user is editing a wish using the "edit with form" option
When the user saves the form without making changes to the Wish title
Then the form should save successfully without any validation error
Test Steps

Test Case 1: Ensure the Wish title field validation only triggers when the title is changed

Go to the Community Wishlist page.
Click "Edit with form."
Save the form without making any changes to the Wish title field.
✅❓❌⬜ AC1: Confirm that the form saves successfully without triggering the error "Please enter a value for this field (between 5 and 100 characters)."

Test Case 2: Ensure validation is enforced when the Wish title is changed

Go to the Community Wishlist page.
Click "Edit with form."
Modify the Wish title to a string less than 5 characters or more than 100 characters.
Save the form.
✅❓❌⬜ AC2: Confirm that the form displays an error message indicating the Wish title must be between 5 and 100 characters.

QA Results - Meta.wiki

ACStatusDetails
1T374321#10172630
2T374321#10172630

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

@Samwilson Can you please review my gifs below? Am I doing this correctly? I don't have any option to just save when I click "Edit with form". It seems like it's missing a form.

Status: ❓NMI
Environment: Meta.wiki
OS: macOS Sonoma 14.6.1
Browser: Chrome 128
Device: MBA
Emulated Device: NA

Test Artifact(s):

https://meta.wikimedia.org/w/index.php?title=Community_Wishlist/Wishes/Show_links_in_inclusions_as_sublists_in_WhatLinksHere,_just_like_links_to_redirects

Test Steps

Test Case 1: Ensure the Wish title field validation only triggers when the title is changed

  1. Go to the Community Wishlist page.
  2. Click "Edit with form."
  3. Save the form without making any changes to the Wish title field.
  4. ❓ AC1: Confirm that the form saves successfully without triggering the error "Please enter a value for this field (between 5 and 100 characters)."

2024-09-23_13-48-48.mp4.gif (782×990 px, 892 KB)

Test Case 2: Ensure validation is enforced when the Wish title is changed

  1. Go to the Community Wishlist page.
  2. Click "Edit with form."
  3. Modify the Wish title to a string less than 5 characters or more than 100 characters.
  4. Save the form.
  5. ❓ AC2: Confirm that the form displays an error message indicating the Wish title must be between 5 and 100 characters.

2024-09-23_13-50-44.mp4.gif (786×992 px, 1 MB)

2024-09-23_13-48-48.mp4.gif (782×990 px, 892 KB)

It looks like editing an existing wish is broken in Chrome! It works fine in Firefox.

Both browsers however do report Parsing failed in the JS console. So we appear to have an unrelated bug.

One of the errors is

Uncaught (in promise) TypeError: mw.msg(...).plain is not a function
at Proxy.data (ext.gadget.WishlistIntake-packageFile-WishlistIntake.js.js:130:57)

Which I'm fixing now (it only affects staff users).

I've got a fix in place for that bug (and have deployed it to Meta to get things moving again).

@GMikesell-WMF can you try again? It should work for your staff and non-staff accounts this time! Sorry about that.

@MusikAnimal It looks like the parsing issue is a difference in trailing spaces with the area and otherproject params (or all params, probably), e.g. this fixes it: https://meta.wikimedia.org/wiki/Special:Diff/27505082

@Samwilson Ok, this is working as designed as seen in the gifs below. Thanks for all your work. I will move this to Done.

Status: ✅ PASS
Environment: Meta.wiki
OS: macOS Sonoma 14.6.1
Browser: Chrome 128
Device: MBA
Emulated Device: NA

Test Artifact(s):

https://meta.wikimedia.org/w/index.php?title=Community_Wishlist/Wishes/Show_links_in_inclusions_as_sublists_in_WhatLinksHere,_just_like_links_to_redirects

Test Steps

Test Case 1: Ensure the Wish title field validation only triggers when the title is changed

  1. Go to the Community Wishlist page.
  2. Click "Edit with form."
  3. Save the form without making any changes to the Wish title field.
  4. ✅ AC1: Confirm that the form saves successfully without triggering the error "Please enter a value for this field (between 5 and 100 characters)."
No changes
2024-09-24_11-17-41.mp4.gif (796×996 px, 3 MB)

Test Case 2: Ensure validation is enforced when the Wish title is changed

  1. Go to the Community Wishlist page.
  2. Click "Edit with form."
  3. Modify the Wish title to a string less than 5 characters or more than 100 characters.
  4. Save the form.
  5. ✅ AC2: Confirm that the form displays an error message indicating the Wish title must be between 5 and 100 characters.
Within 5-100 Characters<5 Characters>100 Characters
2024-09-24_11-31-33.mp4.gif (890×1 px, 1 MB)
2024-09-24_11-23-37.mp4.gif (752×996 px, 1 MB)
2024-09-24_11-25-19.mp4.gif (752×984 px, 1 MB)
GMikesell-WMF updated Other Assignee, removed: GMikesell-WMF.
GMikesell-WMF moved this task from QA to Done on the Community-Tech (Jackal (not a fox) Fox) board.