Forked from
PMPL / Workshops / Spring Petclinic BDD
2 commits behind, 1 commit ahead of the upstream repository.
-
reza.raditya authoredreza.raditya authored
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
refactorHelper.java 586 B
package starter.helpers;
import net.serenitybdd.screenplay.ensure.Ensure;
import net.serenitybdd.screenplay.ensure.PerformablePredicate;
import net.serenitybdd.screenplay.ui.InputField;
public class refactorHelper {
public static PerformablePredicate verifyDataItem(String inputFieldNameOrId, String dataItem) {
return Ensure.thatAmongst(InputField.withNameOrId(inputFieldNameOrId))
.anyMatch(name + " should be on the list",
(field) -> field.getValue()
.equals(dataItem)
);
}
}