Skip to content

Commit

Permalink
Slider Controls Feature Matrix UI Tests (#6)
Browse files Browse the repository at this point in the history
* 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
3 people authored Nov 18, 2024
1 parent e91dafa commit 91d0b15
Show file tree
Hide file tree
Showing 102 changed files with 1,354 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public void ResetBusyCount()
void OnPageBusy(IView sender, bool enabled)
{
// Verify that the page making the request is part of this activity
if (!PageIsInThisContext(sender))
if (!PageIsInThisContext(sender) && enabled)
{
return;
}
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ public override string ToString()
new GalleryPageFactory(() => new SwipeViewCoreGalleryPage(), "SwipeView Gallery"),
new GalleryPageFactory(() => new TimePickerCoreGalleryPage(), "Time Picker Gallery"),
new GalleryPageFactory(() => new WebViewCoreGalleryPage(), "WebView Gallery"),
new GalleryPageFactory(() => new SliderFeature(), "Slider Feature Matrix"),
};

public CorePageView(Page rootPage)
Expand Down
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>
Loading

0 comments on commit 91d0b15

Please sign in to comment.