- group code example callouts to ensure callouts are displayed for the
correct examples
- add missing callouts
- fix syntax, annotation attribute names, etc.
@ -1429,6 +1429,7 @@ Now we can use WebDriver as we normally would but without the need to deploy our
@@ -1429,6 +1429,7 @@ Now we can use WebDriver as we normally would but without the need to deploy our
application to a Servlet container. For example, we can request the view to create a
@ -1456,6 +1459,7 @@ We can then fill out the form and submit it to create a message, as follows:
@@ -1456,6 +1459,7 @@ We can then fill out the form and submit it to create a message, as follows:
This improves on the design of our <<spring-mvc-test-server-htmlunit-mah-usage, HtmlUnit test>>
by leveraging the Page Object Pattern. As we mentioned in
@ -1463,6 +1467,7 @@ by leveraging the Page Object Pattern. As we mentioned in
@@ -1463,6 +1467,7 @@ by leveraging the Page Object Pattern. As we mentioned in
with HtmlUnit, but it is much easier with WebDriver. Consider the following
@ -1551,11 +1556,12 @@ by the `id` or `name` of the element within the HTML page.
@@ -1551,11 +1556,12 @@ by the `id` or `name` of the element within the HTML page.
@ -1568,10 +1574,12 @@ assertions use the https://assertj.github.io/doc/[AssertJ] assertion library:
@@ -1568,10 +1574,12 @@ assertions use the https://assertj.github.io/doc/[AssertJ] assertion library:
@ -1589,12 +1597,14 @@ example, it exposes a method that returns a `Message` object:
@@ -1589,12 +1597,14 @@ example, it exposes a method that returns a `Message` object:
----
fun getMessage() = Message(getId(), getCreated(), getSummary(), getText())
----
--
We can then use the rich domain objects in our assertions.
Lastly, we must not forget to close the `WebDriver` instance when the test is complete,
@ -644,7 +644,7 @@ path that represents a resource URL (i.e., a path prefixed with `classpath:`, `f
@@ -644,7 +644,7 @@ path that represents a resource URL (i.e., a path prefixed with `classpath:`, `f
@ExtendWith(SpringExtension::class)
// ApplicationContext will be loaded from "/app-config.xml" and
// "/test-config.xml" in the root of the classpath
@ -678,7 +678,7 @@ demonstrated in the following example:
@@ -678,7 +678,7 @@ demonstrated in the following example:
// class body...
}
----
<1> Specifying XML files without using the `location` attribute.
<1> Specifying XML files without using the `locations` attribute.
If you omit both the `locations` and the `value` attributes from the
@ -743,6 +743,7 @@ The following example shows how to specify Groovy configuration files:
@@ -743,6 +743,7 @@ The following example shows how to specify Groovy configuration files:
// class body...
}
----
<1> Specifying the location of Groovy configuration files.
@ -222,6 +222,7 @@ resource base path). The resource base path is used behind the scenes to create
@@ -222,6 +222,7 @@ resource base path). The resource base path is used behind the scenes to create
The following example shows how to use the `@WebAppConfiguration` annotation:
@ -231,6 +232,7 @@ The following example shows how to use the `@WebAppConfiguration` annotation:
@@ -231,6 +232,7 @@ The following example shows how to use the `@WebAppConfiguration` annotation:
@ -242,6 +244,7 @@ The following example shows how to use the `@WebAppConfiguration` annotation:
@@ -242,6 +244,7 @@ The following example shows how to use the `@WebAppConfiguration` annotation:
}
----
<1> The `@WebAppConfiguration` annotation.
--
To override the default, you can specify a different base resource path by using the
@ -249,6 +252,7 @@ implicit `value` attribute. Both `classpath:` and `file:` resource prefixes are
@@ -249,6 +252,7 @@ implicit `value` attribute. Both `classpath:` and `file:` resource prefixes are
supported. If no resource prefix is supplied, the path is assumed to be a file system
resource. The following example shows how to specify a classpath resource:
@ -270,6 +274,7 @@ resource. The following example shows how to specify a classpath resource:
@@ -270,6 +274,7 @@ resource. The following example shows how to specify a classpath resource:
}
----
<1> Specifying a classpath resource.
--
Note that `@WebAppConfiguration` must be used in conjunction with
@ -1104,7 +1109,7 @@ annotation. The following example shows how to declare an SQL group:
@@ -1104,7 +1109,7 @@ annotation. The following example shows how to declare an SQL group: