1111 xmlns : converters =" clr-namespace:Rubberduck.UI.Converters"
1212 Language =" {UICulture}"
1313 mc : Ignorable =" d"
14- d : DesignHeight =" 255 " d : DesignWidth =" 455 "
14+ d : DesignHeight =" 400 " d : DesignWidth =" 600 "
1515 d : DataContext =" {d:DesignInstance local:TestExplorerViewModel}" >
1616
1717 <UserControl .Resources>
4747
4848 <local : TestOutcomeImageSourceConverter x : Key =" OutcomeIconConverter" />
4949 <BooleanToVisibilityConverter x : Key =" BoolToVisibility" />
50- <converters : BoolToHiddenVisibilityConverter x : Key =" BoolToCollapsed" />
50+ <converters : MillisecondToTimeMagnitudeConverter x : Key =" FormattedTime" />
51+ <converters : InvertBoolValueConverter x : Key =" InvertBoolValue" />
5152
5253 <SolidColorBrush x : Key =" ToolBarToggleButtonVerticalBackground" Color =" Transparent" />
5354 <SolidColorBrush x : Key =" ToolBarButtonHover" Color =" #210080FF" />
246247 </Trigger >
247248 </Style .Triggers>
248249 </Style >
250+
249251 </UserControl .Resources>
250252
251253 <Grid >
252254 <Grid .RowDefinitions>
253255 <RowDefinition Height =" 30" />
254256 <RowDefinition Height =" 10" />
257+ <RowDefinition Height =" Auto" />
255258 <RowDefinition Height =" *" />
256259 </Grid .RowDefinitions>
257260
279282 <Separator />
280283
281284 <Menu Background =" Transparent" >
282- <MenuItem VerticalAlignment =" Center" Header =" {Resx ResxName=Rubberduck.Resources.UnitTesting.TestExplorer, Key=TestExplorer_RunMenuButtonText}" >
285+ <MenuItem VerticalAlignment =" Center" Header =" {Resx ResxName=Rubberduck.Resources.UnitTesting.TestExplorer, Key=TestExplorer_RunMenuButtonText}"
286+ IsEnabled =" {Binding Model.IsBusy, Converter={StaticResource InvertBoolValue}}" >
283287 <MenuItem .Icon>
284288 <Image Source =" {StaticResource RunImage}" Style =" {StaticResource ToolbarImageOpacity}" />
285289 </MenuItem .Icon>
343347 <Separator />
344348
345349 <Menu Background =" Transparent" >
346- <MenuItem VerticalAlignment =" Center" Header =" {Resx ResxName=Rubberduck.Resources.RubberduckUI, Key=Add}" >
350+ <MenuItem VerticalAlignment =" Center" Header =" {Resx ResxName=Rubberduck.Resources.RubberduckUI, Key=Add}"
351+ IsEnabled =" {Binding Model.IsBusy, Converter={StaticResource InvertBoolValue}}" >
347352 <MenuItem .Icon>
348353 <Image Source =" {StaticResource AddIcon}" Style =" {StaticResource ToolbarImageOpacity}" />
349354 </MenuItem .Icon>
426431 </ProgressBar >
427432
428433 <Border Grid.Row=" 2" Padding =" 2" >
434+ <StackPanel Orientation =" Horizontal" >
435+ <StackPanel .Resources>
436+ <converters : NonZeroToVisibilityConverter x : Key =" NonZeroToVisibility" />
437+ <BitmapImage x : Key =" IgnoredTestImage" UriSource =" pack://application:,,,/Rubberduck.Resources;component/Icons/Fugue/minus-white.png" />
438+ <BitmapImage x : Key =" InconclusiveTestImage" UriSource =" pack://application:,,,/Rubberduck.Resources;component/Icons/Fugue/exclamation.png" />
439+ <Style x : Key =" ResultsTestOutcomeStyle" TargetType =" TextBlock" >
440+ <Setter Property =" Margin" Value =" 4,0,12,0" />
441+ <Setter Property =" TextWrapping" Value =" WrapWithOverflow" />
442+ <Setter Property =" VerticalAlignment" Value =" Center" />
443+ </Style >
444+ <Style x : Key =" TestOutcomeIconStyle" TargetType =" Image" >
445+ <Setter Property =" Height" Value =" 16" />
446+ <Setter Property =" Width" Value =" 16" />
447+ <Setter Property =" VerticalAlignment" Value =" Center" />
448+ <Setter Property =" Margin" Value =" 3" />
449+ </Style >
450+ </StackPanel .Resources>
451+ <TextBlock Margin =" 2" Padding =" 4,2,4,2" FontWeight =" Bold" VerticalAlignment =" Center"
452+ Text =" {Resx ResxName=Rubberduck.Resources.UnitTesting.TestExplorer, Key=TestOutcome_SummaryCaption}" />
453+ <TextBlock Style =" {StaticResource ResultsTestOutcomeStyle}" Text =" {Binding Model.LastTestRunSummary, Mode=OneWay}" />
454+ <StackPanel Orientation =" Horizontal" Visibility =" {Binding Model.LastTestFailedCount, Mode=OneWay, Converter={StaticResource NonZeroToVisibility}}" >
455+ <Image Style =" {StaticResource TestOutcomeIconStyle}" Source =" {StaticResource RunFailedTestsImage}" Margin =" 4,0,4,0" />
456+ <TextBlock Style =" {StaticResource ResultsTestOutcomeStyle}" >
457+ <Run Text =" {Binding Model.LastTestFailedCount, Mode=OneWay}" />
458+ <Run Text =" {Resx ResxName=Rubberduck.Resources.UnitTesting.TestExplorer, Key=TestOutcome_Failed}" />
459+ </TextBlock >
460+ </StackPanel >
461+ <StackPanel Orientation =" Horizontal" Visibility =" {Binding Model.LastTestIgnoredCount, Mode=OneWay, Converter={StaticResource NonZeroToVisibility}}" >
462+ <Image Style =" {StaticResource TestOutcomeIconStyle}" Source =" {StaticResource IgnoredTestImage}" />
463+ <TextBlock Style =" {StaticResource ResultsTestOutcomeStyle}" >
464+ <Run Text =" {Binding Model.LastTestIgnoredCount, Mode=OneWay}" />
465+ <Run Text =" {Resx ResxName=Rubberduck.Resources.UnitTesting.TestExplorer, Key=TestOutcome_Ignored}" />
466+ </TextBlock >
467+ </StackPanel >
468+ <StackPanel Orientation =" Horizontal" Visibility =" {Binding Model.LastTestInconclusiveCount, Mode=OneWay, Converter={StaticResource NonZeroToVisibility}}" >
469+ <Image Style =" {StaticResource TestOutcomeIconStyle}" Source =" {StaticResource InconclusiveTestImage}" />
470+ <TextBlock Style =" {StaticResource ResultsTestOutcomeStyle}" >
471+ <Run Text =" {Binding Model.LastTestInconclusiveCount, Mode=OneWay}" />
472+ <Run Text =" {Resx ResxName=Rubberduck.Resources.UnitTesting.TestExplorer, Key=TestOutcome_Inconclusive}" />
473+ </TextBlock >
474+ </StackPanel >
475+ <StackPanel Orientation =" Horizontal" Visibility =" {Binding Model.LastTestSucceededCount, Mode=OneWay, Converter={StaticResource NonZeroToVisibility}}" >
476+ <Image Style =" {StaticResource TestOutcomeIconStyle}" Source =" {StaticResource RunPassedTestsImage}" />
477+ <TextBlock Style =" {StaticResource ResultsTestOutcomeStyle}" >
478+ <Run Text =" {Binding Model.LastTestSucceededCount, Mode=OneWay}" />
479+ <Run Text =" {Resx ResxName=Rubberduck.Resources.UnitTesting.TestExplorer, Key=TestOutcome_Succeeded}" />
480+ </TextBlock >
481+ </StackPanel >
482+ </StackPanel >
483+ </Border >
484+
485+ <Border Grid.Row=" 3" Padding =" 2" >
429486 <Grid >
430487 <controls : GroupingGrid x : Name =" TestGrid"
431488 ItemsSource =" {Binding Tests}"
432489 SelectionMode =" Extended"
433- ShowGroupingItemCount =" True" >
490+ ShowGroupingItemCount =" True"
491+ InitialExpandedState =" True" >
434492 <DataGrid .Columns>
435493 <DataGridTemplateColumn Header =" {Resx ResxName=Rubberduck.Resources.UnitTesting.TestExplorer, Key=TestExplorer_Outcome}" >
436494 <DataGridTemplateColumn .CellTemplate>
454512 <DataGridTemplateColumn Header =" {Resx ResxName=Rubberduck.Resources.UnitTesting.TestExplorer, Key=TestExplorer_QualifiedModuleName}" >
455513 <DataGridTemplateColumn .CellTemplate>
456514 <DataTemplate DataType =" vm:TestMethodViewModel" >
457- <TextBlock Text =" {Binding Method.Declaration.QualifiedModuleName}" />
515+ <TextBlock Text =" {Binding Method.Declaration.QualifiedModuleName}" Margin = " 0,0,4,0 " />
458516 </DataTemplate >
459517 </DataGridTemplateColumn .CellTemplate>
460518 </DataGridTemplateColumn >
461519 <DataGridTemplateColumn Header =" {Resx ResxName=Rubberduck.Resources.UnitTesting.TestExplorer, Key=TestExplorer_MethodName}" >
462520 <DataGridTemplateColumn .CellTemplate>
463521 <DataTemplate DataType =" vm:TestMethodViewModel" >
464- <TextBlock Text =" {Binding Method.Declaration.IdentifierName}" />
522+ <TextBlock Text =" {Binding Method.Declaration.IdentifierName}" Margin = " 0,0,4,0 " />
465523 </DataTemplate >
466524 </DataGridTemplateColumn .CellTemplate>
467525 </DataGridTemplateColumn >
468526 <DataGridTemplateColumn Header =" {Resx ResxName=Rubberduck.Resources.UnitTesting.TestExplorer, Key=TestExplorer_CategoryName}" >
469527 <DataGridTemplateColumn .CellTemplate>
470528 <DataTemplate DataType =" vm:TestMethodViewModel" >
471- <TextBlock Text =" {Binding Method.Category.Name}" />
529+ <TextBlock Text =" {Binding Method.Category.Name}" Margin = " 0,0,4,0 " />
472530 </DataTemplate >
473531 </DataGridTemplateColumn .CellTemplate>
474532 </DataGridTemplateColumn >
475533 <DataGridTemplateColumn Header =" {Resx ResxName=Rubberduck.Resources.UnitTesting.TestExplorer, Key=TestExplorer_Message}" >
476534 <DataGridTemplateColumn .CellTemplate>
477535 <DataTemplate DataType =" vm:TestMethodViewModel" >
478- <TextBlock Text =" {Binding Result.Output}" />
536+ <TextBlock Text =" {Binding Result.Output}" Margin = " 0,0,4,0 " />
479537 </DataTemplate >
480538 </DataGridTemplateColumn .CellTemplate>
481539 </DataGridTemplateColumn >
482540 <DataGridTemplateColumn Header =" {Resx ResxName=Rubberduck.Resources.UnitTesting.TestExplorer, Key=TestExplorer_Duration}" >
483541 <DataGridTemplateColumn .CellTemplate>
484542 <DataTemplate DataType =" vm:TestMethodViewModel" >
485- <TextBlock Text =" {Binding Result.Duration, StringFormat={}{0}ms} " />
543+ <TextBlock Text =" {Binding Result.Duration, Converter={StaticResource FormattedTime}} " TextAlignment = " Right " Margin = " 0,0,4,0 " />
486544 </DataTemplate >
487545 </DataGridTemplateColumn .CellTemplate>
488546 </DataGridTemplateColumn >
523581 </controls : GroupingGrid >
524582 </Grid >
525583 </Border >
526- <controls : BusyIndicator Grid.Row=" 2 " Width =" 120" Height =" 120" Visibility =" {Binding Model.IsBusy , Converter={StaticResource BoolToVisibility}}" />
584+ <controls : BusyIndicator Grid.Row=" 3 " Width =" 120" Height =" 120" Visibility =" {Binding Model.IsRefreshing , Converter={StaticResource BoolToVisibility}}" />
527585 </Grid >
528586</UserControl >
0 commit comments