BUnit Component.Input(string) does not update @bind-value on Input component
See original GitHub issueDescribe the bug
When using cut.Find(".ant-input").Input("500");
, @bind-value does not update.
Steps to reproduce (please include code)
- Using BUnit render a component which uses AntDesign.Input
- Try to find component ( successful) using css selector
.ant-input
- Invoke Input method
Further technical details
- AntDesign Nuget Package version = 0.7.1-nightly-2103091405
- Include the output of
dotnet --info
=
.NET SDK (reflecting any global.json):
Version: 5.0.200
Commit: 70b3e65d53
Runtime Environment:
OS Name: Windows
OS Version: 10.0.18363
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\5.0.200\
Host (useful for support):
Version: 5.0.3
Commit: c636bbdc8a
.NET SDKs installed:
5.0.100-preview.5.20279.10 [C:\Program Files\dotnet\sdk]
5.0.200 [C:\Program Files\dotnet\sdk]
.NET runtimes installed:
Microsoft.AspNetCore.All 2.1.23 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.1.25 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.23 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.25 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.10 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.12 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.0-preview.5.20279.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.3 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.1.23 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.25 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.10 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.12 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.0-preview.5.20278.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.3 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.1.12 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 5.0.0-preview.5.20278.3 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 5.0.3 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
- The IDE (VS / VS Code/ VS4Mac) you’re running on, and it’s version =
VS 2019 16.9
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (7 by maintainers)
Top Results From Across the Web
bUnit not updating bound property
When passing keys from bUnit, the MyValue property, which the input is bound to, doesn't get updated, even though the application works as ......
Read more >Passing parameters to components
bUnit comes with a number of ways to pass parameters to components under test: In tests written in .razor files, passing parameters is...
Read more >DebounceDelay property cause unit test to fail in UI for Blazor
I'm integrating bUnit to add unit test to blazor. Now i have a form with some TelerikTextBox and other components with DataAnnotationValidation.
Read more >[Solved]-Bunit + Radzen, input does not change-blazor
Coding example for the question Bunit + Radzen, input does not change-blazor.
Read more >probem unittesting with bunit in UI for Blazor
I'm using bUnit to test the Blazor Autocomplete; before the (latest (not sure though)) update the tests passed. The tests do the following:...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Final Workaround( end app tests, not AntDesign.Tests):
Although it works this issue brings up the following issues:
Should be part of the documentation since it can be useful to be able to unit test while using AntDesign in production… Anyway thanks for the snippet, it works great !