There is 1 update, 1 comment.
 
 
XWiki Platform / cid:jira-generated-image-avatar-23c7ea01-ce8a-477b-b291-35ced9e39666 XWIKI-18772 Open

Add automated test for "Disable Version Summaries"

 
View issue   ·   Add comment
 

1 update

 
cid:jira-generated-image-avatar-6551863e-807f-422c-9187-d8f6c5963fc6 Changes by Vincent Massol on 07/Jun/26 19:43
 
Assignee: Vincent Massol
 
 

1 comment

 
cid:jira-generated-image-avatar-6551863e-807f-422c-9187-d8f6c5963fc6 Vincent Massol on 07/Jun/26 19:44
 

Analysis:

 Context

 JIRA XWIKI-18772 (label testneeded) asks to automate a
 manual test: Disable Version Summaries.

 The manual test scenario:
 1. Edit a page → the version summary field ("Add summary...") is visible at the bottom.
 2. Go to Administer Wiki → Editing → Edit Mode, set "Enable Version Summaries" to No, Save.
 3. Edit the page again.
 4. Expected: the version summary input field is no longer visible.

 Is it already covered? No (partial overlap only).

 EditIT.showAndHideEditComments() already exists and disables the comment field, but via a different
 mechanism — the xwiki.editcomment.hidden config property. The two are distinct code paths:

 ┌─────────────────────────────┬─────────────────────────────────────────────────────────┬───────────────────────────────────────────────────────────────────┬─────────────────────────────────┐
 │          Scenario           │                         Setting                         │               Velocity logic (editactions.vm:61-73)               │           DOM result            │
 ├─────────────────────────────┼─────────────────────────────────────────────────────────┼───────────────────────────────────────────────────────────────────┼─────────────────────────────────┤
 │ Already tested (XWIKI-2487) │ xwiki.editcomment.hidden=1 → isEditCommentFieldHidden() │ Block entered, renders <input type="hidden" id="comment">         │ Element present but not visible │
 ├─────────────────────────────┼─────────────────────────────────────────────────────────┼───────────────────────────────────────────────────────────────────┼─────────────────────────────────┤
 │ This ticket (XWIKI-18772)   │ editcomment wiki pref = 0 → hasEditComment()            │ #if(... && $xwiki.hasEditComment()) is false, whole block skipped │ No comment element at all       │
 └─────────────────────────────┴─────────────────────────────────────────────────────────┴───────────────────────────────────────────────────────────────────┴─────────────────────────────────┘

 Confirmed in com.xpn.xwiki.XWiki#hasEditComment (oldcore, ~line 6942): it reads the editcomment
 wiki preference first ("1"→true, "0"→false), then falls back to config xwiki.editcomment (default 0).
 In XWiki Standard the field is shown by default, so the editcomment wiki preference is effectively enabled.

 So the admin "Enable Version Summaries" toggle (the actual subject of the ticket) is not tested today.