Skip to content

Commit 431c58e

Browse files
Fix Test Issue in LKSM (#1176)
* Adding a check to baseReactSelect.removeSelection to validate that selection was removed.
1 parent 531209b commit 431c58e

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/org/labkey/test/components/react/BaseReactSelect.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,10 +255,15 @@ public T removeSelection(String value)
255255

256256
scrollIntoView();
257257

258-
var removeBtn = Locators.removeMultiSelectValueButton(value).waitForElement(getComponentElement(), 1_500);
258+
WebElement removeBtn = Locators.removeMultiSelectValueButton(value).findWhenNeeded(getComponentElement());
259259
removeBtn.click();
260+
260261
getWrapper().shortWait().until(ExpectedConditions.stalenessOf(removeBtn));
261262

263+
// Validate that the selected item really was removed.
264+
WebDriverWrapper.sleep(500);
265+
waitFor(()->!getSelections().contains(value), String.format("Failed to remove selection '%s'.", value), WAIT_FOR_JAVASCRIPT);
266+
262267
return getThis();
263268
}
264269

0 commit comments

Comments
 (0)