-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[Testing] Feature Matrix UITest Cases for Brushes #31833
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 13 commits into
dotnet:inflight/current
from
LogishaSelvarajSF4525:brush-feature
Feb 23, 2026
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
daaf137
Update sample class
LogishaSelvarajSF4525 5c4489f
update the sample
LogishaSelvarajSF4525 2cf6b3d
added test cases
LogishaSelvarajSF4525 8681283
added snapshots
LogishaSelvarajSF4525 0646ab1
updated sample
LogishaSelvarajSF4525 25985b1
updated sample
LogishaSelvarajSF4525 d0996fc
updated snapshots
LogishaSelvarajSF4525 00e25cc
added the snapshot from CI
LogishaSelvarajSF4525 4bcfe21
update the dynamically add and remove the gradient stops
LogishaSelvarajSF4525 8ad688a
updated snapshot from CI
LogishaSelvarajSF4525 d56f6e5
remove unrelated file
LogishaSelvarajSF4525 c2959c7
remove unwanted files
LogishaSelvarajSF4525 ae1d3fc
updated the UITest to GalleryUItest
LogishaSelvarajSF4525 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
+85.9 KB
...tests/TestCases.Android.Tests/snapshots/android/VerifyAddLinearGradientStop.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
+219 KB
...tests/TestCases.Android.Tests/snapshots/android/VerifyAddRadialGradientStop.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
+84.2 KB
...ndroid.Tests/snapshots/android/VerifyBackgroundWithAlterLinearGradientBrush.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
+143 KB
...ndroid.Tests/snapshots/android/VerifyBackgroundWithAlterRadialGradientBrush.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
+82.3 KB
...es.Android.Tests/snapshots/android/VerifyBackgroundWithAlterSolidColorBrush.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
+151 KB
...snapshots/android/VerifyLinearGradientBrushWithBackgroundAndShadowAndStroke.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
+83.2 KB
...ests/snapshots/android/VerifyLinearGradientBrushWithBackgroundAndStartPoint.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
+86.1 KB
...ndroid.Tests/snapshots/android/VerifyLinearGradientBrushWithBackgroundColor.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
+84.3 KB
...tCases.Android.Tests/snapshots/android/VerifyLinearGradientBrushWithOpacity.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
+143 KB
...stCases.Android.Tests/snapshots/android/VerifyLinearGradientBrushWithShadow.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
+134 KB
...droid.Tests/snapshots/android/VerifyLinearGradientBrushWithShadowAndOpacity.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
+88.7 KB
...stCases.Android.Tests/snapshots/android/VerifyLinearGradientBrushWithStroke.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
+103 KB
...roid.Tests/snapshots/android/VerifyLinearGradientBrushWithStrokeAndEndPoint.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
+87.9 KB
...droid.Tests/snapshots/android/VerifyLinearGradientBrushWithStrokeAndOpacity.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
+86.7 KB
...id.Tests/snapshots/android/VerifyLinearGradientBrushWithStrokeAndStartPoint.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
+141 KB
...id.Tests/snapshots/android/VerifyRadialGradientBrushWithBackgroundAndCenter.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
+147 KB
...id.Tests/snapshots/android/VerifyRadialGradientBrushWithBackgroundAndRadius.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
+192 KB
...snapshots/android/VerifyRadialGradientBrushWithBackgroundAndShadowAndStroke.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
+196 KB
...ndroid.Tests/snapshots/android/VerifyRadialGradientBrushWithBackgroundColor.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
+128 KB
...tCases.Android.Tests/snapshots/android/VerifyRadialGradientBrushWithOpacity.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
...stCases.Android.Tests/snapshots/android/VerifyRadialGradientBrushWithShadow.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
+136 KB
...droid.Tests/snapshots/android/VerifyRadialGradientBrushWithShadowAndOpacity.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
+154 KB
...stCases.Android.Tests/snapshots/android/VerifyRadialGradientBrushWithStroke.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
+149 KB
...ndroid.Tests/snapshots/android/VerifyRadialGradientBrushWithStrokeAndCenter.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
+119 KB
...droid.Tests/snapshots/android/VerifyRadialGradientBrushWithStrokeAndOpacity.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
+130 KB
...ndroid.Tests/snapshots/android/VerifyRadialGradientBrushWithStrokeAndRadius.png
Oops, something went wrong.
Binary file added
BIN
+86.1 KB
...ts/TestCases.Android.Tests/snapshots/android/VerifyRemoveLinearGradientStop.png
Oops, something went wrong.
Binary file added
BIN
+196 KB
...ts/TestCases.Android.Tests/snapshots/android/VerifyRemoveRadialGradientStop.png
Oops, something went wrong.
Binary file added
BIN
+112 KB
...s.Android.Tests/snapshots/android/VerifySolidBrushColorWithShadowAndOpacity.png
Oops, something went wrong.
Binary file added
BIN
+85.7 KB
...s.Android.Tests/snapshots/android/VerifySolidBrushColorWithStrokeAndOpacity.png
Oops, something went wrong.
Binary file added
BIN
+82.1 KB
...es.Android.Tests/snapshots/android/VerifySolidColorBrushWithBackgroundColor.png
Oops, something went wrong.
Binary file added
BIN
+123 KB
...d.Tests/snapshots/android/VerifySolidColorBrushWithBackgroundColorAndShadow.png
Oops, something went wrong.
Binary file added
BIN
+130 KB
...napshots/android/VerifySolidColorBrushWithBackgroundColorAndShadowAndStroke.png
Oops, something went wrong.
Binary file added
BIN
+81.3 KB
.../TestCases.Android.Tests/snapshots/android/VerifySolidColorBrushWithOpacity.png
Oops, something went wrong.
Binary file added
BIN
+123 KB
...s/TestCases.Android.Tests/snapshots/android/VerifySolidColorBrushWithShadow.png
Oops, something went wrong.
Binary file added
BIN
+86.3 KB
...s/TestCases.Android.Tests/snapshots/android/VerifySolidColorBrushWithStroke.png
Oops, something went wrong.
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
88 changes: 88 additions & 0 deletions
88
src/Controls/tests/TestCases.HostApp/FeatureMatrix/Brushes/BrushesControlPage.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,88 @@ | ||
| <?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.BrushesControlMainPage" | ||
| x:DataType="local:BrushesViewModel" | ||
| Title="BrushesControlPage"> | ||
| <ContentPage.ToolbarItems> | ||
| <ToolbarItem Text="Options" | ||
| Clicked="OnOptionsClicked"/> | ||
| </ContentPage.ToolbarItems> | ||
| <VerticalStackLayout Padding="15" | ||
| Spacing="10"> | ||
| <StackLayout> | ||
| <Label Text="Brushes Feature Matrix" | ||
| FontSize="20" | ||
| HorizontalOptions="Center" | ||
| AutomationId="BrushesLabel"/> | ||
| <BoxView HeightRequest="25"/> | ||
| <Border | ||
| WidthRequest="300" | ||
| HeightRequest="300" | ||
| StrokeThickness="30" | ||
| Stroke="{Binding StrokeBrush}" | ||
| Background="{Binding BrushTarget}" | ||
| Opacity="{Binding BrushOpacity}" | ||
| StrokeShape="RoundRectangle 30" | ||
| Shadow="{Binding ShadowBrush}"> | ||
| <Label Text="Test Brushes" | ||
| HorizontalOptions="Center" | ||
| VerticalOptions="Center"/> | ||
| </Border> | ||
| </StackLayout> | ||
| <BoxView HeightRequest="30"/> | ||
| <VerticalStackLayout Spacing="5"> | ||
| <HorizontalStackLayout Spacing="10" | ||
| VerticalOptions="Center" | ||
| HorizontalOptions="Center"> | ||
| <Label Text="Selected Color 1:" | ||
| VerticalOptions="Center"/> | ||
| <Label Text="{Binding SelectedColorName1}" | ||
| VerticalOptions="Center" | ||
| AutomationId="Color1"/> | ||
| </HorizontalStackLayout> | ||
| <HorizontalStackLayout Spacing="10" | ||
| VerticalOptions="Center" | ||
| HorizontalOptions="Center"> | ||
| <Label Text="Selected Color 2:" | ||
| VerticalOptions="Center"/> | ||
| <Label Text="{Binding SelectedColorName2}" | ||
| VerticalOptions="Center" | ||
| AutomationId="Color2"/> | ||
| </HorizontalStackLayout> | ||
| <HorizontalStackLayout Spacing="10" | ||
| VerticalOptions="Center" | ||
| HorizontalOptions="Center"> | ||
| <Label Text="Compare Result:" | ||
| VerticalOptions="Center"/> | ||
| <Label Text="{Binding CompareResult}" | ||
| VerticalOptions="Center" | ||
| AutomationId="CompareResultLabel"/> | ||
| </HorizontalStackLayout> | ||
| <Button Text="Compare Selected Brushes" | ||
| Clicked="OnCompareClicked" | ||
| BackgroundColor="DarkBlue" | ||
| TextColor="White" | ||
| AutomationId="CompareButton"/> | ||
| <HorizontalStackLayout Spacing="10" | ||
| HorizontalOptions="Center"> | ||
| <Button Text="Add Linear Stop" | ||
| Clicked="OnAddLinearStopClicked" | ||
| AutomationId="AddLinearStopButton"/> | ||
| <Button Text="Remove Linear Stop" | ||
| Clicked="OnRemoveLinearStopClicked" | ||
| AutomationId="RemoveLinearStopButton"/> | ||
| </HorizontalStackLayout> | ||
| <HorizontalStackLayout Spacing="10" | ||
| HorizontalOptions="Center"> | ||
| <Button Text="Add Radial Stop" | ||
| Clicked="OnAddRadialStopClicked" | ||
| AutomationId="AddRadialStopButton"/> | ||
| <Button Text="Remove Radial Stop" | ||
| Clicked="OnRemoveRadialStopClicked" | ||
| AutomationId="RemoveRadialStopButton"/> | ||
| </HorizontalStackLayout> | ||
| </VerticalStackLayout> | ||
| </VerticalStackLayout> | ||
| </ContentPage> |
68 changes: 68 additions & 0 deletions
68
src/Controls/tests/TestCases.HostApp/FeatureMatrix/Brushes/BrushesControlPage.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,68 @@ | ||
| using Microsoft.Maui.Controls; | ||
|
|
||
| namespace Maui.Controls.Sample; | ||
|
|
||
| public class BrushesControlPage : NavigationPage | ||
| { | ||
| private BrushesViewModel _viewModel; | ||
| public BrushesControlPage() | ||
| { | ||
| _viewModel = new BrushesViewModel(); | ||
| PushAsync(new BrushesControlMainPage(_viewModel)); | ||
| } | ||
| } | ||
|
|
||
| public partial class BrushesControlMainPage : ContentPage | ||
| { | ||
| private BrushesViewModel _viewModel; | ||
|
|
||
| public BrushesControlMainPage(BrushesViewModel viewModel) | ||
| { | ||
| InitializeComponent(); | ||
| BindingContext = _viewModel = viewModel; | ||
| } | ||
|
|
||
| private void OnAddLinearStopClicked(object sender, EventArgs e) | ||
| { | ||
| _viewModel?.AddLinearGradientStopCommand?.Execute(null); | ||
| } | ||
|
|
||
| private void OnRemoveLinearStopClicked(object sender, EventArgs e) | ||
| { | ||
| _viewModel?.RemoveLinearGradientStopCommand?.Execute(null); | ||
| } | ||
|
|
||
| private void OnAddRadialStopClicked(object sender, EventArgs e) | ||
| { | ||
| _viewModel?.AddRadialGradientStopCommand?.Execute(null); | ||
| } | ||
|
|
||
| private void OnRemoveRadialStopClicked(object sender, EventArgs e) | ||
| { | ||
| _viewModel?.RemoveRadialGradientStopCommand?.Execute(null); | ||
| } | ||
|
|
||
| private void OnApplyLinearClicked(object sender, EventArgs e) | ||
| { | ||
| _viewModel?.ApplyLinearGradientCommand?.Execute(null); | ||
| } | ||
|
|
||
| private void OnApplyRadialClicked(object sender, EventArgs e) | ||
| { | ||
| _viewModel?.ApplyRadialGradientCommand?.Execute(null); | ||
| } | ||
|
|
||
| private void OnCompareClicked(object sender, EventArgs e) | ||
| { | ||
| if (BindingContext is BrushesViewModel vm) | ||
| { | ||
| vm.CompareBrushesCommand?.Execute(null); | ||
| } | ||
| } | ||
|
|
||
| private async void OnOptionsClicked(object sender, EventArgs e) | ||
| { | ||
| BindingContext = _viewModel = new BrushesViewModel(); | ||
| await Navigation.PushAsync(new BrushesOptionsPage(_viewModel)); | ||
| } | ||
| } | ||
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 BrushesViewModel instance overwrites the existing state when navigating to options. This will lose any previously configured brush settings. The existing _viewModel should be reused instead of creating a new instance.