There is 1 update, 1 comment.
 
 
XWiki Platform / cid:jira-generated-image-avatar-b0558fb8-1d7c-4790-86db-1ea1501b1c6c XWIKI-25162 Open

UsersGroupsRightsManagementIT#editGroup is flickering

 
View issue   ยท   Add comment
 

1 update

 
cid:jira-generated-image-avatar-dcc1595c-4eba-4104-876e-6ab97b5cb9ed Changes by Vincent Massol on 02/Oct/26 15:05
 
Assignee: Vincent Massol
 
 

1 comment

 
cid:jira-generated-image-avatar-dcc1595c-4eba-4104-876e-6ab97b5cb9ed Vincent Massol on 02/Oct/26 15:05
 

Root cause found, fix proposed in https://github.com/xwiki/xwiki-platform/pull/6571 (test-only, page object).

Root cause

The group sheet's add handler (XWikiGroupSheet) and the live data delete action (DisplayerActions.vue) both display the success notification right after starting the members live data reload (updateEntries()), not after it completes. GroupEditPage#addMembersToGroup and GroupEditPage#removeMembers only waited for that notification, and TableLayoutElement#assertRow doesn't wait at all. So the test could read the members table before the reload finished. This shows up in two ways:

  • The add side, as in the description: after addUsers(alice).addGroups(backEndDevs), the table still held the rows from before the second add (Alice, Bob, frontEndDevs, no backEndDevs).
  • The remove side: in removeMembers, the next getRows() read rows that the reload from the previous removal replaced moments later, giving StaleElementReferenceException in GroupEditPage.getRowUserName. This was seen on CI in https://community.develocity.cloud/s/h6wgbd6zzcefc (master build 8781, editGroup line 192, removeMembers(alice, backEndDevs)) and once locally.

The product doesn't lose any add (each add is its own POST, and the following member count check of 4 passes whenever the table assertion does), so only the test wait was wrong.

Fix

GroupEditPage now waits for the success notification and then for the members live data to be ready (TableLayoutElement#waitUntilReady()), after each add and each remove. This wait cannot pass early: updateEntries() fires beforeEntryFetch synchronously, which puts the live data loader in its waiting state. That happens in the same JS task as, and before, the notification is created. So whenever WebDriver can see the notification, the loader is already waiting, and waitUntilReady() blocks until the fetch is over and the cells are rendered.

Verification

  • AllIT$NestedUsersGroupsRightsManagementIT (HSQLDB, Tomcat, Firefox): passed 3 times in a row, 19/19 each time.
  • Checkstyle on the page objects module: no violations.
  • CI history since 2026-01-01: editGroup failed 4 times out of 1969 runs. 3 of those were class-wide failures in GroupsPage.gotoPage (unrelated), and 1 was this race.