Provide filter logic of TestNodes; starting with filtering by outcome #1155
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.
This PR is the first incremental step for issue #1148.
It provides the basic filter functionality of test nodes by supporting filtering by outcome. There's only one single use case supported yet: test results are already present from a test run and afterwards an outcome filter is applied programmatically. Then the test tree will display only the filtered nodes.
Further use cases will be supported in the next incremental steps:
So, it's not the intention that this filter functionality is already perfect. But I believe it's a good foundation for the next steps.
These changes do not yet have any effect on the user as the filters cannot be activated, so this PR could be merged without causing any side effects.
If things go as planned, the new filter class can be extended to support also duration and category filtering - and maybe name filtering sometime in the future. And also the other way around: I hope that we won't have to adapt any other code locations if we extend the filters. This applies especially for the test tree: displaying a filtered tree and the filter functionality is well separated.
I tested the filter functionality by misusing one of the existing toolbar buttons. So for example setting the filter programmatically to:
_model.TestCentricTestFilter.OutcomeFilter = new List<string>() { "Not Run", "Failed" };