-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[Testing] Feature Matrix UITest Cases for TabbedPage #31572
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
kubaflo
merged 8 commits into
dotnet:inflight/current
from
TamilarasanSF4853:feature-matrix-tabbedpage
Mar 23, 2026
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
0f394e8
added control page and options page
TamilarasanSF4853 d90cc80
added Android and iOS snapshots
TamilarasanSF4853 eee7631
added new templates and snapshots
TamilarasanSF4853 d7424a6
added mac and windows snapshots
TamilarasanSF4853 b861549
added snapshots
TamilarasanSF4853 9440f7e
added changes
TamilarasanSF4853 c15474a
added images
TamilarasanSF4853 043c922
added images
TamilarasanSF4853 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Binary file added
BIN
+140 KB
...id.Tests/snapshots/android/TabbedPage_BarBackground_And_BarTextColor_Verify.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
+155 KB
...es.Android.Tests/snapshots/android/TabbedPage_BarBackground_Gradient_Verify.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
+140 KB
...Cases.Android.Tests/snapshots/android/TabbedPage_BarBackground_Solid_Verify.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
+138 KB
...sts/snapshots/android/TabbedPage_BarBackground_With_SelectedTabColor_Verify.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
+139 KB
...s/snapshots/android/TabbedPage_BarBackground_With_UnselectedTabColor_Verify.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
+139 KB
...Tests/snapshots/android/TabbedPage_BarTextColor_And_SelectedTabColor_Verify.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
+139 KB
...sts/snapshots/android/TabbedPage_BarTextColor_And_UnselectedTabColor_Verify.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
+138 KB
...ts/TestCases.Android.Tests/snapshots/android/TabbedPage_BarTextColor_Verify.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
+138 KB
...s/TestCases.Android.Tests/snapshots/android/TabbedPage_FlowDirection_Verify.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
+111 KB
...es.Android.Tests/snapshots/android/TabbedPage_IconImageSource_Change_Verify.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
+138 KB
...oid.Tests/snapshots/android/TabbedPage_InitialState_VerifyFunctionalState_1.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
+138 KB
...oid.Tests/snapshots/android/TabbedPage_InitialState_VerifyFunctionalState_2.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
+137 KB
...s.Android.Tests/snapshots/android/TabbedPage_InitialState_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
+115 KB
...sts/TestCases.Android.Tests/snapshots/android/TabbedPage_InsertTabAt_Verify.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
+217 KB
...roid.Tests/snapshots/android/TabbedPage_ItemSource_And_SelectedItems_Verify.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
+294 KB
...ests/TestCases.Android.Tests/snapshots/android/TabbedPage_ItemSource_Verify.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
+198 KB
...droid.Tests/snapshots/android/TabbedPage_ItemTemplate_And_ItemSource_Verify.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
+114 KB
...ts/TestCases.Android.Tests/snapshots/android/TabbedPage_ItemTemplate_Verify.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
+138 KB
...d.Tests/snapshots/android/TabbedPage_SelectedAndUnselectedTabColor_Verify_1.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
+138 KB
...d.Tests/snapshots/android/TabbedPage_SelectedAndUnselectedTabColor_Verify_2.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
+138 KB
...s/TestCases.Android.Tests/snapshots/android/TabbedPage_SelectedItems_Verify.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
+137 KB
...estCases.Android.Tests/snapshots/android/TabbedPage_SelectedTabColor_Verify.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
+138 KB
...tCases.Android.Tests/snapshots/android/TabbedPage_UnselectedTabColor_Verify.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
18 changes: 18 additions & 0 deletions
18
src/Controls/tests/TestCases.HostApp/FeatureMatrix/TabbedPage/TabbedPageControlPage.xaml
This file contains hidden or 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,18 @@ | ||
| <?xml version="1.0" encoding="utf-8" ?> | ||
| <TabbedPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui" | ||
| xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | ||
| xmlns:android="clr-namespace:Microsoft.Maui.Controls.PlatformConfiguration.AndroidSpecific;assembly=Microsoft.Maui.Controls" | ||
| xmlns:local="clr-namespace:Maui.Controls.Sample" | ||
| x:Class="Maui.Controls.Sample.TabbedPageControlMainPage" | ||
| x:DataType="local:TabbedPageViewModel" | ||
| android:TabbedPage.ToolbarPlacement="Top" | ||
| BarBackground="{Binding BarBackground}" | ||
| BarTextColor="{Binding BarTextColor}" | ||
| SelectedTabColor="{Binding SelectedTabColor}" | ||
| UnselectedTabColor="{Binding UnselectedTabColor}" | ||
| IsEnabled="{Binding IsEnabled}" | ||
| FlowDirection="{Binding FlowDirection}" | ||
| AutomationId="TabbedPageControl" | ||
| ItemsSource="{Binding ItemsSource}" | ||
| ItemTemplate="{Binding ItemTemplate}" | ||
| SelectedItem="{Binding SelectedItem}"/> |
31 changes: 31 additions & 0 deletions
31
src/Controls/tests/TestCases.HostApp/FeatureMatrix/TabbedPage/TabbedPageControlPage.xaml.cs
This file contains hidden or 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,31 @@ | ||
| namespace Maui.Controls.Sample; | ||
|
|
||
| public class TabbedPageControlPage : NavigationPage | ||
| { | ||
| private TabbedPageViewModel _viewModel; | ||
| public TabbedPageControlPage() | ||
| { | ||
| _viewModel = new TabbedPageViewModel(); | ||
| PushAsync(new TabbedPageControlMainPage(_viewModel)); | ||
| } | ||
| } | ||
| public partial class TabbedPageControlMainPage : TabbedPage | ||
| { | ||
| private TabbedPageViewModel _viewModel; | ||
|
|
||
| public TabbedPageControlMainPage(TabbedPageViewModel viewModel) | ||
| { | ||
| InitializeComponent(); | ||
| _viewModel = viewModel; | ||
| BindingContext = _viewModel; | ||
| var button = new Button { AutomationId = "Options", Text = "Options" }; | ||
| button.Clicked += NavigateToOptionsPage_Clicked; | ||
| NavigationPage.SetTitleView(this, button); | ||
| } | ||
|
|
||
| private async void NavigateToOptionsPage_Clicked(object sender, EventArgs e) | ||
| { | ||
| BindingContext = _viewModel = new TabbedPageViewModel(); | ||
| await Navigation.PushModalAsync(new TabbedPageOptionsPage(_viewModel)); | ||
| } | ||
| } | ||
211 changes: 211 additions & 0 deletions
211
src/Controls/tests/TestCases.HostApp/FeatureMatrix/TabbedPage/TabbedPageOptionsPage.xaml
This file contains hidden or 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,211 @@ | ||
| <?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.TabbedPageOptionsPage" | ||
| x:DataType="local:TabbedPageViewModel" | ||
| Title="TabbedPage Options"> | ||
|
|
||
| <Grid ColumnSpacing="0" | ||
| RowSpacing="20" | ||
| RowDefinitions="Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto" | ||
| ColumnDefinitions="0.5*,0.5*" | ||
| HorizontalOptions="Center" | ||
| VerticalOptions="Center"> | ||
|
|
||
| <!-- BarBackground Brush --> | ||
| <Label Grid.Row="0" | ||
| Grid.Column="0" | ||
| Text="BarBackground Brush: " | ||
| FontSize="18" | ||
| FontAttributes="Bold"/> | ||
| <StackLayout Grid.Row="0" | ||
| Grid.Column="1" | ||
| Orientation="Horizontal" | ||
| Spacing="2"> | ||
| <Button Text="Gradient" | ||
| Clicked="BarBackgroundBrushButton_Clicked" | ||
| BackgroundColor="Violet" | ||
| TextColor="White" | ||
| AutomationId="GradientBarBackgroundButton"/> | ||
| <Button Text="Solid" | ||
| Clicked="BarBackgroundBrushButton_Clicked" | ||
| BackgroundColor="Blue" | ||
| TextColor="White" | ||
| AutomationId="SolidBarBackgroundButton"/> | ||
| </StackLayout> | ||
|
|
||
| <!-- BarText Color --> | ||
| <Label Grid.Row="1" | ||
| Grid.Column="0" | ||
| Text="BarText Color: " | ||
| FontSize="18" | ||
| FontAttributes="Bold"/> | ||
| <StackLayout Grid.Row="1" | ||
| Grid.Column="1" | ||
| Orientation="Horizontal" | ||
| Spacing="2"> | ||
| <Button Text="Black" | ||
| Clicked="BarTextColorButton_Clicked" | ||
| BackgroundColor="Black" | ||
| TextColor="White" | ||
| AutomationId="BlackBarTextButton"/> | ||
| <Button Text="Green" | ||
| Clicked="BarTextColorButton_Clicked" | ||
| BackgroundColor="Green" | ||
| TextColor="White" | ||
| AutomationId="GreenBarTextButton"/> | ||
| </StackLayout> | ||
|
|
||
| <!-- SelectedTab Color --> | ||
| <Label Grid.Row="2" | ||
| Grid.Column="0" | ||
| Text="SelectedTab Color: " | ||
| FontSize="18" | ||
| FontAttributes="Bold"/> | ||
| <StackLayout Grid.Row="2" | ||
| Grid.Column="1" | ||
| Orientation="Horizontal" | ||
| Spacing="2"> | ||
| <Button Text="Orange" | ||
| Clicked="SelectedTabColorButton_Clicked" | ||
| BackgroundColor="Orange" | ||
| TextColor="Black" | ||
| AutomationId="OrangeSelectedButton"/> | ||
| <Button Text="Purple" | ||
| Clicked="SelectedTabColorButton_Clicked" | ||
| BackgroundColor="Purple" | ||
| TextColor="White" | ||
| AutomationId="PurpleSelectedButton"/> | ||
| </StackLayout> | ||
|
|
||
| <!-- UnselectedTab Color --> | ||
| <Label Grid.Row="3" | ||
| Grid.Column="0" | ||
| Text="UnselectedTab Color: " | ||
| FontSize="18" | ||
| FontAttributes="Bold"/> | ||
| <StackLayout Grid.Row="3" | ||
| Grid.Column="1" | ||
| Orientation="Horizontal" | ||
| Spacing="2"> | ||
| <Button Text="LightGray" | ||
| Clicked="UnselectedTabColorButton_Clicked" | ||
| BackgroundColor="LightGray" | ||
| TextColor="Black" | ||
| AutomationId="LightGrayUnselectedButton"/> | ||
| <Button Text="DarkGray" | ||
| Clicked="UnselectedTabColorButton_Clicked" | ||
| BackgroundColor="DarkGray" | ||
| TextColor="White" | ||
| AutomationId="DarkGrayUnselectedButton"/> | ||
| </StackLayout> | ||
|
|
||
| <!-- Apply Button --> | ||
| <Label Grid.Row="4" | ||
| Grid.Column="0" | ||
| Text="Apply Button: " | ||
| FontSize="18" | ||
| FontAttributes="Bold"/> | ||
| <Button Grid.Row="4" | ||
| Grid.Column="1" | ||
| AutomationId="ApplyButton" | ||
| BackgroundColor="Blue" | ||
| Clicked="ApplyButton_Clicked" | ||
| HorizontalOptions="Start" | ||
| Text="Apply Changes" | ||
| TextColor="White" | ||
| WidthRequest="150"/> | ||
|
|
||
| <!-- IsEnabled --> | ||
| <Label Grid.Row="5" | ||
| Grid.Column="0" | ||
| Text="IsEnabled: " | ||
| FontSize="18" | ||
| FontAttributes="Bold"/> | ||
| <RadioButton Grid.Row="5" | ||
| Grid.Column="1" | ||
| Content="False" | ||
| CheckedChanged="OnIsEnabledChanged" | ||
| AutomationId="IsEnabledFalseRadio"/> | ||
|
|
||
| <!-- FlowDirection --> | ||
| <Label Grid.Row="6" | ||
| Grid.Column="0" | ||
| Text="FlowDirection: " | ||
| FontSize="18" | ||
| FontAttributes="Bold"/> | ||
| <StackLayout Grid.Row="6" | ||
| Grid.Column="1" | ||
| Orientation="Horizontal"> | ||
| <RadioButton Content="LeftToRight" | ||
| CheckedChanged="OnFlowDirectionChanged" | ||
| AutomationId="LeftToRightFlowRadio"/> | ||
| <RadioButton Content="RightToLeft" | ||
| CheckedChanged="OnFlowDirectionChanged" | ||
| AutomationId="RightToLeftFlowRadio"/> | ||
| </StackLayout> | ||
|
|
||
| <!-- ItemsSource --> | ||
| <Label Grid.Row="7" | ||
| Grid.Column="0" | ||
| Text="ItemsSource: " | ||
| FontSize="18" | ||
| FontAttributes="Bold"/> | ||
| <StackLayout Grid.Row="7" | ||
| Grid.Column="1" | ||
| Orientation="Horizontal" | ||
| Spacing="2"> | ||
| <Button Text="SourceOne" | ||
| Clicked="ItemsSourceOne_Clicked" | ||
| BackgroundColor="LightBlue" | ||
| AutomationId="ItemsSourceOneButton"/> | ||
| <Button Text="SourceTwo" | ||
| Clicked="ItemsSourceTwo_Clicked" | ||
| BackgroundColor="LightPink" | ||
| AutomationId="ItemsSourceTwoButton"/> | ||
| </StackLayout> | ||
|
|
||
| <!-- ItemTemplate --> | ||
| <Label Grid.Row="8" | ||
| Grid.Column="0" | ||
| Text="ItemTemplate: " | ||
| FontSize="18" | ||
| FontAttributes="Bold"/> | ||
| <StackLayout Grid.Row="8" | ||
| Grid.Column="1" | ||
| Orientation="Horizontal"> | ||
| <Button AutomationId="TemplateOneButton" | ||
| Text="TemplateOne" | ||
| BackgroundColor="Teal" | ||
| TextColor="White" | ||
| Clicked="OnTemplateOneClicked"/> | ||
| <Button AutomationId="TemplateTwoButton" | ||
| Text="TemplateTwo" | ||
| BackgroundColor="Gold" | ||
| TextColor="Black" | ||
| Clicked="OnTemplateTwoClicked"/> | ||
| </StackLayout> | ||
|
|
||
| <!-- SelectedItem --> | ||
| <Label Grid.Row="9" | ||
| Grid.Column="0" | ||
| Text="SelectedItem: " | ||
| FontSize="18" | ||
| FontAttributes="Bold"/> | ||
| <StackLayout Grid.Row="9" | ||
| Grid.Column="1" | ||
| Orientation="Horizontal" | ||
| Spacing="2"> | ||
| <Entry x:Name="selectedItemEntry" | ||
| AutomationId="SelectedItemEntry" | ||
| Text="1" | ||
| Keyboard="Numeric" | ||
| WidthRequest="80"/> | ||
| <Button Text="Select Tab" | ||
| Clicked="SelectItemButton_Clicked" | ||
| BackgroundColor="LightGreen" | ||
| AutomationId="SelectItemButton"/> | ||
| </StackLayout> | ||
| </Grid> | ||
| </ContentPage> |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Creating a new TabbedPageViewModel instance discards the current state and configuration. This should reuse the existing _viewModel instance to maintain test state consistency.