This issue has been created
There are 2 updates.
 
 
XWiki Platform / cid:jira-generated-image-avatar-b4933bcf-8f1c-465e-b70f-3b3196680c47 XWIKI-24806 Open

TextAreaImageUploadIT is flickering and its missing edit-mode cleanup fails the rest of AllIT

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-7aca9ab4-55bf-492c-a7b8-6ca1470e31c8 Vincent Massol created this issue on 04/Sep/26 11:37
 
Summary: TextAreaImageUploadIT is flickering and its missing edit-mode cleanup fails the rest of AllIT
Issue Type: cid:jira-generated-image-avatar-b4933bcf-8f1c-465e-b70f-3b3196680c47 Bug
Affects Versions: 17.10.11
Assignee: Unassigned
Components: Development Issues only
Created: 04/Sep/26 11:37
Priority: cid:jira-generated-image-static-major-0d1c877e-2b46-4a13-a1e1-aee1de8b9bbe Major
Reporter: Vincent Massol
Description:

Symptom

org.xwiki.edit.test.ui.AllIT runs its @Nested ITs in a single shared browser session, with NestedTextAreaImageUploadIT first. When one of the TextAreaImageUploadIT tests fails while CKEditor is loaded with unsaved changes, the page is left with an armed beforeunload handler. The next navigation then fails with:

org.openqa.selenium.UnhandledAlertException: Unexpected beforeunload dialog detected. Performed handler "ignore": This page is asking you to confirm that you want to leave - information you've entered may not be saved.

Chrome reports the same thing as InvalidArgumentException: invalid argument: Unexpected dialog type beforeunload.

Because the browser session is shared between all the nested ITs, every remaining nested IT then dies in its setup, so a single flickering test turns into six failures.

Two occurrences on 2026-09-03 (stable-18.4.x, commit fb8021ba)

  • https://community.develocity.cloud/s/7uulfbxjm6s3i - ci.xwiki.org XWiki/xwiki-platform/stable-18.4.x #176, Firefox
    • uploadImageInObjectProperty: the real failure, a 10s TimeoutException in TextAreaImageUploadIT.uploadImage() on ckeditor.getToolBar().insertImage() - the image dialog never opened
    • uploadImageInEditableProperty: hung 422 seconds on a single driver.get() blocked by the dialog
    • NestedInplaceEditWithAnnotationsIT, NestedInplaceTranslateIT and NestedInplaceEditIT: all failed in under one second, in setup
  • https://community.develocity.cloud/s/cerfmzcv5hzvm - XWiki Environment Tests #113, Chrome 151
    • uploadImageInComment: the same 10s insertImage() timeout
    • then uploadImageInAnnotation and the same three nested ITs

In both builds InplaceTranslateIT's @AfterAll could not run either, so the wiki was left with multilingual=true for the rest of AllIT.

Two separate problems

  1. Missing cleanup - the cascade. TextAreaImageUploadIT has no @AfterEach leaving edit mode, unlike InplaceTranslateIT which calls TestUtils#maybeLeaveEditMode(). Adding one contains the damage to the single failing test instead of taking down the whole suite.
  2. The underlying flicker. ckeditor.getToolBar().insertImage() sometimes does not open the image dialog within the 10s wait. It happens on master too:

Those master runs did not cascade only by luck - the nested-class order and the missing cleanup are identical there.

The VNC recording archived by CI for the failing test (...-uploadImageInObjectProperty.flv) is the way in to diagnose why the toolbar click does not open the dialog.

 
 

2 updates

 
cid:jira-generated-image-avatar-7aca9ab4-55bf-492c-a7b8-6ca1470e31c8 Changes by Vincent Massol on 04/Sep/26 11:40
 
Assignee: Vincent Massol
Labels: flickering