public Row getLastRowFromTableByProcessBusinessKeyAndResult()

in src/main/java/platform/qa/officer/pages/components/Table.java [80:91]


    public Row getLastRowFromTableByProcessBusinessKeyAndResult(String processDefinitionName,
                                                                String businessKey, String result, TestContext testContext) {
        String processedBusinessKey = replaceValueFragmentWithValueFromRequest(businessKey, testContext);
        return tableRows.stream()
                .filter(row ->
                        row.getProcessDefinitionName().getText().contains(processDefinitionName) &&
                                row.getBusinessKey().getText().contains(processedBusinessKey) &&
                                row.getResult().getText().contains(result))
                .max(Row::compareTo).orElseThrow(() -> new NoSuchElementException(String.format("Послуга \"%s\" з "
                                + "ідентифікатором \"%s\" та результатом \"%s\" відсутня у черзі послуг",
                        processDefinitionName, processedBusinessKey, result)));
    }