Skip to content

Commit 91d2a51

Browse files
ngocnhan-tran1996sbrannen
authored andcommitted
Fix cross-reference links in HtmlUnit sections
Closes gh-35853 Signed-off-by: Tran Ngoc Nhan <ngocnhan.tran1996@gmail.com>
1 parent f456674 commit 91d2a51

File tree

3 files changed

+9
-10
lines changed

3 files changed

+9
-10
lines changed

framework-docs/modules/ROOT/pages/testing/mockmvc/htmlunit/geb.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use https://www.gebish.org/[Geb] to make our tests even Groovy-er.
88
== Why Geb and MockMvc?
99

1010
Geb is backed by WebDriver, so it offers many of the
11-
xref:testing/mockmvc/htmlunit/webdriver.adoc#spring-mvc-test-server-htmlunit-webdriver-why[same benefits] that we get from
11+
xref:testing/mockmvc/htmlunit/webdriver.adoc#mockmvc-server-htmlunit-webdriver-why[same benefits] that we get from
1212
WebDriver. However, Geb makes things even easier by taking care of some of the
1313
boilerplate code for us.
1414

@@ -28,7 +28,7 @@ def setup() {
2828
----
2929

3030
NOTE: This is a simple example of using `MockMvcHtmlUnitDriverBuilder`. For more advanced
31-
usage, see xref:testing/mockmvc/htmlunit/webdriver.adoc#spring-mvc-test-server-htmlunit-webdriver-advanced-builder[Advanced `MockMvcHtmlUnitDriverBuilder`].
31+
usage, see xref:testing/mockmvc/htmlunit/webdriver.adoc#mockmvc-server-htmlunit-webdriver-advanced-builder[Advanced `MockMvcHtmlUnitDriverBuilder`].
3232

3333
This ensures that any URL referencing `localhost` as the server is directed to our
3434
`MockMvc` instance without the need for a real HTTP connection. Any other URL is
@@ -62,7 +62,7 @@ forwarded to the current page object. This removes a lot of the boilerplate code
6262
needed when using WebDriver directly.
6363

6464
As with direct WebDriver usage, this improves on the design of our
65-
xref:testing/mockmvc/htmlunit/mah.adoc#spring-mvc-test-server-htmlunit-mah-usage[HtmlUnit test] by using the Page Object
65+
xref:testing/mockmvc/htmlunit/mah.adoc#mockmvc-server-htmlunit-mah-usage[HtmlUnit test] by using the Page Object
6666
Pattern. As mentioned previously, we can use the Page Object Pattern with HtmlUnit and
6767
WebDriver, but it is even easier with Geb. Consider our new Groovy-based
6868
`CreateMessagePage` implementation:

framework-docs/modules/ROOT/pages/testing/mockmvc/htmlunit/mah.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Kotlin::
4545
======
4646

4747
NOTE: This is a simple example of using `MockMvcWebClientBuilder`. For advanced usage,
48-
see xref:testing/mockmvc/htmlunit/mah.adoc#spring-mvc-test-server-htmlunit-mah-advanced-builder[Advanced `MockMvcWebClientBuilder`].
48+
see <<mockmvc-server-htmlunit-mah-advanced-builder>>.
4949

5050
This ensures that any URL that references `localhost` as the server is directed to our
5151
`MockMvc` instance without the need for a real HTTP connection. Any other URL is
@@ -77,7 +77,7 @@ Kotlin::
7777
======
7878

7979
NOTE: The default context path is `""`. Alternatively, we can specify the context path,
80-
as described in xref:testing/mockmvc/htmlunit/mah.adoc#spring-mvc-test-server-htmlunit-mah-advanced-builder[Advanced `MockMvcWebClientBuilder`].
80+
as described in <<mockmvc-server-htmlunit-mah-advanced-builder>>.
8181

8282
Once we have a reference to the `HtmlPage`, we can then fill out the form and submit it
8383
to create a message, as the following example shows:
@@ -144,7 +144,7 @@ Kotlin::
144144
======
145145

146146
The preceding code improves on our
147-
xref:testing/mockmvc/htmlunit/why.adoc#spring-mvc-test-server-htmlunit-mock-mvc-test[MockMvc test] in a number of ways.
147+
xref:testing/mockmvc/htmlunit/why.adoc#mockmvc-server-htmlunit-mock-mvc-test[MockMvc test] in a number of ways.
148148
First, we no longer have to explicitly verify our form and then create a request that
149149
looks like the form. Instead, we request the form, fill it out, and submit it, thereby
150150
significantly reducing the overhead.

framework-docs/modules/ROOT/pages/testing/mockmvc/htmlunit/webdriver.adoc

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ Kotlin::
203203
======
204204

205205
NOTE: This is a simple example of using `MockMvcHtmlUnitDriverBuilder`. For more advanced
206-
usage, see xref:testing/mockmvc/htmlunit/webdriver.adoc#spring-mvc-test-server-htmlunit-webdriver-advanced-builder[Advanced `MockMvcHtmlUnitDriverBuilder`].
206+
usage, see <<mockmvc-server-htmlunit-webdriver-advanced-builder>>.
207207

208208
The preceding example ensures that any URL that references `localhost` as the server is
209209
directed to our `MockMvc` instance without the need for a real HTTP connection. Any other
@@ -259,9 +259,8 @@ Kotlin::
259259
======
260260
--
261261

262-
This improves on the design of our xref:testing/mockmvc/htmlunit/mah.adoc#spring-mvc-test-server-htmlunit-mah-usage[HtmlUnit test]
263-
by leveraging the Page Object Pattern. As we mentioned in
264-
xref:testing/mockmvc/htmlunit/webdriver.adoc#mockmvc-server-htmlunit-webdriver-why[Why WebDriver and MockMvc?], we can use the Page Object Pattern
262+
This improves on the design of our xref:testing/mockmvc/htmlunit/mah.adoc#mockmvc-server-htmlunit-mah-usage[HtmlUnit test]
263+
by leveraging the Page Object Pattern. As we mentioned in <<mockmvc-server-htmlunit-webdriver-why>>, we can use the Page Object Pattern
265264
with HtmlUnit, but it is much easier with WebDriver. Consider the following
266265
`CreateMessagePage` implementation:
267266

0 commit comments

Comments
 (0)