-
Notifications
You must be signed in to change notification settings - Fork 722
Add v2 version of fake driver #4222
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: v2_develop
Are you sure you want to change the base?
Conversation
…lt unless user explicitly forces 16
… for 16 color mode
Fixes for VTS enabled
Fix SendKeys in facade.
…acks do not need to happen in Iteration method
@BDisp the MapConsoleKeyInfoToKeyCode that you added in SendKeys has some issues
This returns Which is invalid input It crashes: [Fact]
[AutoInitShutdown]
public void TestAutoAppend_AfterCloseKey_NoAutocomplete ()
{
TextField tf = GetTextFieldsInViewSuggesting ("fish");
// f is typed and suggestion is "fish"
Application.Driver?.SendKeys ('f', ConsoleKey.F, false, false, false); Crashes like this
I have reverted its use in d4badc0 |
Behold a green tick! |
What's wrong is the test sending a 'f' instead a 'F'. What's differentiate upper from lower case is the shift flag. So, you are doing the same wrong. Only replace the test with 'F'. |
The PR tznind#184 leverage the hard coded |
Fix SendKeys method and add extension to unit test
V2 fake driver fix
I think iteration is running on more than 1 thread. I am exploring in my We can see for any fluent test it can crash in many ways in layout and in draw. I need to add thread id tracking to main loop to see if it is ever hit from more than 1 thread. Critically i can trigger the error just running a single test over and over so its not knock on effects of multiple tests at once See: #4225 I will start by detecting any time iteration is on other thread id, but then also look at layout or draw. If any of them is running on non main UI thread it is bad. |
One way I used to resolve the fluent unit tests, is in the PR #4210. |
Fixes
FakeDriver
with av2fake
or equivalent #3947Requirements
Support creating
Application
andDriver
level tests for v2.[SetupFakeDriver]
[AutoInitShutdown]
These tests need:
Implementation
To enable this workflow we first need to pull all the Dependency Injection elements out into a shared provider factory. This lets us create classes but swap out Mocks and fakes as needed.
This lets us inject fakes.
Test Assumption Changes
Run
multiple views one after the other without first disposing the first. This is not a sensible activity and so part of v2.Pull Request checklist:
CTRL-K-D
to automatically reformat your files before committing.dotnet test
before commit///
style comments)