You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/site/docs/contribute.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,17 +3,17 @@ uid: contribute
3
3
title: Contribute
4
4
---
5
5
6
-
# How to Contribute
6
+
# How to contribute
7
7
8
8
One of the easiest ways to contribute is to participate in discussions on GitHub issues. You can also contribute by submitting pull requests with code changes.
9
9
10
-
## General Feedback and Discussions
10
+
## General feedback and discussions
11
11
Start a discussion on the [bUnit discussion list](https://github.com/egil/bUnit/discussions).
12
12
13
-
## Bugs and Feature Requests
13
+
## Bugs and feature requests
14
14
For bugs or feature requests, log a new issue on the [issues list](https://github.com/egil/bunit/issues). Be sure to use the right template.
15
15
16
-
## Contributing Code and Content
16
+
## Contributing code and content
17
17
18
18
bUnit accepts fixes and features. Here is what you should do when writing code for bUnit:
19
19
@@ -28,18 +28,18 @@ Here are some resources to help you get started on how to contribute code or new
28
28
*["Help wanted" issues](https://github.com/egil/bunit/labels/help%20wanted) - these issues are up for grabs if you want to create a fix. To do this, simply comment on the issue you want to fix.
29
29
*["Good first issue" issues](https://github.com/egil/bunit/labels/good%20first%20issue) - these are good for newcomers. Good first issues are small, usually require just a few hours of work, and do not require a deep technical knowledge of bUnit. This is a good place to start if you want to become familiar with bUnit’s inner workings and maybe take on bigger issues later.
30
30
31
-
### Identifying the Scale of a Contribution
31
+
### Identifying the scale of a contribution
32
32
33
33
If you would like to contribute to bUnit, first identify the scale of what you would like to contribute. If it is small (grammar/spelling or a bug fix), feel free to start working on a fix. If you are submitting a feature or substantial code contribution, please discuss it with us first.
34
34
35
35
You might also read these two blogs posts on contributing code: [Open Source Contribution Etiquette](http://tirania.org/blog/archive/2010/Dec-31.html) by Miguel de Icaza and [Don't "Push" Your Pull Requests](https://www.igvita.com/2011/12/19/dont-push-your-pull-requests/) by Ilya Grigorik. These blog posts highlight good open source collaboration etiquette and help align expectations between you and us.
36
36
37
37
All code submissions will be rigorously reviewed and tested, and only those that meet a high bar for both quality and design/roadmap appropriateness will be merged into the source.
38
38
39
-
### Submitting a Pull Request
39
+
### Submitting a pull request
40
40
41
41
If you don't know what a pull request is, read this article: https://help.github.com/articles/using-pull-requests. Make sure the repository can build and all tests pass. It is also a good idea to familiarize yourself with the project workflow and our coding conventions.
Copy file name to clipboardExpand all lines: docs/site/docs/external-resources.md
+9-6Lines changed: 9 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,13 +6,11 @@ title: External Resources
6
6
# Presentations, guides, articles, tutorials, and blog posts
7
7
Here is a list of some web content that covers bUnit. If you produce something you think can be useful to bUnit's users, feel free to add it to this page and send a pull request.
8
8
9
-
### Presentations
10
-
11
-
-**[Testing Blazor Components - session from .NET Conf - Focus on Blazor](https://youtu.be/5d-uIxx1cUE)**
12
-
Content is based on beta-5.1 of bUnit.
13
-
14
9
### Podcasts/Twitch/YouTube/Live coding
15
10
11
+
-**[Test Driving the Blazing Pizza Workshop with bUnit (multiple videos)](https://youtube.com/playlist?list=PL2LoDmbC1g20uJjUwPGQxpQjdnmpMqV0t)**
12
+
Content is based on 1.0.0 of bUnit.
13
+
16
14
-**[.NET Rocks! - Testing Blazor Apps with Egil Hansen](https://www.dotnetrocks.com/?show=1690)**
17
15
Content is based on beta-7 of bUnit.
18
16
@@ -21,7 +19,12 @@ Here is a list of some web content that covers bUnit. If you produce something y
21
19
22
20
-**[Blazor StateHasChanged: Blazor Component Unit Testing with Egil Hansen](https://www.youtube.com/watch?v=x-zzcwHdZOk&t=211)**
23
21
Content is based on beta-5.1 of bUnit.
24
-
22
+
23
+
### Presentations
24
+
25
+
-**[Testing Blazor Components - session from .NET Conf - Focus on Blazor](https://youtu.be/5d-uIxx1cUE)**
26
+
Content is based on beta-5.1 of bUnit.
27
+
25
28
### Articles and blog posts
26
29
27
30
-**[bUnit for Blazor and How to Integrate it in Azure Pipeline](https://www.syncfusion.com/blogs/post/bunit-for-blazor-and-how-to-integrate-it-in-azure-pipeline.aspx) by Ramkumar Shanmugam**
To start writing tests for Blazor components, first set up a test project and then you can start adding tests.
9
9
@@ -14,10 +14,10 @@ The *basic* getting started topics are as follows:
14
14
15
15
The *next level* topics are:
16
16
17
-
1.**[Providing different types of input](xref:providing-input)** to a component under test in C# based tests, e.g. passing parameters or injecting services.
17
+
1.**[Providing different types of input](xref:providing-input)** to a component under test, e.g. passing parameters or injecting services.
18
18
2.**[Verifying output in various ways](xref:verification)** from a component under test, e.g. inspecting the rendered markup.
19
19
3.**[Mocking dependencies](xref:test-doubles)** a component under test has, e.g. the `IJsRuntime` or `HttpClient`.
20
20
21
-
## Getting Help
21
+
## Getting help
22
22
23
23
Can't figure out how to write a test for a testing scenario? Do you have a testing scenario that is hard to write or cannot be written elegantly with bUnit? Have you found a bug in bUnit? Head over to [bUnit’s discussion forum](https://github.com/egil/bUnit/discussions) to ask a question, give feedback, or suggest a new feature. Alternatively, join [bUnits Gitter channel](https://gitter.im/egil/bunit) and let us know. There are no stupid questions - all are welcome!
With the basics out of the way, next we will look at how to pass parameters and inject services into our component under test. After that, we will cover ways we can verify the outcome of a rendering in more detail
Copy file name to clipboardExpand all lines: docs/site/docs/interaction/awaiting-async-state.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,9 @@
1
1
---
2
2
uid: awaiting-async-state
3
-
title: Awaiting an Asynchronous State Change in a Component Under Test
3
+
title: Awaiting an asynchronous state change in a component under test
4
4
---
5
5
6
-
# Awaiting an Asynchronous State Change
6
+
# Awaiting an asynchronous state change
7
7
8
8
A test can fail if a component performs asynchronous renders. This may be due to a reason such as waiting for an asynchronous operation to complete before continuing its render life-cycle. For example, if a component is waiting for an async web service to return data to it in the `OnInitializedAsync()` life-cycle method before rendering it to the render tree.
9
9
@@ -13,7 +13,7 @@ bUnit comes with two methods that help to deal with this issue: the [`WaitForSta
13
13
14
14
Let's start by taking a look at the `WaitForState` method in more detail.
15
15
16
-
## Waiting for State Using`WaitForState`
16
+
## Waiting for state using`WaitForState`
17
17
18
18
The [`WaitForState(Func<Boolean>, TimeSpan?)`](xref:Bunit.RenderedFragmentWaitForHelperExtensions.WaitForState(Bunit.IRenderedFragmentBase,System.Func{System.Boolean},System.Nullable{System.TimeSpan})) method can be used to block and wait in a test method, until the provided predicate returns true or the timeout is reached. (The default timeout is one second.)
19
19
@@ -38,7 +38,7 @@ This is what happens in the test:
38
38
> [!WARNING]
39
39
> The wait predicate and an assertion should not verify the same thing. Instead, use the `WaitForAssertion(...)` method covered on the <xref:async-assertion> page instead.
40
40
41
-
### Controlling Wait Timeout
41
+
### Controlling wait timeout
42
42
43
43
The timeout, which defaults to one second, can be controlled by passing a `TimeSpan` as the second argument to the `WaitForState()` method, e.g.:
Copy file name to clipboardExpand all lines: docs/site/docs/interaction/index.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,9 @@
1
1
---
2
2
uid: interaction
3
-
title: Interacting with a Component Under Test
3
+
title: Interacting with a component under test
4
4
---
5
5
6
-
# Interacting with a Component Under Test
6
+
# Interacting with a component under test
7
7
8
8
This section covers the various ways to interact with a component under test, e.g. trigger event handlers. This — and more — is covered in the following sub sections:
0 commit comments