There are 5 updates, 1 comment.
 
 
XWiki Platform / cid:jira-generated-image-avatar-d73621e1-a512-45a4-8036-d0ec47599844 XWIKI-18715 Closed

Add automated test for "Make Version Summaries Mandatory"

 
View issue   ·   Add comment
 

5 updates

 
cid:jira-generated-image-avatar-2b800600-c6e7-44d8-94ef-19c389d365cb Changes by Vincent Massol on 30/Jun/26 13:40
 
Documentation in Release Notes: N/A
Documentation: N/A
Assignee: Vincent Massol
Resolution: Cannot Reproduce
Status: Open Closed
 
 

1 comment

 
cid:jira-generated-image-avatar-2b800600-c6e7-44d8-94ef-19c389d365cb Vincent Massol on 30/Jun/26 13:40
 

Ilie Andriuta This is already automated, please mark it as such.

Details:

  Your instinct is correct — the feature is already covered                                                                                                                                                                                                                                                                 
                                                                                                                                                                                                                                                                                                                            
  The "Make Version Summaries Mandatory" feature (editcomment_mandatory wiki preference) already has automated functional test coverage for the two editors that matter most:                                                                                                                                               
                                                                                                                                                                                                                                                                                                                            
  ┌────────────────────────────────────────────────────────┬───────────────────────────────────────────────────────────┬─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐                                                              
  │                         Editor                         │                           Test                            │                                                              Coverage                                                               │                                                              
  ├────────────────────────────────────────────────────────┼───────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤                                                              
  │ In-place editor (default when creating/editing a page) │ InplaceEditIT.editInPlaceWithMandatoryVersionSummary()    │ ✅ Full: enables editcomment_mandatory, save blocked, empty re-prompts, dismiss cancels, providing summary saves, reset to optional │                                                              
  ├────────────────────────────────────────────────────────┼───────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤                                                              
  │ Realtime WYSIWYG (CKEditor)                            │ RealtimeWYSIWYGEditorIT.mandatoryTitleAndVersionSummary() │ ✅ Full: modal + shortcut alert + autosave + Done button                                                                            │                                                              
  └────────────────────────────────────────────────────────┴───────────────────────────────────────────────────────────┴─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘                                                              
                                                                                                                                                                                                                                                                                                                            
  There's even a shared page-object helper EditPage.waitForVersionSummaryAlert() (added in 18.1.0RC1 / 17.10.4 / …) asserting the exact "Enter a brief description of your changes" message from the manual test.                                                                                                           
                                                                                                                                                                                                                                                                                                                            
  The manual test (XWIKI-18715) is generic ("create a page, Save & View → blocked with prompt"). Since creating a page uses the in-place editor by default, InplaceEditIT.editInPlaceWithMandatoryVersionSummary() is effectively the migration of that manual test.                                                        
                                                                                                                                                                                                                                                                                                                            
  The one gap                                                                                                                                                                                                                                                                                                               
                                                                                                                                                                                                                                                                                                                            
  The classic wiki (source) editor has no test for the mandatory-summary blocking behavior. WikiEditIT only covers showing/hiding the comment field (showAndHideEditComments) and mandatory title (mandatoryTitle) — not mandatory summary. All editors share the same actionButtons.js validateForm() prompt mechanism     
  (already exercised by the in-place test), so this gap is minor/defense-in-depth.