There is 1 comment.
 
 
XWiki Platform / cid:jira-generated-image-avatar-666dcb62-6f3f-41d5-be0d-72b98af99197 XWIKI-24586 Open

Create/check for automated tests for "Rename a page with existing translations"

 
View issue   ยท   Add comment
 

1 comment

 
cid:jira-generated-image-avatar-b2e111ee-b011-4c56-995f-4b0457ff3d25 Vincent Massol on 23/Jul/26 11:50
 

Gap analysis for the "Rename a page with existing translations" manual test

Existing automated coverage

The functional test RenamePageIT#renamePageRelativeLinkPageAndTranslation (module xwiki-platform-flamingo-skin-test-docker) already covers the core of this manual test: it creates a page in the default locale plus a French (FR) translation, renames/moves it to a new location via the UI, then asserts that both the default-locale page and the FR translation exist at the new location with the expected content. So the behaviour "the translations are moved along with the original" is exercised. (That test's declared intent is link refactoring across translations, but it necessarily proves the translation follows the move.)

Unit tests

No unit test in the refactoring module renames/moves a page and asserts its translations were moved: the actual move of the translation documents is delegated to the store's renameDocument (via DefaultModelBridge.rename()). The refactoring unit tests only cover link refactoring across translation locales (DefaultReferenceUpdaterTest#updateAndTranslations) and the delete/restore-translation paths.

Gap found and closed

The existing functional test did not verify that the translations were removed from the old location. I enhanced renamePageRelativeLinkPageAndTranslation to also assert that, after the rename (performed without auto-redirect, which is the default), neither the default-locale page nor its FR translation still exist at the source reference. This now fully matches the manual test's expected result: "the original page (EN) was renamed/moved along with its translation pages".

Conclusion

The scenario is covered by RenamePageIT#renamePageRelativeLinkPageAndTranslation once this enhancement is merged; a new dedicated test is not needed.