There is 1 comment.
 
 
XWiki Platform / cid:jira-generated-image-avatar-95500e8d-83ec-45f0-8b97-f1735ea29b70 XWIKI-21225 Open

NotificationsIT#notificationDisplayerClass is flickering

 
View issue   ยท   Add comment
 

1 comment

 
cid:jira-generated-image-avatar-64b4d625-d5d1-46ca-a449-99028b99ec3c Marius Dumitru Florea on 27/Jan/26 10:25
 

Today I encountered another stacktrace:

org.openqa.selenium.TimeoutException: 
Expected condition failed: waiting for org.xwiki.test.ui.XWikiWebDriver$$Lambda/0x00007fad2ccb06b0@69001f70 (tried for 10 second(s) with 500 milliseconds interval)
Build info: version: '4.39.0', revision: '126f156aee'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '6.1.0-37-cloud-amd64', java.version: '21.0.10'
Driver info: org.xwiki.test.ui.XWikiWebDriver
Capabilities {acceptInsecureCerts: false, browserName: chrome, browserVersion: 144.0.7559.96, chrome: {chromedriverVersion: 144.0.7559.96 (d7b80622cfab..., userDataDir: /tmp/org.chromium.Chromium....}, fedcm:accounts: true, goog:chromeOptions: {debuggerAddress: localhost:37987}, goog:loggingPrefs: {browser: ALL}, goog:processID: 175, networkConnectionEnabled: false, pageLoadStrategy: normal, platformName: linux, proxy: Proxy(), se:cdp: ws://172.17.0.10:4444/sessi..., se:cdpVersion: 144.0.7559.96, se:containerName: b945e7723b87, se:deleteSessionOnUi: true, se:downloadsEnabled: true, se:gridWebSocketUrl: ws://localhost:20100/sessio..., se:noVncPort: 7900, se:vnc: ws://172.17.0.10:4444/sessi..., se:vncEnabled: true, se:vncLocalAddress: ws://172.17.0.10:7900, setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: ignore, webSocketUrl: ws://172.17.0.10:4444/sessi..., webauthn:extension:credBlob: true, webauthn:extension:largeBlob: true, webauthn:extension:minPinLength: true, webauthn:extension:prf: true, webauthn:virtualAuthenticators: true}
Session ID: a367ea4295b478a820c74039961377d4
	at org.openqa.selenium.support.ui.WebDriverWait.timeoutException(WebDriverWait.java:84)
	at org.openqa.selenium.support.ui.FluentWait.until(FluentWait.java:228)
	at org.xwiki.test.ui.XWikiWebDriver.waitUntilCondition(XWikiWebDriver.java:229)
	at org.xwiki.test.ui.po.editor.ObjectEditPage.addObject(ObjectEditPage.java:83)
	at org.xwiki.platform.notifications.test.ui.NotificationsIT.notificationDisplayerClass(NotificationsIT.java:355)

I was able to reproduce the failure locally. It seems to fail more often on Chrome than Firefox. This is what I noticed:

  • clicking on the Add button from the Object editor to add a new object without selecting a class first takes you to view mode
  • the video recording of the failing test shows that the NotificationDisplayerClass object is not added, and the Object editor is left for the view mode
  • the class picker is using a Selectize widget; I suspect the test is clicking on the Add button too early, before the value is marked as selected; in other words test is not waiting for the value to be selected
  • If we think about UI/UX, that Add button should be disabled until the add action makes sense, i.e. until we have all the information needed to add the new object, which is the class name. An event listener on the class picker Selectize widget should enable / disable the Add button depending on whether a value is selected or not. This would allow the test to wait for the Add button to be enabled after selecting a class name.