-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[Testing] Feature Matrix UITest Cases for Shell Tabbed Page #33159
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 9 commits into
dotnet:inflight/current
from
NafeelaNazhir:shell_tabbed_feature
Feb 24, 2026
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
7f91cb1
Added Shell tabbed feature tests
NafeelaNazhir b74e7d0
changes updated
NafeelaNazhir 34a5252
added more tab test cases
NafeelaNazhir 8b6344e
added base images
NafeelaNazhir 3d78f33
Added base images
NafeelaNazhir 4fdc645
modified the order
NafeelaNazhir 2e6d1d8
modified changes
NafeelaNazhir abfdec0
addressed copilot suggestions
NafeelaNazhir d83b648
added base images for iOS26
NafeelaNazhir 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
+41.8 KB
...trols/tests/TestCases.Android.Tests/snapshots/android/VerifyShell_IsVisible.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
+44.2 KB
...TestCases.Android.Tests/snapshots/android/VerifyShell_TabBarBackgroundColor.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
+45.6 KB
...Tests/snapshots/android/VerifyShell_TabBarBackgroundColorAndForegroundColor.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
+46 KB
...roid.Tests/snapshots/android/VerifyShell_TabBarBackgroundColorAndTitleColor.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
+44.8 KB
...Tests/snapshots/android/VerifyShell_TabBarBackgroundColorAndUnSelectedColor.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
+43.5 KB
....Android.Tests/snapshots/android/VerifyShell_TabBarBackgroundColorSetToNull.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
+44.8 KB
...s/TestCases.Android.Tests/snapshots/android/VerifyShell_TabBarDisabledColor.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
+44 KB
...TestCases.Android.Tests/snapshots/android/VerifyShell_TabBarForegroundColor.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
+44.7 KB
...roid.Tests/snapshots/android/VerifyShell_TabBarForegroundColorAndTitleColor.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
+45.4 KB
...Tests/snapshots/android/VerifyShell_TabBarForegroundColorAndUnSelectedColor.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
+44.9 KB
...ests/TestCases.Android.Tests/snapshots/android/VerifyShell_TabBarTitleColor.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
+46.3 KB
...roid.Tests/snapshots/android/VerifyShell_TabBarTitleColorAndUnSelectedColor.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
+45.2 KB
...TestCases.Android.Tests/snapshots/android/VerifyShell_TabBarUnselectedColor.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
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
303 changes: 303 additions & 0 deletions
303
...trols/tests/TestCases.HostApp/FeatureMatrix/Shell/ShellTabbed/ShellTabbedControlPage.xaml
Large diffs are not rendered by default.
Oops, something went wrong.
47 changes: 47 additions & 0 deletions
47
...ls/tests/TestCases.HostApp/FeatureMatrix/Shell/ShellTabbed/ShellTabbedControlPage.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,47 @@ | ||
| using System; | ||
| using System.ComponentModel; | ||
| using Microsoft.Maui.Controls; | ||
|
|
||
| namespace Maui.Controls.Sample; | ||
|
|
||
| public partial class ShellTabbedControlPage : Shell | ||
| { | ||
| private ShellViewModel _viewModel; | ||
| public ShellContent VegetablesItem => vegetablesItem; | ||
| public ShellContent FruitsItem => fruitsItem; | ||
| public ShellContent Tab1Item => tab1Item; | ||
| public ShellContent Tab3Item => tab3Item; | ||
| public ShellContent Tab4Item => tab4Item; | ||
| public ShellContent Tab5Item => tab5Item; | ||
| public ShellContent Tab6Item => tab6Item; | ||
|
|
||
| public ShellTabbedControlPage() | ||
| { | ||
| InitializeComponent(); | ||
| _viewModel = new ShellViewModel(); | ||
| BindingContext = _viewModel; | ||
| Navigated += OnNavigated; | ||
| } | ||
|
|
||
| private async void NavigateToOptionsPage_Clicked(object sender, EventArgs e) | ||
| { | ||
| BindingContext = _viewModel = new ShellViewModel(); | ||
| await Navigation.PushAsync(new ShellTabbedOptionsPage(_viewModel)); | ||
| } | ||
|
|
||
| private void OnGoToTab1Clicked(object sender, EventArgs e) | ||
| { | ||
| this.CurrentItem = this.tab1Item; | ||
| } | ||
|
|
||
| private void OnNavigated(object sender, ShellNavigatedEventArgs e) | ||
| { | ||
| _viewModel.CurrentItemTitle = CurrentItem?.CurrentItem?.Title ?? "Unknown"; | ||
| } | ||
|
|
||
| protected override void OnDisappearing() | ||
| { | ||
| base.OnDisappearing(); | ||
| Navigated -= OnNavigated; // Clean up | ||
| } | ||
| } | ||
288 changes: 288 additions & 0 deletions
288
...trols/tests/TestCases.HostApp/FeatureMatrix/Shell/ShellTabbed/ShellTabbedOptionsPage.xaml
Large diffs are not rendered by default.
Oops, something went wrong.
182 changes: 182 additions & 0 deletions
182
...ls/tests/TestCases.HostApp/FeatureMatrix/Shell/ShellTabbed/ShellTabbedOptionsPage.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,182 @@ | ||
| using System; | ||
| using Microsoft.Maui.Controls; | ||
| using Microsoft.Maui.Graphics; | ||
|
|
||
| namespace Maui.Controls.Sample; | ||
|
|
||
| public partial class ShellTabbedOptionsPage : ContentPage | ||
| { | ||
| private ShellViewModel _viewModel; | ||
|
|
||
| public ShellTabbedOptionsPage(ShellViewModel viewModel) | ||
| { | ||
| InitializeComponent(); | ||
| _viewModel = viewModel; | ||
| BindingContext = _viewModel; | ||
| } | ||
| private void ApplyButton_Clicked(object sender, EventArgs e) | ||
| { | ||
| Navigation.PopAsync(); | ||
| } | ||
|
|
||
| private void OnTabBarBackgroundColorClicked(object sender, EventArgs e) | ||
| { | ||
| if (sender is Button button) | ||
| { | ||
| switch (button.Text) | ||
| { | ||
| case "LightYellow": | ||
| _viewModel.TabBarBackgroundColor = Colors.LightYellow; | ||
| break; | ||
| case "LightGreen": | ||
| _viewModel.TabBarBackgroundColor = Colors.LightGreen; | ||
| break; | ||
| case "LightBlue": | ||
| _viewModel.TabBarBackgroundColor = Colors.LightBlue; | ||
| break; | ||
| } | ||
| } | ||
| } | ||
|
|
||
| private void OnTabBarDisabledColorClicked(object sender, EventArgs e) | ||
| { | ||
| if (sender is Button button) | ||
| { | ||
| switch (button.Text) | ||
| { | ||
| case "Maroon": | ||
| _viewModel.TabBarDisabledColor = Colors.Maroon; | ||
| break; | ||
| case "Magenta": | ||
| _viewModel.TabBarDisabledColor = Colors.Magenta; | ||
| break; | ||
| case "Gold": | ||
| _viewModel.TabBarDisabledColor = Colors.Gold; | ||
| break; | ||
| } | ||
| } | ||
| } | ||
|
|
||
| private void OnTabBarForegroundColorClicked(object sender, EventArgs e) | ||
| { | ||
| if (sender is Button button) | ||
| { | ||
| switch (button.Text) | ||
| { | ||
| case "Blue": | ||
| _viewModel.TabBarForegroundColor = Colors.Blue; | ||
| break; | ||
| case "Red": | ||
| _viewModel.TabBarForegroundColor = Colors.Red; | ||
| break; | ||
| case "Green": | ||
| _viewModel.TabBarForegroundColor = Colors.Green; | ||
| break; | ||
| } | ||
| } | ||
| } | ||
|
|
||
| private void OnTabBarTitleColorClicked(object sender, EventArgs e) | ||
| { | ||
| if (sender is Button button) | ||
| { | ||
| switch (button.Text) | ||
| { | ||
| case "Lavender": | ||
| _viewModel.TabBarTitleColor = Colors.Lavender; | ||
| break; | ||
| case "Orange": | ||
| _viewModel.TabBarTitleColor = Colors.Orange; | ||
| break; | ||
| case "Purple": | ||
| _viewModel.TabBarTitleColor = Colors.Purple; | ||
| break; | ||
| } | ||
| } | ||
| } | ||
|
|
||
| private void OnTabBarUnselectedColorClicked(object sender, EventArgs e) | ||
| { | ||
| if (sender is Button button) | ||
| { | ||
| switch (button.Text) | ||
| { | ||
| case "Blue": | ||
| _viewModel.TabBarUnselectedColor = Colors.Blue; | ||
| break; | ||
| case "Brown": | ||
| _viewModel.TabBarUnselectedColor = Colors.Brown; | ||
| break; | ||
| case "PeachPuff": | ||
| _viewModel.TabBarUnselectedColor = Colors.PeachPuff; | ||
| break; | ||
| } | ||
| } | ||
| } | ||
|
|
||
| private void OnTabBarIsVisibleChanged(object sender, CheckedChangedEventArgs e) | ||
| { | ||
| if (sender is RadioButton radioButton && e.Value) | ||
| { | ||
| _viewModel.TabBarIsVisible = radioButton.Content.ToString() == "True"; | ||
| } | ||
| } | ||
|
|
||
| private void OnIsEnabledChanged(object sender, CheckedChangedEventArgs e) | ||
| { | ||
| if (sender is RadioButton radioButton && e.Value) | ||
| { | ||
| _viewModel.IsEnabled = radioButton.Content.ToString() == "True"; | ||
| } | ||
| } | ||
|
|
||
| private void OnIsVisibleChanged(object sender, CheckedChangedEventArgs e) | ||
| { | ||
| if (sender is RadioButton radioButton && e.Value) | ||
| { | ||
| _viewModel.IsVisible = radioButton.Content.ToString() == "True"; | ||
| } | ||
| } | ||
|
|
||
| private void OnFlowDirectionChanged(object sender, EventArgs e) | ||
| { | ||
| if (sender is RadioButton rb) | ||
| { | ||
| _viewModel.FlowDirection = rb.Content?.ToString() == "LTR" ? FlowDirection.LeftToRight : FlowDirection.RightToLeft; | ||
| } | ||
| } | ||
|
|
||
| private void OnCurrentItemClicked(object sender, EventArgs e) | ||
| { | ||
| if (sender is Button button) | ||
| { | ||
| if (Application.Current?.MainPage is ShellTabbedControlPage shell) | ||
| { | ||
| switch (button.Text) | ||
| { | ||
| case "Vegetables": | ||
| Shell.Current.CurrentItem = shell.VegetablesItem; | ||
| break; | ||
| case "Fruits": | ||
| Shell.Current.CurrentItem = shell.FruitsItem; | ||
| break; | ||
| case "Tab1": | ||
| Shell.Current.CurrentItem = shell.Tab1Item; | ||
| break; | ||
| case "Tab3": | ||
| Shell.Current.CurrentItem = shell.Tab3Item; | ||
| break; | ||
| case "Tab4": | ||
| Shell.Current.CurrentItem = shell.Tab4Item; | ||
| break; | ||
| case "Tab5": | ||
| Shell.Current.CurrentItem = shell.Tab5Item; | ||
| break; | ||
| case "Tab6": | ||
| Shell.Current.CurrentItem = shell.Tab6Item; | ||
| break; | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } |
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
Binary file added
BIN
+20.4 KB
src/Controls/tests/TestCases.Mac.Tests/snapshots/mac/VerifyShell_IsVisible.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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.
Uh oh!
There was an error while loading. Please reload this page.