rename test method name

This commit is contained in:
Bahtiyar Kaba 2018-06-11 23:13:22 +03:00 committed by José Carlos Valero Sánchez
parent 0c231ed0e6
commit 8f3f5cdec1
1 changed files with 2 additions and 3 deletions

View File

@ -12,18 +12,17 @@ import org.testcontainers.DockerClientFactory;
import org.testcontainers.containers.BrowserWebDriverContainer;
import org.testcontainers.containers.GenericContainer;
import net.codestory.http.WebServer;
public class WebDriverContainerTests {
@Rule
public BrowserWebDriverContainer chrome = new BrowserWebDriverContainer().withDesiredCapabilities(DesiredCapabilities.chrome());
@Test
public void when() {
public void whenNavigatedToPage_thenHeadingIsInThePage() {
RemoteWebDriver driver = chrome.getWebDriver();
driver.get("https://saucelabs.com/test/guinea-pig");
String heading = driver.findElement(By.xpath("/html/body/h1"))
.getText();
assertEquals("This page is a Selenium sandbox", heading);
}
}