|
25 | 25 | import java.lang.reflect.Method; |
26 | 26 | import java.util.Arrays; |
27 | 27 | import java.util.HashSet; |
| 28 | +import java.util.List; |
28 | 29 | import java.util.Optional; |
29 | 30 | import java.util.Set; |
30 | 31 |
|
@@ -72,10 +73,14 @@ public boolean isIgnored(ExtensionContext extensionContext) { |
72 | 73 | Optional<Method> testMethod = extensionContext.getTestMethod(); |
73 | 74 |
|
74 | 75 | // Ignored because of Selenium's custom extensions |
75 | | - boolean ignored = findAnnotation(testClass, IgnoreList.class).isPresent() || |
76 | | - !findRepeatableAnnotations(testClass, Ignore.class).isEmpty() || |
77 | | - findAnnotation(testMethod, IgnoreList.class).isPresent() || |
78 | | - !findRepeatableAnnotations(testMethod, Ignore.class).isEmpty(); |
| 76 | + Optional<IgnoreList> ignoreListClass = findAnnotation(testClass, IgnoreList.class); |
| 77 | + List<Ignore> ignoreClass = findRepeatableAnnotations(testClass, Ignore.class); |
| 78 | + Optional<IgnoreList> ignoreListMethod = findAnnotation(testMethod, IgnoreList.class); |
| 79 | + List<Ignore> ignoreMethod = findRepeatableAnnotations(testMethod, Ignore.class); |
| 80 | + boolean ignored = (ignoreListClass.isPresent() && ignoreComparator.shouldIgnore(ignoreListClass.get())) || |
| 81 | + (!ignoreClass.isEmpty() && ignoreComparator.shouldIgnore(ignoreClass.stream())) || |
| 82 | + (ignoreListMethod.isPresent() && ignoreComparator.shouldIgnore(ignoreListMethod.get())) || |
| 83 | + (!ignoreMethod.isEmpty() && ignoreComparator.shouldIgnore(ignoreMethod.stream())); |
79 | 84 |
|
80 | 85 | // Ignored because of Jupiter's @Disabled |
81 | 86 | ignored |= findAnnotation(testClass, Disabled.class).isPresent(); |
|
0 commit comments