Skip to content

Commit

Permalink
"IsDeterminate" was misleading in the ProgressBarPage. (#2383)
Browse files Browse the repository at this point in the history
* "IsDeterminate" was misleading in the ProgressBarPage.

* Fixed tests after PR review
  • Loading branch information
carldebilly authored May 6, 2020
1 parent 6ab6d30 commit 74aa5f2
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
10 changes: 5 additions & 5 deletions dev/ProgressBar/InteractionTests/ProgressBarTests.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.

using System;
Expand Down Expand Up @@ -199,10 +199,10 @@ public void ChangeStateTest()

ToggleButton showPausedCheckBox = FindElement.ByName<ToggleButton>("ShowPausedCheckBox");
ToggleButton showErrorCheckBox = FindElement.ByName<ToggleButton>("ShowErrorCheckBox");
ToggleButton isIndeterminateCheckBox = FindElement.ByName<ToggleButton>("ShowIsDeterminateCheckBox");
ToggleButton isIndeterminateCheckBox = FindElement.ByName<ToggleButton>("ShowIsIndeterminateCheckBox");
TextBlock showPausedText = FindElement.ByName<TextBlock>("ShowPausedText");
TextBlock showErrorText = FindElement.ByName<TextBlock>("ShowErrorText");
TextBlock isIndeterminateText = FindElement.ByName<TextBlock>("ShowIsDeterminateText");
TextBlock isIndeterminateText = FindElement.ByName<TextBlock>("ShowIsIndeterminateText");
TextBlock visualStateText = FindElement.ByName<TextBlock>("VisualStateText");

Verify.IsFalse(Convert.ToBoolean(showPausedText.DocumentText));
Expand Down Expand Up @@ -374,10 +374,10 @@ public void ReTemplateChangeStateTest()

ToggleButton showPausedCheckBox = FindElement.ByName<ToggleButton>("ShowPausedCheckBox");
ToggleButton showErrorCheckBox = FindElement.ByName<ToggleButton>("ShowErrorCheckBox");
ToggleButton isIndeterminateCheckBox = FindElement.ByName<ToggleButton>("ShowIsDeterminateCheckBox");
ToggleButton isIndeterminateCheckBox = FindElement.ByName<ToggleButton>("ShowIsIndeterminateCheckBox");
TextBlock showPausedText = FindElement.ByName<TextBlock>("ShowPausedText");
TextBlock showErrorText = FindElement.ByName<TextBlock>("ShowErrorText");
TextBlock isIndeterminateText = FindElement.ByName<TextBlock>("ShowIsDeterminateText");
TextBlock isIndeterminateText = FindElement.ByName<TextBlock>("ShowIsIndeterminateText");
TextBlock visualStateText = FindElement.ByName<TextBlock>("VisualStateText");

Verify.IsFalse(Convert.ToBoolean(showPausedText.DocumentText));
Expand Down
8 changes: 4 additions & 4 deletions dev/ProgressBar/TestUI/ProgressBarPage.xaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License. See LICENSE in the project root for license information. -->
<!-- Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License. See LICENSE in the project root for license information. -->
<local:TestPage
x:Class="MUXControlsTestApp.ProgressBarPage"
x:Name="ProgressBarTestPage"
Expand Down Expand Up @@ -36,7 +36,7 @@
VerticalAlignment="Center"
AutomationProperties.Name="TestProgressBar"
HorizontalAlignment="Left"
IsIndeterminate="{x:Bind ShowIsDeterminateCheckBox.IsChecked, Converter={StaticResource NullableBooleanToBooleanConverter}, Mode=OneWay}"
IsIndeterminate="{x:Bind ShowIsIndeterminateCheckBox.IsChecked, Converter={StaticResource NullableBooleanToBooleanConverter}, Mode=OneWay}"
ShowPaused="{x:Bind ShowPausedCheckBox.IsChecked, Converter={StaticResource NullableBooleanToBooleanConverter}, Mode=OneWay}"
ShowError="{x:Bind ShowErrorCheckBox.IsChecked, Converter={StaticResource NullableBooleanToBooleanConverter}, Mode=OneWay}"/>
</StackPanel>
Expand Down Expand Up @@ -95,7 +95,7 @@
<TextBlock Text="States"/>
<CheckBox x:Name="ShowPausedCheckBox" AutomationProperties.Name="ShowPausedCheckBox" Content="ShowPaused" />
<CheckBox x:Name="ShowErrorCheckBox" AutomationProperties.Name="ShowErrorCheckBox" Content="ShowError"/>
<CheckBox x:Name="ShowIsDeterminateCheckBox" AutomationProperties.Name="ShowIsDeterminateCheckBox" Content="IsDeterminate"/>
<CheckBox x:Name="ShowIsIndeterminateCheckBox" AutomationProperties.Name="ShowIsIndeterminateCheckBox" Content="IsIndeterminate"/>
</StackPanel>

<StackPanel Style="{ThemeResource StandardGroupingStackPanel}" Margin="0,16,0,0">
Expand Down Expand Up @@ -123,7 +123,7 @@
<TextBlock AutomationProperties.Name="ShowErrorText" Text="{x:Bind ShowErrorCheckBox.IsChecked, Mode=OneWay}"/>

<TextBlock Text="Is indeterminate:" Margin="0, 20, 0, 0" FontSize="20"/>
<TextBlock AutomationProperties.Name="ShowIsDeterminateText" Text="{x:Bind ShowIsDeterminateCheckBox.IsChecked, Mode=OneWay}"/>
<TextBlock AutomationProperties.Name="ShowIsIndeterminateText" Text="{x:Bind ShowIsIndeterminateCheckBox.IsChecked, Mode=OneWay}"/>

<TextBlock x:Name="VisualStateText" AutomationProperties.Name="VisualStateText" Margin="0, 20, 0, 0" />
<Button x:Name="NavigateToReTemplatePage" AutomationProperties.Name="NavigateToReTemplatePage">Progress Bar Re-Template Page</Button>
Expand Down
8 changes: 4 additions & 4 deletions dev/ProgressBar/TestUI/ProgressBarReTemplatePage.xaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<local:TestPage
<local:TestPage
x:Class="MUXControlsTestApp.ProgressBarReTemplatePage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Expand Down Expand Up @@ -313,7 +313,7 @@
VerticalAlignment="Center"
AutomationProperties.Name="TestProgressBar"
HorizontalAlignment="Left"
IsIndeterminate="{x:Bind ShowIsDeterminateCheckBox.IsChecked, Converter={StaticResource NullableBooleanToBooleanConverter}, Mode=OneWay}"
IsIndeterminate="{x:Bind ShowIsIndeterminateCheckBox.IsChecked, Converter={StaticResource NullableBooleanToBooleanConverter}, Mode=OneWay}"
ShowPaused="{x:Bind ShowPausedCheckBox.IsChecked, Converter={StaticResource NullableBooleanToBooleanConverter}, Mode=OneWay}"
ShowError="{x:Bind ShowErrorCheckBox.IsChecked, Converter={StaticResource NullableBooleanToBooleanConverter}, Mode=OneWay}"/>
</StackPanel>
Expand Down Expand Up @@ -372,7 +372,7 @@
<TextBlock Text="States"/>
<CheckBox x:Name="ShowPausedCheckBox" AutomationProperties.Name="ShowPausedCheckBox" Content="ShowPaused" />
<CheckBox x:Name="ShowErrorCheckBox" AutomationProperties.Name="ShowErrorCheckBox" Content="ShowError"/>
<CheckBox x:Name="ShowIsDeterminateCheckBox" AutomationProperties.Name="ShowIsDeterminateCheckBox" Content="IsDeterminate"/>
<CheckBox x:Name="ShowIsIndeterminateCheckBox" AutomationProperties.Name="ShowIsIndeterminateCheckBox" Content="IsIndeterminate"/>
</StackPanel>

<StackPanel Style="{ThemeResource StandardGroupingStackPanel}" Margin="0,16,0,0">
Expand Down Expand Up @@ -400,7 +400,7 @@
<TextBlock AutomationProperties.Name="ShowErrorText" Text="{x:Bind ShowErrorCheckBox.IsChecked, Mode=OneWay}"/>

<TextBlock Text="Is indeterminate:" Margin="0, 20, 0, 0" FontSize="20"/>
<TextBlock AutomationProperties.Name="ShowIsDeterminateText" Text="{x:Bind ShowIsDeterminateCheckBox.IsChecked, Mode=OneWay}"/>
<TextBlock AutomationProperties.Name="ShowIsIndeterminateText" Text="{x:Bind ShowIsIndeterminateCheckBox.IsChecked, Mode=OneWay}"/>

<TextBlock x:Name="VisualStateText" AutomationProperties.Name="VisualStateText" Margin="0, 20, 0, 0"/>
</StackPanel>
Expand Down

0 comments on commit 74aa5f2

Please sign in to comment.