Details
-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
18.4.5
-
Unknown
-
-
org.xwiki.tag.test.ui.AllIT$NestedTagIT#addExistingTag
Description
The functional test org.xwiki.tag.test.ui.AllIT$NestedTagIT#addExistingTag fails intermittently on ci.xwiki.org.
Occurrence
- Seen in https://ci.xwiki.org/job/XWiki%20Environment%20Tests/job/xwiki-platform/job/stable-18.4.x/139/testReport/ (commit 89eec5c383f), environment: PostgreSQL latest, Tomcat 11-jdk25, S3 blob store, Chrome.
- History: 1 failure in 35 builds (stable-18.4.x main + environment jobs); passes on master, stable-18.8.x and stable-17.10.x.
- Local verification on 89eec5c383f: the whole module passed with the CI Maven options, and the test passed 20/20 when repeated alone.
Error
org.openqa.selenium.ElementClickInterceptedException: element click intercepted: Element <input class="button button-add-tag" type="submit" value="Add"> is not clickable at point (69, 364). Other element would receive the click: <li class="xitem " style="background-image: url("http://xwikiweb0:8080/xwiki/resources/icons/silk/tag_yellow.png?cache-version=1790728190000"); background-repeat at org.xwiki.tag.test.po.AddTagsPane.add(AddTagsPane.java:86) at org.xwiki.tag.test.ui.TagIT.addExistingTag(TagIT.java:152)
Analysis
The click on the Add button is intercepted by an li.xitem, i.e. the tag suggest dropdown (XWiki.widgets.Suggest attached to the tag input in tags.js, rendered inside tag-add-form-suggest). The dropdown only shows when the typed tag already exists, which is precisely the second setTags(tag) of this test, and it appears after the key-up delay plus an AJAX round trip. AddTagsPane#add() clicks the button without waiting for the suggestions or dismissing them, so when the dropdown opens between sendKeys and click() the click lands on it.
Possible fix
Dismiss the suggestions (e.g. press Escape) or wait for them in AddTagsPane#setTags, before clicking Add.