-
Notifications
You must be signed in to change notification settings - Fork 31
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
Disable TextFilter when no project is loaded #1171
Conversation
While testing this functionality, I noticed another issue with the filters which doesn't work as expected: I fixed this issue by calling method |
I added some tests for these use cases. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. If it's easy to do, I suggest a single view property to enable filters.
@@ -76,6 +76,7 @@ public void OnTestUnloaded() | |||
{ | |||
ClearTree(); | |||
_view.OutcomeFilter.Enabled = false; | |||
_view.TextFilter.Enabled = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't it be cleaner for the view to have a single property to enable filters?
@@ -50,6 +50,7 @@ public override void OnTestLoaded(TestNode testNode, VisualState visualState) | |||
SetDefaultInitialExpansion(); | |||
|
|||
_view.OutcomeFilter.Enabled = true; | |||
_view.TextFilter.Enabled = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto.
You are definitely right. This is much cleaner! |
…ble all filter all at once
Great work! |
I have noticed one issue with the new TextFilter (#1161) that I would like to fix with this PR:
We actually want the filters to be disabled when no project is loaded. And that's how we implemented it already for the OutcomeFilter.
However I missed to add this for the new TextFilter. This PR now makes up for this!
(File: DisplayStrategy.cs and NUnitTreeDisplayStrategy.cs)