This issue has been created
There is 1 update.
 
 
XWiki Platform / cid:jira-generated-image-avatar-1be62d54-1672-44de-9b05-f3f8d63bbcde XWIKI-25301 Open

MacroIT is flickering on Firefox and its failed edit-mode cleanup fails the rest of AllIT

 
View issue   ·   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-87e2deb4-870f-4171-82c6-2c0870263e1f Simon Urli created this issue on 15/Oct/26 09:31
 
Summary: MacroIT is flickering on Firefox and its failed edit-mode cleanup fails the rest of AllIT
Issue Type: cid:jira-generated-image-avatar-1be62d54-1672-44de-9b05-f3f8d63bbcde Bug
Affects Versions: 17.10.13
Assignee: Unassigned
Components: Development Issues only
Created: 15/Oct/26 09:31
Labels: flickering
Priority: cid:jira-generated-image-static-major-0e68f441-09ea-4936-a4ee-6cc872e1432a Major
Reporter: Simon Urli
Description:

Symptom

org.xwiki.ckeditor.test.ui.MacroIT sometimes times out on Firefox in CKEditorToolBar.toggleSourceMode(), which waits 10s for an element to disappear when switching to Source to check the result:

org.openqa.selenium.TimeoutException: Expected condition failed: waiting for org.xwiki.test.ui.XWikiWebDriver$$Lambda$1872/... (tried for 10 seconds with 500 milliseconds interval)
	at org.xwiki.test.ui.XWikiWebDriver.waitUntilElementDisappears(XWikiWebDriver.java:390)
	at org.xwiki.ckeditor.test.po.CKEditorToolBar.toggleSourceMode(CKEditorToolBar.java:299)
	at org.xwiki.ckeditor.test.ui.AbstractCKEditorIT.assertSourceEquals(AbstractCKEditorIT.java:92)
	at org.xwiki.ckeditor.test.ui.MacroIT.children(MacroIT.java:110)

The failed test leaves CKEditor with unsaved changes, so MacroIT#afterEach cannot leave the edit mode (TestUtils.maybeLeaveEditMode is blocked by the beforeunload dialog). Since AllIT runs all its @Nested ITs in a single browser session, every following test then fails in its setup 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.
	at org.xwiki.test.docker.internal.junit5.XWikiDockerExtension.beforeEach(XWikiDockerExtension.java:198)

So one flicker turns into ~17 failures: the remaining MacroIT methods, TableIT#backspaceAfterInsertRow, and class-level failures of NestedSaveIT, NestedImageIT, NestedTextAreaIT, NestedLinkIT, NestedQuickActionsIT, NestedUndoRedoIT, NestedLocalizationIT, NestedFilterIT and NestedMacroIT.

Occurrences (stable-17.10.x, Oracle 19.3.0-se2 / Jetty 12-jdk25 / Filesystem / Firefox 158)

The other environments (Chrome) did not fail.

Local reproduction

MacroIT run 3 times locally on commit 87df7079518 with the same configuration (-Dxwiki.test.ui.database=oracle -Dxwiki.test.ui.databaseTag=19.3.0-se2 -Dxwiki.test.ui.servletEngine=jetty -Dxwiki.test.ui.servletEngineTag=12-jdk25 -Dxwiki.test.ui.browser=firefox -Dxwiki.test.ui.blobStore=filesystem, Firefox 158.0): 21/21 executions passed. So it really is intermittent, not a breakage.

Two things to fix

  1. the toggleSourceMode timeout itself on Firefox;
  2. the missing recovery in the cleanup: a failure that leaves unsaved content should not take down the rest of AllIT (see XWIKI-24806 for the same problem in TextAreaImageUploadIT).
 
 

1 update

 
cid:jira-generated-image-avatar-87e2deb4-870f-4171-82c6-2c0870263e1f Changes by Simon Urli on 15/Oct/26 09:31
 
Flickering Test: org.xwiki.ckeditor.test.ui.AllIT$NestedMacroIT#children