diff --git a/build.gradle b/build.gradle index c0fdfed..bd2b878 100644 --- a/build.gradle +++ b/build.gradle @@ -34,7 +34,8 @@ dependencies { testCompile("org.springframework.boot:spring-boot-starter-test") testCompile("org.seleniumhq.selenium:selenium-api") testCompile 'org.seleniumhq.selenium:selenium-chrome-driver' - testCompile('com.github.tomakehurst:wiremock:2.26.3') + testCompile('com.github.tomakehurst:wiremock-jre8:2.26.3') + testCompile("junit:junit") testCompile('org.assertj:assertj-core:3.8.0') } diff --git a/src/test/java/mocklab/demo/OAuth2LoginTest.java b/src/test/java/mocklab/demo/OAuth2LoginTest.java index 3ec702f..d14f354 100644 --- a/src/test/java/mocklab/demo/OAuth2LoginTest.java +++ b/src/test/java/mocklab/demo/OAuth2LoginTest.java @@ -70,13 +70,11 @@ public void logs_in_via_wiremock_sso() throws Exception { webDriver.findElement(By.name("password")).sendKeys("pass123"); webDriver.findElement(By.id("submit")).click(); - Thread.sleep(2000); - assertThat(webDriver.getCurrentUrl()).contains("/user"); assertThat(webDriver.findElement(By.tagName("h1")).getText()).contains("Hello bwatkins@test.com!"); } static { - System.setProperty("webdriver.chrome.driver", "lib/chromedriver"); + System.setProperty("webdriver.chrome.driver", "lib/chromedriver"); // This is the OSX driver. You'll need to tweak this if you want to run on Windows or Linux. } }