From: Kai Moritz Date: Wed, 22 Jan 2020 12:05:17 +0000 (+0100) Subject: WIP X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=d968707a4bb1b520df07f363b7e8077061cb1ccf;p=demos%2Fspring-boot WIP --- diff --git a/src/test/java/de/juplo/demo/DemoControllerIT.java b/src/test/java/de/juplo/demo/DemoControllerIT.java index 2f3d07e..d8a4580 100644 --- a/src/test/java/de/juplo/demo/DemoControllerIT.java +++ b/src/test/java/de/juplo/demo/DemoControllerIT.java @@ -4,9 +4,9 @@ package de.juplo.demo; import lombok.extern.slf4j.Slf4j; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; +import org.openqa.selenium.remote.RemoteWebDriver; import org.springframework.boot.test.context.SpringBootTest; import static org.springframework.boot.test.context.SpringBootTest.WebEnvironment.RANDOM_PORT; -import org.testcontainers.containers.BrowserWebDriverContainer; /** @@ -19,7 +19,7 @@ import org.testcontainers.containers.BrowserWebDriverContainer; public class DemoControllerIT { @Test - void testSubmit(BrowserWebDriverContainer chrome) + void testSubmit(RemoteWebDriver driver) { } diff --git a/src/test/java/de/juplo/demo/WebDriverExtension.java b/src/test/java/de/juplo/demo/WebDriverExtension.java index a2c5d0c..ada01f5 100644 --- a/src/test/java/de/juplo/demo/WebDriverExtension.java +++ b/src/test/java/de/juplo/demo/WebDriverExtension.java @@ -7,6 +7,7 @@ import org.junit.jupiter.api.extension.ParameterContext; import org.junit.jupiter.api.extension.ParameterResolver; import org.openqa.selenium.WebDriver; import org.openqa.selenium.remote.DesiredCapabilities; +import org.openqa.selenium.remote.RemoteWebDriver; import org.testcontainers.containers.BrowserWebDriverContainer; @@ -32,7 +33,7 @@ public class WebDriverExtension implements BeforeEachCallback, ParameterResolver ParameterContext parameterContext, ExtensionContext extensionContext) { - return parameterContext.getParameter().getType() == BrowserWebDriverContainer.class; + return parameterContext.getParameter().getType() == RemoteWebDriver.class; } @Override @@ -40,6 +41,6 @@ public class WebDriverExtension implements BeforeEachCallback, ParameterResolver ParameterContext parameterContext, ExtensionContext extensionContext) { - return chrome; + return chrome.getWebDriver(); } }