This issue has been created
There are 2 updates.
 
 
XWiki Platform / cid:jira-generated-image-avatar-b5c47ac9-ef64-4de4-bcc3-071fc7ad2dce XWIKI-25221 Open

Make the CKEditor test page objects wait for the content refresh after inserting or editing a macro

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-a4e8d1bc-41e6-436b-b249-de1bad17be7a Vincent Massol created this issue on 08/Oct/26 16:58
 
Summary: Make the CKEditor test page objects wait for the content refresh after inserting or editing a macro
Issue Type: cid:jira-generated-image-avatar-b5c47ac9-ef64-4de4-bcc3-071fc7ad2dce Task
Assignee: Unassigned
Components: Development Issues only
Created: 08/Oct/26 16:58
Priority: cid:jira-generated-image-static-major-4dd35d4d-f96e-4005-9c24-a41f57d58a09 Major
Reporter: Vincent Massol
Description:

Functional tests using CKEditor currently have to wait themselves for the edited content to be refreshed after a macro is inserted or edited (e.g. textArea.waitForContentRefresh() right after macroEditModal.clickSubmit()), as well as hand-code the quick action (slash command) sequence (AutocompleteDropdown + waitForItemSelected + Enter + waitForItemSubmitted). Test writers must know which actions trigger a server-side re-rendering and forgetting the wait leads to flickering tests.

The page objects should do these waits themselves, so that tests don't have to:

  • submitting the macro edit modal opened from the tool bar, the balloon tool bar, or by pressing Enter on a selected macro waits for the macro to be re-rendered
  • new RichTextAreaElement APIs to insert a macro using a quick action (insertMacro(), insertMacroWithRequiredParameters()), to edit the selected macro (editSelectedMacro()) and to execute a quick action (executeQuickAction())
  • the existing functional tests (CKEditor, in-place edit, realtime WYSIWYG) are updated to rely on them, keeping only the waits that only the test can know about (e.g. remote changes from another realtime editor)

This is a first step towards removing waits from functional tests (see the "Page objects" best practices at https://dev.xwiki.org/xwiki/bin/view/Community/Testing/DockerTesting/#HBestPractices).

 
 

2 updates

 
cid:jira-generated-image-avatar-a4e8d1bc-41e6-436b-b249-de1bad17be7a Changes by Vincent Massol on 08/Oct/26 16:58
 
Fix Version: 18.9.0-rc-1
Assignee: Vincent Massol