Skip to content

Commit

Permalink
Fix chromedriver manager test
Browse files Browse the repository at this point in the history
  • Loading branch information
bonigarcia committed Feb 27, 2025
1 parent d2f3a7e commit 13d982a
Showing 1 changed file with 7 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,18 @@
import static io.github.bonigarcia.wdm.config.OperatingSystem.MAC;
import static io.github.bonigarcia.wdm.config.OperatingSystem.WIN;
import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.jupiter.api.Assertions.assertThrows;

import java.net.MalformedURLException;
import java.net.URL;

import org.junit.jupiter.api.Test;
import org.openqa.selenium.WebDriverException;

import io.github.bonigarcia.wdm.config.DummyConfig;

class ChromeDriverManagerTest {
private static final String VERSION = "115.0.5790.24";
private static final String VERSION = "133.0.6943.141";
private final ChromeDriverManager chromeDriverManager = new ChromeDriverManager();

@Test
Expand All @@ -46,10 +48,8 @@ void chromeVersionOnLinux() throws MalformedURLException {
X64))).hasValue(new URL(String.format(
"https://storage.googleapis.com/chrome-for-testing-public/%s/linux64/chromedriver-linux64.zip",
VERSION)));
assertThat(chromeDriverManager.buildUrl(VERSION, new DummyConfig(LINUX,
ARM64))).hasValue(new URL(String.format(
"https://storage.googleapis.com/chrome-for-testing-public/%s/linux64/chromedriver-linux64.zip",
VERSION)));
assertThrows(WebDriverException.class, () -> chromeDriverManager
.buildUrl(VERSION, new DummyConfig(LINUX, ARM64)));
assertThat(chromeDriverManager.buildUrl(VERSION, new DummyConfig(LINUX,
DEFAULT))).hasValue(new URL(String.format(
"https://storage.googleapis.com/chrome-for-testing-public/%s/linux64/chromedriver-linux64.zip",
Expand Down Expand Up @@ -90,9 +90,7 @@ void chromeVersionOnWindows() throws MalformedURLException {
DEFAULT))).hasValue(new URL(String.format(
"https://storage.googleapis.com/chrome-for-testing-public/%s/win64/chromedriver-win64.zip",
VERSION)));
assertThat(chromeDriverManager.buildUrl(VERSION, new DummyConfig(WIN,
ARM64))).hasValue(new URL(String.format(
"https://storage.googleapis.com/chrome-for-testing-public/%s/win64/chromedriver-win64.zip",
VERSION)));
assertThrows(WebDriverException.class, () -> chromeDriverManager
.buildUrl(VERSION, new DummyConfig(WIN, ARM64)));
}
}

0 comments on commit 13d982a

Please sign in to comment.