diff --git a/integration_test/src/it/scala/org/scalawebtest/integration/extensions/aem/AemTweaksSpec.scala b/integration_test/src/it/scala/org/scalawebtest/integration/extensions/aem/AemTweaksSpec.scala
index 20213e3..83a4838 100755
--- a/integration_test/src/it/scala/org/scalawebtest/integration/extensions/aem/AemTweaksSpec.scala
+++ b/integration_test/src/it/scala/org/scalawebtest/integration/extensions/aem/AemTweaksSpec.scala
@@ -1,6 +1,6 @@
package org.scalawebtest.integration.extensions.aem
-import org.scalatest.time.{Seconds, Span}
+import org.scalatest.time.SpanSugar._
import org.scalawebtest.aem.AemTweaks
import org.scalawebtest.aem.WcmMode.DISABLED
import org.scalawebtest.core.gauge.Gauge.fit
@@ -14,8 +14,8 @@ class AemTweaksSpec extends ScalaWebTestBaseSpec with AemTweaks {
path = "/cookieVisualizing.jsp"
"When wcmmode DISABLED is select webBrowser" should "send the according cookie" in {
- implicitlyWait(Span(1, Seconds))
- eventually(timeout(Span(1, Seconds))) {
+ implicitlyWait(1 second)
+ eventually(timeout(1 second)) {
fit(
@contains wcmmode)
}
}
diff --git a/integration_test/src/it/scala/org/scalawebtest/integration/js/AjaxSpec.scala b/integration_test/src/it/scala/org/scalawebtest/integration/js/AjaxSpec.scala
index eabadbd..2ea6e42 100755
--- a/integration_test/src/it/scala/org/scalawebtest/integration/js/AjaxSpec.scala
+++ b/integration_test/src/it/scala/org/scalawebtest/integration/js/AjaxSpec.scala
@@ -14,7 +14,7 @@
*/
package org.scalawebtest.integration.js
-import org.scalatest.time.{Seconds, Span}
+import org.scalatest.time.SpanSugar._
import org.scalawebtest.core.gauge.Gauge.fits
import org.scalawebtest.integration.ScalaWebTestBaseSpec
@@ -23,12 +23,12 @@ class AjaxSpec extends ScalaWebTestBaseSpec {
config.enableJavaScript(throwOnError = true)
"A simple webpage loading content with JS" should "be correctly interpreted by HtmlUnit" in {
- eventually(timeout(Span(1, Seconds))) {
+ eventually(timeout(1 second)) {
container.text should include("Text loaded with JavaScript")
}
}
it should "work with CheckingGauge" in {
- eventually(timeout(Span(1, Seconds))) {
+ eventually(timeout(1 second)) {
fits(Text loaded with JavaScript
)
}
}
diff --git a/integration_test/src/it/scala/org/scalawebtest/integration/navigation/EnforceNavigateTo.scala b/integration_test/src/it/scala/org/scalawebtest/integration/navigation/EnforceNavigateTo.scala
new file mode 100755
index 0000000..ee9fc21
--- /dev/null
+++ b/integration_test/src/it/scala/org/scalawebtest/integration/navigation/EnforceNavigateTo.scala
@@ -0,0 +1,23 @@
+package org.scalawebtest.integration.navigation
+
+import org.scalatest.time.SpanSugar._
+import org.scalawebtest.integration.ScalaWebTestBaseSpec
+
+class EnforceNavigateTo extends ScalaWebTestBaseSpec{
+ path = "/simpleAjax.jsp"
+ config.enableJavaScript(throwOnError = true)
+ config.enforceNavigateTo()
+
+ "A simple webpage loading content with JS" should "be correctly interpreted by HtmlUnit" in {
+ eventually(timeout(1 second)) {
+ container.text should include("Text loaded with JavaScript")
+ }
+ }
+ it should "not be immediately available, if page was reloaded" in {
+ container.text should not include "Text loaded with JavaScript"
+ }
+
+ def container = {
+ find(cssSelector("div#container")).get
+ }
+}