Skip to content

Commit

Permalink
Merge pull request #5602 from IvenBach/Issue5520_Ignore_tests_toggle
Browse files Browse the repository at this point in the history
Add toggle to hide ignored tests
  • Loading branch information
retailcoder committed Oct 29, 2020
2 parents d53e06f + 3a03d52 commit bb60836
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 1 deletion.
6 changes: 6 additions & 0 deletions Rubberduck.Core/UI/UnitTesting/TestExplorerControl.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
<BitmapImage x:Key="OutcomeFail" UriSource="pack://application:,,,/Rubberduck.Resources;component/Icons/Fugue/cross-circle.png" />
<BitmapImage x:Key="OutcomeInconclusive" UriSource="pack://application:,,,/Rubberduck.Resources;component/Icons/Fugue/exclamation.png" />
<BitmapImage x:Key="OutcomeSucceeded" UriSource="pack://application:,,,/Rubberduck.Resources;component/Icons/Fugue/tick-circle.png" />
<BitmapImage x:Key="OutcomeIgnored" UriSource="pack://application:,,,/Rubberduck.Resources;component/Icons/Fugue/minus-white.png" />
<BitmapImage x:Key="IgnoreTestImage" UriSource="pack://application:,,,/Rubberduck.Resources;component/Icons/Fugue/flask-empty.png" />
<BitmapImage x:Key="UnignoreTestImage" UriSource="pack://application:,,,/Rubberduck.Resources;component/Icons/Fugue/flask-undo.png" />

Expand Down Expand Up @@ -231,6 +232,11 @@
IsChecked="{Binding Path=OutcomeFilter, Converter={StaticResource OutcomeFilterConverter}, ConverterParameter={x:Static local:TestExplorerOutcomeFilter.Succeeded}}" >
<Image Source="{StaticResource OutcomeSucceeded}" />
</ToggleButton>
<ToggleButton Style="{StaticResource ToolBarToggleStyle}"
ToolTip="{Resx ResxName=Rubberduck.Resources.RubberduckUI, Key=TestOutcome_Ignored}"
IsChecked="{Binding Path=OutcomeFilter, Converter={StaticResource OutcomeFilterConverter}, ConverterParameter={x:Static local:TestExplorerOutcomeFilter.Ignored}}">
<Image Source="{StaticResource OutcomeIgnored}" />
</ToggleButton>

<Separator />

Expand Down
3 changes: 2 additions & 1 deletion Rubberduck.Core/UI/UnitTesting/TestExplorerViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ public enum TestExplorerOutcomeFilter
Fail = 1 << 1,
Inconclusive = 1 << 2,
Succeeded = 1 << 3,
All = Unknown | Fail | Inconclusive | Succeeded
Ignored = 1 << 4,
All = Unknown | Fail | Inconclusive | Succeeded | Ignored
}

internal sealed class TestExplorerViewModel : ViewModelBase, INavigateSelection, IDisposable
Expand Down
9 changes: 9 additions & 0 deletions Rubberduck.Resources/RubberduckUI.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Rubberduck.Resources/RubberduckUI.resx
Original file line number Diff line number Diff line change
Expand Up @@ -1956,4 +1956,7 @@ Do you want to proceed?</value>
<data name="AnnotateDeclarationDialog_AdjustAttributeLabel" xml:space="preserve">
<value>Add/Adjust attribute</value>
</data>
<data name="TestOutcome_Ignored" xml:space="preserve">
<value>Ignored</value>
</data>
</root>

0 comments on commit bb60836

Please sign in to comment.