Skip to content

Commit

Permalink
XWIKI-22680: Regression on createAndDeleteUser
Browse files Browse the repository at this point in the history
* Removed the waiting for forms that do not use livevalidation.

(cherry picked from commit 777a296)
  • Loading branch information
Sereza7 authored and surli committed Nov 25, 2024
1 parent a782fe7 commit 2a3e309
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,12 @@ public void fillFieldsByName(Map<String, String> valuesByNames)
Unfortunately in Java17 we do not have lastEntry() from LinkedHashMaps,
so we use a few non optimized operations instead.
This is okay because the Map should not contain a lot of elements.
---
Not all forms use live-validation, we make sure the last element has some validation going on before waiting.
*/
if(!valuesByElements.isEmpty() && lastElement != null) {
if(!valuesByElements.isEmpty() && lastElement != null && !lastElement.findElements(
By.xpath("//following-sibling::span[contains(@class, 'LV_validation_message')]"))
.isEmpty()) {
WebElement finalLastElement = lastElement;
getDriver().waitUntilCondition(driver -> !finalLastElement.getAttribute(CLASS_ATTRIBUTE).isEmpty());
}
Expand Down

0 comments on commit 2a3e309

Please sign in to comment.