Skip to content

Commit

Permalink
[java] Reverting an assume that unintentionally disabled devtools tes…
Browse files Browse the repository at this point in the history
…ts in chrome and bumping min Firefox version for devtools tests to 87
  • Loading branch information
barancev committed Feb 8, 2021
1 parent 129028e commit 0eb85c7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
package org.openqa.selenium.devtools;

import static org.assertj.core.api.Assumptions.assumeThat;
import static org.openqa.selenium.testing.TestUtilities.isFirefoxVersionNotLessThan;
import static org.openqa.selenium.testing.TestUtilities.isFirefoxVersionOlderThan;

import org.junit.Before;
import org.openqa.selenium.testing.JUnit4TestBase;
Expand All @@ -30,7 +30,7 @@ public abstract class DevToolsTestBase extends JUnit4TestBase {
@Before
public void setUp() {
assumeThat(driver).isInstanceOf(HasDevTools.class);
assumeThat(isFirefoxVersionNotLessThan(83, driver)).isTrue();
assumeThat(isFirefoxVersionOlderThan(87, driver)).isFalse();

devTools = ((HasDevTools) driver).getDevTools();
devTools.createSessionIfThereIsNotOne();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
import static org.assertj.core.api.Assumptions.assumeThat;
import static org.openqa.selenium.remote.http.Contents.utf8String;
import static org.openqa.selenium.testing.Safely.safelyCall;
import static org.openqa.selenium.testing.TestUtilities.isFirefoxVersionNotLessThan;
import static org.openqa.selenium.testing.TestUtilities.isFirefoxVersionOlderThan;

public class NetworkInterceptorTest {

Expand All @@ -56,7 +56,7 @@ public void setup() {
driver = new WebDriverBuilder().get();

assumeThat(driver).isInstanceOf(HasDevTools.class);
assumeThat(isFirefoxVersionNotLessThan(83, driver)).isTrue();
assumeThat(isFirefoxVersionOlderThan(87, driver)).isFalse();

appServer = new NettyAppServer(req -> new HttpResponse()
.setStatus(200)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ public static boolean isFirefox(WebDriver driver) {
return getUserAgent(driver).contains("Firefox");
}

public static boolean isFirefoxVersionNotLessThan(int version, WebDriver driver) {
return isFirefox(driver) && getFirefoxVersion(driver) >= version;
public static boolean isFirefoxVersionOlderThan(int version, WebDriver driver) {
return isFirefox(driver) && getFirefoxVersion(driver) < version;
}

public static boolean isInternetExplorer(WebDriver driver) {
Expand Down

0 comments on commit 0eb85c7

Please sign in to comment.