Skip to content

Commit 69cfe0a

Browse files
authored
docs: fix broken links (#680)
1 parent 7efbba8 commit 69cfe0a

File tree

21 files changed

+73
-85
lines changed

21 files changed

+73
-85
lines changed

docs/dom-testing-library/api-configuration.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ e.g. `window.getComputedStyle(document.createElement('div'), '::after')`.
2929
Defaults to `false`
3030

3131
`defaultHidden`: The default value for the `hidden` option used by
32-
[`getByRole`](api-queries#byrole). Defaults to `false`.
32+
[`getByRole`](api-queries.mdx#byrole). Defaults to `false`.
3333

3434
`showOriginalStackTrace`: By default, `waitFor` will ensure that the stack trace
3535
for errors thrown by Testing Library is cleaned up and shortened so it's easier
@@ -50,11 +50,11 @@ option.
5050
screen.getByTestId('foo', { suggest: false }) // will not throw a suggestion
5151
```
5252

53-
`testIdAttribute`: The attribute used by [`getByTestId`](api-queries#bytestid)
53+
`testIdAttribute`: The attribute used by [`getByTestId`](api-queries.mdx#bytestid)
5454
and related queries. Defaults to `data-testid`.
5555

5656
`getElementError`: A function that returns the error used when
57-
[`getBy*`](api-queries#getby) or [`getAllBy*`](api-queries#getallby) fail. Takes
57+
[`getBy*`](api-queries.mdx#getby) or [`getAllBy*`](api-queries.mdx#getallby) fail. Takes
5858
the error message and container object as arguments.
5959

6060
`asyncUtilTimeout`: The global timeout value in milliseconds used by `waitFor`

docs/dom-testing-library/api-helpers.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,15 +61,15 @@ module.exports = {
6161
>
6262
> Custom queries can be added to `React Testing Library`'s `render` method by
6363
> adding `queries` to the options config object. See the render
64-
> [options](/docs/react-testing-library/api#render-options).
64+
> [options](react-testing-library/api.mdx#render-options).
6565
6666
## `buildQueries`
6767

6868
The `buildQueries` helper allows you to create custom queries with all standard
6969
[variants](api-queries.mdx) of queries in testing-library.
7070

7171
See the
72-
[Add custom queries](/docs/react-testing-library/setup#add-custom-queries)
72+
[Add custom queries](react-testing-library/setup.mdx#add-custom-queries)
7373
section of the custom render guide for example usage.
7474

7575
### Using other assertion libraries

docs/dom-testing-library/api-queries.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ to find more than one element, then use `findAllBy`.
4343
> **Note**
4444
>
4545
> this is a simple combination of `getBy*` queries and
46-
> [`waitFor`](api-async#waitfor). The `findBy*` queries accept the `waitFor`
46+
> [`waitFor`](api-async.mdx#waitfor). The `findBy*` queries accept the `waitFor`
4747
> options as the last argument. (i.e.
4848
> `screen.findByText('text', queryOptions, waitForOptions)`)
4949
@@ -708,7 +708,7 @@ assertions about the `Open dialog`-button you would need to use
708708
`getAllByRole('button', { hidden: true })`.
709709

710710
The default value for `hidden` can
711-
[be configured](api-configuration#configuration).
711+
[be configured](api-configuration.mdx#configuration).
712712

713713
#### `selected`
714714

docs/dom-testing-library/faq.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ details** of the component.
102102

103103
We believe this leads to less brittle and more meaningful test code.
104104

105-
Please refer to the [Guiding Principles](../guiding-principles) of this testing
105+
Please refer to the [Guiding Principles](guiding-principles.mdx) of this testing
106106
library for more info.
107107

108108
</details>

docs/ecosystem-bs-jest-dom.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: bs-jest-dom
44
---
55

66
[`bs-jest-dom`][gh] is a companion library for
7-
[`bs-react-testing-library`](/docs/bs-react-testing-library/intro) that provides
7+
[`bs-react-testing-library`](bs-react-testing-library/intro.mdx) that provides
88
custom DOM element matchers for Jest in [ReasonML][re] via
99
[BuckleScript][bucklescript].
1010

docs/example-react-intl.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ You have two options:
7676

7777
To test our translated component we can create a custom `render` function using
7878
the `wrapper` option as explained in the
79-
[setup](./react-testing-library/setup.mdx) page.
79+
[setup](react-testing-library/setup.mdx) page.
8080
Our custom `render` function can look like this:
8181

8282
```jsx

docs/marko-testing-library/intro.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ when a real user uses it.
4949
**What this library is not**:
5050

5151
1. A test runner or framework
52-
2. Specific to a testing framework, you can [use it with Jest](./setup#jest),
53-
[mocha](./setup#mocha), or other test runners.
52+
2. Specific to a testing framework, you can [use it with Jest](setup.mdx#jest),
53+
[mocha](setup.mdx#mocha), or other test runners.
5454

5555
> NOTE: This library is built on top of
5656
> [`DOM Testing Library`](dom-testing-library/intro.mdx) which is where most of

docs/nightwatch-testing-library/intro.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,5 +136,5 @@ module.exports = {
136136
}
137137
```
138138

139-
[config]: https://testing-library.com/docs/dom-testing-library/api-configuration
139+
[config]: ../dom-testing-library/api-configuration.mdx
140140
[gh]: https://github.com/testing-library/nightwatch-testing-library

docs/preact-testing-library/api.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ sidebar_label: API
1616

1717
This library re-exports everything from the DOM Testing Library
1818
(`@testing-library/dom`). See the
19-
[documentation](../dom-testing-library/api-queries.mdx) to see what goodies you
19+
[documentation](dom-testing-library/api-queries.mdx) to see what goodies you
2020
can use.
2121

2222
## `render`
@@ -33,7 +33,7 @@ const { results } = render(<YourComponent />, { options })
3333
| ------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- |
3434
| `container` | The HTML element the component is mounted to. | baseElement |
3535
| `baseElement` | The root HTML element to which the container is appended to. | document.body |
36-
| `queries` | Queries to bind to the baseElement. See [getQueriesForElement](../dom-testing-library/api-helpers#within-and-getqueriesforelement-apis). | null |
36+
| `queries` | Queries to bind to the baseElement. See [getQueriesForElement](dom-testing-library/api-helpers.mdx#within-and-getqueriesforelement-apis). | null |
3737
| `hydrate` | Used when the component has already been mounted and requires a rerender. Not needed for most people. The rerender function passed back to you does this already. | false |
3838
| `wrapper` | A parent component to wrap YourComponent. | null |
3939

@@ -43,11 +43,11 @@ const { results } = render(<YourComponent />, { options })
4343
| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
4444
| `container` | The HTML element the component is mounted to. |
4545
| `baseElement` | The root HTML element to which the container is appended to. |
46-
| `debug` | Logs the baseElement using [prettyDom](https://testing-library.com/docs/dom-testing-library/api-helpers#prettydom). |
46+
| `debug` | Logs the baseElement using [prettyDom](dom-testing-library/api-helpers.mdx#prettydom). |
4747
| `unmount` | Unmounts the component from the container. |
4848
| `rerender` | Calls render again passing in the original arguments and sets hydrate to true. |
4949
| `asFragment` | Returns the innerHTML of the container. |
50-
| `...queries` | Returns all [query functions](https://testing-library.com/docs/dom-testing-library/api-queries) to be used on the baseElement. If you pass in `query` arguments than this will be those, otherwise all. |
50+
| `...queries` | Returns all [query functions](dom-testing-library/api-queries.mdx) to be used on the baseElement. If you pass in `query` arguments than this will be those, otherwise all. |
5151

5252
## `cleanup`
5353

@@ -82,7 +82,7 @@ Even thought it's for React, it gives you an idea of why it's needed.
8282
## `fireEvent`
8383

8484
Passes it to the @testing-library/dom
85-
[fireEvent](../dom-testing-library/api-events). It's also wrapped in `act` so
85+
[fireEvent](dom-testing-library/api-events.mdx). It's also wrapped in `act` so
8686
you don't need to worry about doing it.
8787

8888
📝 Keep in mind mainly when using `h / Preact.createElement` that React uses a

docs/preact-testing-library/intro.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@ See the [Dom introduction][dom-solution-explainer] and [React
3434
introduction][react-solution-explainer] for a more in-depth explanation.
3535

3636
[dom-solution-explainer]: ../dom-testing-library/intro.mdx#this-solution
37-
[react-solution-explainer]: ../react-testing-library/intro#this-solution
37+
[react-solution-explainer]: ../react-testing-library/intro.mdx#this-solution
3838

3939
**What this library is not**:
4040

4141
1. A test runner or framework.
4242
2. Specific to a testing framework.
4343

4444
We recommend Jest as our preference. You can checkout
45-
[Using Without Jest](../react-testing-library/setup#using-without-jest) if
45+
[Using Without Jest](react-testing-library/setup.mdx#using-without-jest) if
4646
you're looking to use another framework.

0 commit comments

Comments
 (0)