There are 6 updates, 2 comments.
 
 
XWiki Platform / cid:jira-generated-image-avatar-a9c6bd66-eb99-4498-bca3-8424a003d0b2 XWIKI-24583 Closed

Create/check for automated tests for "Copy a WebHome page from one space to another on a hierarchy"

 
View issue   ยท   Add comment
 

6 updates

 
cid:jira-generated-image-avatar-1f8c1600-07cc-4dd0-8f15-630f58f6ea40 Changes by Vincent Massol on 22/Jul/26 22:17
 
Fix Version: 18.7.0-rc-1
Documentation in Release Notes: N/A
Documentation: N/A
Resolution: Fixed
Tests: Integration
Status: Open Closed
 
 

2 comments

 
cid:jira-generated-image-avatar-1f8c1600-07cc-4dd0-8f15-630f58f6ea40 Vincent Massol on 22/Jul/26 22:16
 

Checked the existing automated tests against the manual test "Copy a WebHome page from one space to another on a hierarchy".

What was missing: The functional test CopyPageIT#copyPagePreservingChildren (module xwiki-platform-flamingo-skin-test-docker) already covered copying a WebHome (non-terminal) page while preserving its children, but only with single-level spaces (source CopyWithChildren -> target CopyWithChildrenCopy). The manual test specifically exercises a deeply-nested hierarchy for both the source and the target, and that nested-source -> nested-target case was not covered by any automated test. (Note: selecting the target via the tree location picker is separately covered by CopyPageIT#copyOverwritePage.)

What was done: Extended CopyPageIT#copyPagePreservingChildren so that:
* the copied page is a WebHome located deep in a hierarchy: CopyWithChildren.SourceLevel2.SourceLevel3.WebHome (with a child ...SourceLevel3.ChildSpace.WebHome);
* the target is also a nested location: CopyWithChildrenTarget.TargetLevel2.TargetLevel3, selected through the location advanced-edit fields (setParent/setName) - i.e. the way an advanced user selects the target without the tree picker;
* the assertions verify the WebHome was copied to the nested target together with its content, and that the child page was preserved at ...TargetLevel3.ChildSpace.WebHome.

The updated test passes in Docker (Tests run: 1, Failures: 0, Errors: 0).

 
cid:jira-generated-image-avatar-1f8c1600-07cc-4dd0-8f15-630f58f6ea40 Vincent Massol on 22/Jul/26 22:17
 

Ilie Andriuta please mark as automated, thx!