There are 2 updates, 2 comments.
 
 
XWiki Platform / cid:jira-generated-image-avatar-640ecec5-dec3-4986-b281-8a5f6c9b6f79 XWIKI-24532 In Progress

LightboxIT#openImageWithCaptionAndManuallyAddedId is flickering

 
View issue   ·   Add comment
 

2 updates

 
cid:jira-generated-image-avatar-b87529b5-6122-4699-a80f-27f65fbc1def Changes by Vincent Massol on 30/Jun/26 11:16
 
Assignee: Vincent Massol
Status: Open In Progress
 
 

2 comments

 
cid:jira-generated-image-avatar-b87529b5-6122-4699-a80f-27f65fbc1def Vincent Massol on 30/Jun/26 11:16
 
The failing test is a hover-timing flicker, not a code regression. I verified this from the CI history:
- It passed in 13 consecutive builds (#27–#44) and failed once in #46. ("Regression" in Jenkins just means "was green, now red" — auto-labeled.)
- The test runs in 4 environment configs; 3 passed, only 1 failed.
- Every other hover-based test passed in all 4 configs, and the lightbox module has no recent functional commits.

Root cause: The image popover is shown only by the lightbox JS mousemove handler, 500ms after the mouse stops moving (lightbox.js:292–305). Those handlers attach asynchronously via RequireJS. LightboxPage.hoverImage() does a single moveToElement. If that one mousemove lands before the handler is attached (RequireJS still loading after reloadPage()), it's lost — and with the mouse now stationary, no further move fires, so the popover never appears → 10s timeout.

Fix: Make ImagePopover.waitUntilReady() re-trigger the hover (one real ±1px move per attempt, then wait ~2s, up to ~5 attempts within the existing 10s budget) so a mousemove is guaranteed to reach the handler once attached. The retry stays in waitUntilReady() (not hoverImage()) to preserve the three negative tests that expect a TimeoutException. The change is fully contained in the lightbox -pageobjects project (LightboxPage.java + ImagePopover.java).
 
cid:jira-generated-image-avatar-b87529b5-6122-4699-a80f-27f65fbc1def Vincent Massol on 30/Jun/26 11:17
 
{noformat}
The failing test is a hover-timing flicker, not a code regression. I verified this from the CI history:
- It passed in 13 consecutive builds (#27–#44) and failed once in #46. ("Regression" in Jenkins just means "was green, now red" — auto-labeled.)
- The test runs in 4 environment configs; 3 passed, only 1 failed.
- Every other hover-based test passed in all 4 configs, and the lightbox module has no recent functional commits.

Root cause: The image popover is shown only by the lightbox JS mousemove handler, 500ms after the mouse stops moving (lightbox.js:292–305). Those handlers attach asynchronously via RequireJS. LightboxPage.hoverImage() does a single moveToElement. If that one mousemove lands before the handler is attached (RequireJS still loading after reloadPage()), it's lost — and with the mouse now stationary, no further move fires, so the popover never appears → 10s timeout.

Fix: Make ImagePopover.waitUntilReady() re-trigger the hover (one real ±1px move per attempt, then wait ~2s, up to ~5 attempts within the existing 10s budget) so a mousemove is guaranteed to reach the handler once attached. The retry stays in waitUntilReady() (not hoverImage()) to preserve the three negative tests that expect a TimeoutException. The change is fully contained in the lightbox -pageobjects project (LightboxPage.java + ImagePopover.java).
{noformat}

Creating a PR