private void waitDropdownLoaded()

in src/main/java/platform/qa/officer/pages/components/Select.java [101:119]


    private void waitDropdownLoaded(String itemValue) {
        wait.ignoring(StaleElementReferenceException.class).until(visibilityOf(selectTable));
        wait.ignoring(StaleElementReferenceException.class)
                .until(new ExpectedCondition<Boolean>() {
                    String list = "";
                    public Boolean apply(WebDriver driver) {
                        try {
                            list = selectItems.stream().map(WebElement::getText).collect(Collectors.joining(","));
                            return selectItems.stream().anyMatch(item -> item.getText().trim().startsWith(itemValue));
                        } catch (StaleElementReferenceException var3) {
                            return false;
                        }
                    }

                    public String toString() {
                        return String.format("item start from text ('%s') to be present in list [%s]", itemValue, list);
                    }
                });
    }