A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/seleniumhq/selenium/commit/9850c95bee3ed6d83b21b2838977cab7d5e16d94 below:

[java] Fix test ignorance custom logic (#11007) · SeleniumHQ/selenium@9850c95 · GitHub

File tree Expand file treeCollapse file tree 3 files changed

+10

-9

lines changed

Filter options

Expand file treeCollapse file tree 3 files changed

+10

-9

lines changed Original file line number Diff line number Diff line change

@@ -203,10 +203,7 @@ public void testAddCookiesWithDifferentPathsThatAreRelatedToOurs() {

203 203 204 204

@SwitchToTopAfterTest

205 205

@Test

206 -

@NotYetImplemented(value = CHROME, reason = "https://bugs.chromium.org/p/chromedriver/issues/detail?id=3153")

207 -

@NotYetImplemented(value = EDGE, reason = "https://bugs.chromium.org/p/chromedriver/issues/detail?id=3153")

208 206

@Ignore(SAFARI)

209 -

@NotYetImplemented(value = FIREFOX, reason = "https://github.com/mozilla/geckodriver/issues/1104")

210 207

public void testGetCookiesInAFrame() {

211 208

driver.get(domainHelper.getUrlForFirstValidHostname("/common/animals"));

212 209

Cookie cookie1 = new Cookie.Builder("fish", "cod").path("/common/animals").build();

@@ -424,7 +421,6 @@ public void testRetainsCookieSecure() {

424 421 425 422

@Test

426 423

@Ignore(SAFARI)

427 -

@NotYetImplemented(CHROME)

428 424

public void canHandleHttpOnlyCookie() {

429 425

Cookie addedCookie =

430 426

new Cookie.Builder("fish", "cod")

Original file line number Diff line number Diff line change

@@ -45,7 +45,7 @@ public boolean shouldIgnore(Ignore ignore) {

45 45

return ignore != null && shouldIgnore(Stream.of(ignore));

46 46

}

47 47 48 -

private boolean shouldIgnore(Stream<Ignore> ignoreList) {

48 +

public boolean shouldIgnore(Stream<Ignore> ignoreList) {

49 49

return ignoreList.anyMatch(

50 50

driver -> (ignored.contains(driver.value()) || driver.value() == Browser.ALL)

51 51

&& ((!driver.travis() || TestUtilities.isOnTravis())

Original file line number Diff line number Diff line change

@@ -25,6 +25,7 @@

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();

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4