Skip to content

Commit f68a237

Browse files
committed
Docs: 3rd party libs
1 parent a557ac2 commit f68a237

File tree

8 files changed

+15
-12
lines changed

8 files changed

+15
-12
lines changed

docs/site/docs/getting-started/fixture-details.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,4 +109,4 @@ Let's look at what's going on in this test:
109109

110110
We will cover the details of the "act" and "assertion" step in the <xref:interaction> and <xref:verification> pages.
111111

112-
Learn more about injecting services into components under test on the <xref:inject-services-into-components> page.
112+
Learn more about injecting services into components under test on the <xref:inject-services> page.

docs/site/docs/getting-started/writing-csharp-tests.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ Then methods like <xref:Bunit.TestContext.RenderComponent``1(Bunit.Rendering.Com
8787
With the basics out of the way, we will next look at how to pass parameters and inject services into our components under test, and after that, cover in more details the various ways we can verify the outcome of a rendering.
8888

8989
- <xref:passing-parameters-to-components>
90-
- <xref:inject-services-into-components>
90+
- <xref:inject-services>
9191
- <xref:verify-markup>
9292
- <xref:verify-component-state>
9393
- <xref:trigger-event-handlers>

docs/site/docs/getting-started/writing-razor-tests.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,15 +90,15 @@ In this example, we are passing both attribute parameters and child content to t
9090

9191
[!code-html[](../../../samples/tests/razor/PassingParametersToComponents.razor)]
9292

93-
Injecting services into the components under test is covered on the <xref:inject-services-into-components> page.
93+
Injecting services into the components under test is covered on the <xref:inject-services> page.
9494

9595
## Further Reading
9696

9797
Now that we have covered the basics of writing tests using Razor syntax, you can continue digging deeper, e.g. by looking at:
9898

9999
- <xref:fixture-details>
100100
- <xref:snapshottest-details>
101-
- <xref:inject-services-into-components>
101+
- <xref:inject-services>
102102
- <xref:verify-markup>
103103
- <xref:verify-component-state>
104104
- <xref:trigger-event-handlers>

docs/site/docs/providing-input/configure-3rd-party-libs.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,13 @@ title: Configure 3rd Party Libraries for Testing
55

66
# Configure 3rd Party Libraries for Testing
77

8-
General introduction about what is usually required: Mimic setup guide from lib in test.
8+
Testing a component that is built using a 3rd party component library can require additional setup steps in each test, to ensure the 3rd party components work correctly in a test context.
99

10-
Talk about following section containing specific instructions for 3rd parter libraries.
10+
If for example a 3rd party component requires services to be registered in production code, it is likely that this is needed in a test context as well. See the <xref:inject-services> page for more info on this.
1111

12-
Add how to for test setup of tests that use Telerik, SyncFusion, etc. libraries. They often have IJsRuntime or other services that needs mocking or setup, before a test can run.
12+
Similarly, if a root component is needed to provide cascading values to the 3rd party components, that is likely to be needed as well. See the <xref:passing-parameters-to-components#cascading-parameters-and-cascading-values> page for more on this.
1313

14-
The how to should be as minimal as possible, preferably with links to vendors own documentation, so we do not have to keep it up to date if the vendor changes something in their library.
14+
> [!TIP]
15+
> If you are a Blazor component vendor and have instructions on how to setup a bUnit test context for testing components that use your components, we would love to feature a link to your documentation and component library on this page.
16+
>
17+
> Just submit a pull-request to this page with the relevant links added, share the relevant links in [bUnit's gitter chat](https://gitter.im/egil/bunit), or add an issue on [bUnit's github page](https://github.com/egil/razor-components-testing-library/issues) with the relevant links.

docs/site/docs/providing-input/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ title: Providing Input to a Component Under Test
88
This section covers the various ways to provide input to a component under test, its split into three sub sections:
99

1010
- **<xref:passing-parameters-to-components>:** This covers passing regular parameters, child content, cascading values, event callbacks, etc. This topic is mostly relevant when writing tests in C# only.
11-
- **<xref:inject-services-into-components>:** This covers injecting services into components under test. This topic is relevant for both Razor-based tests and C# only tests.
11+
- **<xref:inject-services>:** This covers injecting services into components under test. This topic is relevant for both Razor-based tests and C# only tests.
1212
- **<xref:configure-3rd-party-libs>:** This covers setting up 3rd party libraries in a bUnit testing scenario, such that components under test that use them can be tested easily.

docs/site/docs/providing-input/inject-services-into-components.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
uid: inject-services-into-components
2+
uid: inject-services
33
title: Injecting Services into Components Under Test
44
---
55

docs/site/docs/providing-input/passing-parameters-to-components.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,4 +452,4 @@ The special thing in this case is that the `GetComponentUnderTest<HelloWorld>()`
452452
453453
## Further Reading
454454
455-
- <xref:inject-services-into-components>
455+
- <xref:inject-services>

docs/site/docs/toc.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
# [Providing Input](xref:providing-input)
99
## [Parameters and Cascading Values](xref:passing-parameters-to-components)
10-
## [Inject Services into Components](xref:inject-services-into-components)
10+
## [Inject Services into Components](xref:inject-services)
1111
## [Configure 3rd Party Libraries](xref:configure-3rd-party-libs)
1212

1313
# [Interaction](xref:interaction)

0 commit comments

Comments
 (0)