forked from dotnet/maui
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Slider Controls Feature Matrix UI Tests (#6)
* Added UI Test cases For Slider Control * Modified Files for Slider Control * Namespace correction in SliderFeatureTests * Namespace correction in SliderFeatureTests file * Added IOS Screenshots * Added Android Screenshots * Changed default values for reset button * Added Screenshots for IOS and Android * Removed Difference Snapshots from IOS and Android * Modified slider control sample * Added ValueChanged label * Refactor assertions syntax * Removed test case * [Android] Page.IsBusy activity indicators gets stuck/causes multiple to be displayed (dotnet#23745) * Page.IsBusy activity idicator * Added snapshots --------- Co-authored-by: NafeelaNazhir <[email protected]> Co-authored-by: Jakub Florkowski <[email protected]>
- Loading branch information
1 parent
e91dafa
commit 91d0b15
Showing
102 changed files
with
1,354 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+8.78 KB
src/Controls/tests/TestCases.Android.Tests/snapshots/android/Issue23674Test.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+97.2 KB
...roid.Tests/snapshots/android/Slider_ChangeBackgroundColor_VerifyVisualState.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+97.1 KB
...id.Tests/snapshots/android/Slider_ChangeFlowDirection_RTL_VerifyVisualState.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+97.1 KB
...ndroid.Tests/snapshots/android/Slider_ChangeMaxTrackColor_VerifyVisualState.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+97.1 KB
...ndroid.Tests/snapshots/android/Slider_ChangeMinTrackColor_VerifyVisualState.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+97.1 KB
...s.Android.Tests/snapshots/android/Slider_ChangeThumbColor_VerifyVisualState.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+100 KB
...oid.Tests/snapshots/android/Slider_ChangeThumbImageSource_VerifyVisualState.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+101 KB
...napshots/android/Slider_FlowDirection_RTL_SetMaximumValue_VerifyVisualState.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+108 KB
...napshots/android/Slider_FlowDirection_RTL_SetMinimumValue_VerifyVisualState.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+99.3 KB
...Tests/snapshots/android/Slider_FlowDirection_RTL_SetValue_VerifyVisualState.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+97.2 KB
...ts/snapshots/android/Slider_SetBackgroundColorAndIsEnable_VerifyVisualState.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+97.2 KB
...apshots/android/Slider_SetBackgroundColorAndMaxTrackColor_VerifyVisualState.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+97.2 KB
...apshots/android/Slider_SetBackgroundColorAndMinTrackColor_VerifyVisualState.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+97.1 KB
.../snapshots/android/Slider_SetBackgroundColorAndThumbColor_VerifyVisualState.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+97.1 KB
...oid.Tests/snapshots/android/Slider_SetEnabledStateToFalse_VerifyVisualState.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+97.1 KB
...snapshots/android/Slider_SetFlowDirectionAndMaxTrackColor_VerifyVisualState.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+97.1 KB
...snapshots/android/Slider_SetFlowDirectionAndMinTrackColor_VerifyVisualState.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+97.2 KB
...ts/snapshots/android/Slider_SetIsEnableAndBackgroundColor_VerifyVisualState.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+97.1 KB
...ests/snapshots/android/Slider_SetIsEnableAndMaxTrackColor_VerifyVisualState.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+97.1 KB
...ests/snapshots/android/Slider_SetIsEnableAndMinTrackColor_VerifyVisualState.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+97.1 KB
...d.Tests/snapshots/android/Slider_SetIsEnableAndThumbColor_VerifyVisualState.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+97.2 KB
...s/snapshots/android/Slider_SetIsVisibleAndBackgroundColor_VerifyVisualState.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+97.1 KB
...sts/snapshots/android/Slider_SetIsVisibleAndMaxTrackColor_VerifyVisualState.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+97.1 KB
...sts/snapshots/android/Slider_SetIsVisibleAndMinTrackColor_VerifyVisualState.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+97.1 KB
....Tests/snapshots/android/Slider_SetIsVisibleAndThumbColor_VerifyVisualState.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+97.2 KB
...ts/snapshots/android/Slider_SetMaxTrackAndBackgroundColor_VerifyVisualState.png
Oops, something went wrong.
Binary file added
BIN
+97.1 KB
...ests/snapshots/android/Slider_SetMaxTrackAndMinTrackColor_VerifyVisualState.png
Oops, something went wrong.
Binary file added
BIN
+97.1 KB
...d.Tests/snapshots/android/Slider_SetMaxTrackAndThumbColor_VerifyVisualState.png
Oops, something went wrong.
Binary file added
BIN
+99.3 KB
...d.Tests/snapshots/android/Slider_SetMaxTrackColorAndValue_VerifyVisualState.png
Oops, something went wrong.
Binary file added
BIN
+97.1 KB
...napshots/android/Slider_SetMaxTrackColorTestFlowDirection_VerifyVisualState.png
Oops, something went wrong.
Binary file added
BIN
+99.9 KB
...Android.Tests/snapshots/android/Slider_SetMaximumAndChangeFlowDirection_RTL.png
Oops, something went wrong.
Binary file added
BIN
+97.2 KB
...ts/snapshots/android/Slider_SetMinTrackAndBackgroundColor_VerifyVisualState.png
Oops, something went wrong.
Binary file added
BIN
+97.1 KB
...ests/snapshots/android/Slider_SetMinTrackAndMaxTrackColor_VerifyVisualState.png
Oops, something went wrong.
Binary file added
BIN
+97.1 KB
...d.Tests/snapshots/android/Slider_SetMinTrackAndThumbColor_VerifyVisualState.png
Oops, something went wrong.
Binary file added
BIN
+106 KB
...d.Tests/snapshots/android/Slider_SetMinTrackColorAndValue_VerifyVisualState.png
Oops, something went wrong.
Binary file added
BIN
+97.1 KB
...napshots/android/Slider_SetMinTrackColorTestFlowDirection_VerifyVisualState.png
Oops, something went wrong.
Binary file added
BIN
+106 KB
...Android.Tests/snapshots/android/Slider_SetMinimumAndChangeFlowDirection_RTL.png
Oops, something went wrong.
Binary file added
BIN
+97.1 KB
...Tests/snapshots/android/Slider_SetThumbAndBackgroundColor_VerifyVisualState.png
Oops, something went wrong.
Binary file added
BIN
+97.1 KB
...d.Tests/snapshots/android/Slider_SetThumbAndMaxTrackColor_VerifyVisualState.png
Oops, something went wrong.
Binary file added
BIN
+97.1 KB
...d.Tests/snapshots/android/Slider_SetThumbAndMinTrackColor_VerifyVisualState.png
Oops, something went wrong.
Binary file added
BIN
+100 KB
...snapshots/android/Slider_SetThumbColorAndThumbImageSource_VerifyVisualState.png
Oops, something went wrong.
Binary file added
BIN
+100 KB
...snapshots/android/Slider_SetThumbImageSourceAndThumbColor_VerifyVisualState.png
Oops, something went wrong.
Binary file added
BIN
+97.9 KB
...sts/snapshots/android/Slider_SetValueAndFlowDirection_RTL_VerifyVisualState.png
Oops, something went wrong.
Binary file added
BIN
+97.9 KB
...d.Tests/snapshots/android/Slider_SetValueAndMaxTrackColor_VerifyVisualState.png
Oops, something went wrong.
Binary file added
BIN
+105 KB
...d.Tests/snapshots/android/Slider_SetValueAndMinTrackColor_VerifyVisualState.png
Oops, something went wrong.
Binary file added
BIN
+101 KB
...ests/snapshots/android/Slider_SetValueAndThumbImageSource_VerifyVisualState.png
Oops, something went wrong.
Binary file added
BIN
+96.3 KB
...droid.Tests/snapshots/android/Slider_SetVisibilityToFalse_VerifyVisualState.png
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
78 changes: 78 additions & 0 deletions
78
src/Controls/tests/TestCases.HostApp/FeatureMatrix/SliderFeature.xaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | ||
xmlns:local="clr-namespace:Maui.Controls.Sample" | ||
x:Class="Maui.Controls.Sample.SliderFeature" | ||
Title="SliderFeature"> | ||
<ContentPage.BindingContext> | ||
<local:SliderViewModel x:Name="viewModel" /> | ||
</ContentPage.BindingContext> | ||
<StackLayout Padding="10" VerticalOptions="{OnPlatform WinUI='CenterAndExpand'}" HorizontalOptions="Center"> | ||
<StackLayout x:Name="sliderContainer" HorizontalOptions="Center" VerticalOptions="Start"> | ||
<Slider WidthRequest="300" Maximum="{Binding Maximum}" Minimum="{Binding Minimum}" Value="{Binding Value}" MaximumTrackColor="Red" HeightRequest="50" AutomationId="SliderControl" /> | ||
</StackLayout> | ||
<Grid RowSpacing="5" HorizontalOptions="Center"> | ||
<Grid.ColumnDefinitions> | ||
<ColumnDefinition Width="1*" /> | ||
<ColumnDefinition Width="1*" /> | ||
</Grid.ColumnDefinitions> | ||
<StackLayout Grid.Column="0" Spacing="6" Margin="{OnPlatform Android='30,20,0,0', iOS='10,20,0,0', MacCatalyst='50,40,0,0'}"> | ||
<!-- Minimum Value --> | ||
<Label Text="{Binding Minimum, StringFormat='Minimum: {0}'}" FontSize="15" AutomationId="MinimumValueLabel"/> | ||
<Entry x:Name="MinimumEntry" AutomationId="MinimumEntry" TextChanged="OnMinimumChanged" Keyboard="Numeric" HorizontalOptions="Start" WidthRequest="100" /> | ||
<!-- Maximum Value --> | ||
<Label Text="{Binding Maximum, StringFormat='Maximum: {0}'}" FontSize="15" AutomationId="MaximumValueLabel"/> | ||
<Entry x:Name="MaximumEntry" AutomationId="MaximumEntry" TextChanged="OnMaximumChanged" Keyboard="Numeric" HorizontalOptions="Start" WidthRequest="100" /> | ||
<!-- Current Value --> | ||
<Label Text="{Binding Value, StringFormat='Value: {0:F0}'}" FontSize="15" AutomationId="ValueLabel"/> | ||
<Entry x:Name="ValueEntry" AutomationId="ValueEntry" TextChanged="OnValueChanged" Keyboard="Numeric" HorizontalOptions="Start" WidthRequest="100" /> | ||
<!-- Flow Direction --> | ||
<Label Text="Flow Direction:" FontSize="15" /> | ||
<StackLayout Orientation="Horizontal" > | ||
<RadioButton x:Name="FlowDirectionLTR" AutomationId="FlowDirectionLTR" GroupName="FlowDirection" Content="LTR" IsChecked="True" FontSize="14" CheckedChanged="OnFlowDirectionChanged" /> | ||
<RadioButton x:Name="FlowDirectionRTL" AutomationId="FlowDirectionRTL" GroupName="FlowDirection" Content="RTL" FontSize="14" CheckedChanged="OnFlowDirectionChanged" /> | ||
</StackLayout> | ||
<!-- Enable/Disable --> | ||
<Label Text="Is Enabled:" FontSize="15" /> | ||
<StackLayout Orientation="Horizontal" > | ||
<RadioButton x:Name="IsEnabledTrueRadio" AutomationId="IsEnabledTrueRadio" GroupName="IsEnabled" Content="True" IsChecked="True" FontSize="14" CheckedChanged="OnIsEnabledCheckedChanged" /> | ||
<RadioButton x:Name="IsEnabledFalseRadio" AutomationId="IsEnabledFalseRadio" GroupName="IsEnabled" Content="False" FontSize="14" CheckedChanged="OnIsEnabledCheckedChanged" /> | ||
</StackLayout> | ||
<!-- Visible/Invisible --> | ||
<Label Text="Is Visible:" FontSize="15" /> | ||
<StackLayout Orientation="Horizontal" > | ||
<RadioButton x:Name="IsVisibleTrueRadio" AutomationId="IsVisibleTrueRadio" GroupName="IsVisible" Content="True" IsChecked="True" FontSize="14" CheckedChanged="OnIsVisibleCheckedChanged" /> | ||
<RadioButton x:Name="IsVisibleFalseRadio" AutomationId="IsVisibleFalseRadio" GroupName="IsVisible" Content="False" FontSize="14" CheckedChanged="OnIsVisibleCheckedChanged" /> | ||
</StackLayout> | ||
<Label FontSize="15" Text="Triggered Events: " IsVisible="{Binding IsTriggeredEventVisible}"/> | ||
<Label x:Name="ValueChangedStatusLabel" FontSize="15" AutomationId="ValueChangedStatusLabel" Text="{Binding ValueChangedStatus}" /> | ||
<Label x:Name="DragStartStatusLabel" FontSize="15" AutomationId="DragStartStatusLabel" Text="{Binding DragStartStatus}" /> | ||
<Label x:Name="DragCompletedStatusLabel" FontSize="15" AutomationId="DragCompletedStatusLabel" Text="{Binding DragCompletedStatus}" /> | ||
</StackLayout> | ||
<StackLayout Grid.Column="1" Spacing="8" Margin="{OnPlatform Android='20,20,0,0', WinUI='150,0,0,0', iOS='20,20,0,0', MacCatalyst='70,40,0,0'}"> | ||
<!-- Thumb Color --> | ||
<Label Text="Thumb Color:" FontSize="15" HorizontalOptions="Start" /> | ||
<Button x:Name="ThumbColorButton" AutomationId="ThumbColorButton" Text="Green" | ||
Clicked="OnThumbColorButtonClicked" WidthRequest="100" HorizontalOptions="Start" /> | ||
<!-- Minimum Track Color --> | ||
<Label Text="Minimum Track Color:" FontSize="15" HorizontalOptions="Start" /> | ||
<Button x:Name="MinTrackColorButton" AutomationId="MinTrackColorButton" Text="Fuchsia" | ||
Clicked="OnMinTrackColorButtonClicked" WidthRequest="100" HorizontalOptions="Start" /> | ||
<!-- Maximum Track Color --> | ||
<Label Text="Maximum Track Color:" FontSize="15" HorizontalOptions="Start" /> | ||
<Button x:Name="MaxTrackColorButton" AutomationId="MaxTrackColorButton" Text="Red" | ||
Clicked="OnMaxTrackColorButtonClicked" WidthRequest="100" HorizontalOptions="Start" /> | ||
<!-- Background Color --> | ||
<Label Text="Background Color:" FontSize="15" HorizontalOptions="Start" /> | ||
<Button x:Name="BackgroundColorButton" AutomationId="BackgroundColorButton" Text="Yellow" | ||
Clicked="OnBackgroundColorButtonClicked" WidthRequest="100" HorizontalOptions="Start" /> | ||
<!-- Thumb Image --> | ||
<Label Text="Thumb Image:" FontSize="15" HorizontalOptions="Start" /> | ||
<Button x:Name="ThumbImageSourceButton" AutomationId="ThumbImageSourceButton" Text="Add Image" | ||
Clicked="OnThumbImageSourceButtonClicked" WidthRequest="100" HorizontalOptions="Start" /> | ||
<Label Text="Reset Button:" FontSize="15" HorizontalOptions="Start" /> | ||
<Button x:Name="ResetButton" AutomationId="ResetButton" Text="Reset" Clicked="OnResetButtonClicked" HorizontalOptions="Start" WidthRequest="100" /> | ||
</StackLayout> | ||
</Grid> | ||
</StackLayout> | ||
</ContentPage> |
Oops, something went wrong.