Skip to content

Commit

Permalink
feat: Add Title bar test status reporting to UnitTestsControl
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinZikmund committed Jan 13, 2022
1 parent 4c6ed68 commit af84896
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ public sealed partial class UnitTestsControl : UserControl
private readonly TimeSpan DefaultUnitTestTimeout = TimeSpan.FromSeconds(60);
#endif

private ApplicationView _applicationView;

private List<TestCase> _testCases = new List<TestCase>();
private TestRun _currentRun;

Expand Down Expand Up @@ -88,6 +90,8 @@ public UnitTestsControl()
SampleChooserViewModel.Instance.SampleChanging += OnSampleChanging;
EnableConfigPersistence();
OverrideDebugProviderAsserts();

_applicationView = ApplicationView.GetForCurrentView();
}

private static void OverrideDebugProviderAsserts()
Expand Down Expand Up @@ -154,6 +158,7 @@ void Setter()
stopButton.IsEnabled = _cts != null && !_cts.IsCancellationRequested || !isRunning;
runningState.Text = isRunning ? "Running" : "Finished";
runStatus.Text = message;
_applicationView.Title = message;
}

await Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, Setter);
Expand Down

0 comments on commit af84896

Please sign in to comment.