Add SetVoidResult to Focus handlers with tests #524
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull request description
Fixes #522
Adds to
SetVoidResulttoFocusAsyncInvocationHandler&FocusOnNavigateHandler. Without it, if consumer wasawaitingthe result of the call to respective js, aTaskwithStatus = WaitingForActivationwas returned. This way the call was never finishing. AddingSetVoidResultmarkes the returned task as completed.Tests
I figured the best way to find out if task was completed was to add a boolean after the call in question. If task was completed, the boolean is set to true. That boolean property is later asserted in the test. In both cases the tests do not pass without
SetVoidResult.Testing this in
FocusOnNavigateHandlerrequired me to create a derived component, so I can actually add the boolean property.PR meta checklist
mainbranch for codeor targeted at
stablebranch for documentation that is live on bunit.dev.Code PR specific checklist