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
SpecFlow Section in app.config or content of specflow.json
No response
Issue Description
I have na MVVM application that has various ViewModels for different aspects of the project. In the MainWindowViewModel, I have a ProjectViewModel that will need to be instantiated based on the project that is open. As the projects are heavy and needs deserialization to load everytime, I am running the OpenProject method as an async task.
This async OpenProject task has a part where we start the scope of the project in the main UI thread (_dispatcher) instead of the background task thread. Everything works fine when I am running the application. However, when running the OpenProject method with Specflow for acceptance testing, it goes into a loop after _dispatcher.Invoke. Could you please suggest what could be going wrong here?
Steps to Reproduce
Create an async task and run a dispatcher.invoke within it, like below.
SpecFlow Version
3.9.22
Which test runner are you using?
xUnit
Test Runner Version Number
2.4.2
.NET Implementation
.NET 6.0
Project Format of the SpecFlow project
Sdk-style project format
.feature.cs files are generated using
SpecFlow.Tools.MsBuild.Generation NuGet package
Test Execution Method
Visual Studio Test Explorer
SpecFlow Section in app.config or content of specflow.json
No response
Issue Description
I have na MVVM application that has various ViewModels for different aspects of the project. In the MainWindowViewModel, I have a ProjectViewModel that will need to be instantiated based on the project that is open. As the projects are heavy and needs deserialization to load everytime, I am running the OpenProject method as an async task.
`Dispatcher _dispatcher = Dispatcher.CurrentDispatcher;
public async Task OpenProject()
{
dataCard = await Task.Factory.StartNew(() => _pManager.Deserialize());
_dispatcher.Invoke((Action)delegate
{
_pManager.BeginNewScope(dataCard);
});
}`
This async OpenProject task has a part where we start the scope of the project in the main UI thread (_dispatcher) instead of the background task thread. Everything works fine when I am running the application. However, when running the OpenProject method with Specflow for acceptance testing, it goes into a loop after _dispatcher.Invoke. Could you please suggest what could be going wrong here?
Steps to Reproduce
Create an async task and run a dispatcher.invoke within it, like below.
'Dispatcher _dispatcher = Dispatcher.CurrentDispatcher;
public async Task OpenProject()
{
dataCard = await Task.Factory.StartNew(() => some_method);
_dispatcher.Invoke((Action)delegate
{
some_command;
});
}'
Link to Repro Project
No response
The text was updated successfully, but these errors were encountered: