use of org.jboss.arquillian.test.spi.execution.ExecutionDecision in project keycloak by keycloak.
the class BrowserDriverIgnoreDecider method decideIgnoring.
private ExecutionDecision decideIgnoring(AnnotatedElement element) {
final WebDriver webDriver = driver.get();
Predicate<IgnoreBrowserDriver> shouldBeIgnored = (item) -> {
return webDriver != null && (isDriverInstanceOf(webDriver, item.value()) ^ item.negate());
};
return Arrays.stream(element.getAnnotationsByType(IgnoreBrowserDriver.class)).filter(shouldBeIgnored).findAny().map(f -> ExecutionDecision.dontExecute("This test should not be executed with this browser.")).orElse(ExecutionDecision.execute());
}
Aggregations