| The functional test org.xwiki.tag.test.ui.AllIT$NestedTagIT#addExistingTag fails intermittently on ci.xwiki.org. Occurrence
Error
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. |