diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android-notch-36/VerifyMaterial3ImageButtonAspect_AspectFillWithImageSourceFromFontImage.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android-notch-36/VerifyMaterial3ImageButtonAspect_AspectFillWithImageSourceFromFontImage.png new file mode 100644 index 000000000000..60d37d1d25d9 Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android-notch-36/VerifyMaterial3ImageButtonAspect_AspectFillWithImageSourceFromFontImage.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android-notch-36/VerifyMaterial3ImageButtonAspect_AspectFitWithImageSourceFromFile.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android-notch-36/VerifyMaterial3ImageButtonAspect_AspectFitWithImageSourceFromFile.png new file mode 100644 index 000000000000..7c706540f9bb Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android-notch-36/VerifyMaterial3ImageButtonAspect_AspectFitWithImageSourceFromFile.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android-notch-36/VerifyMaterial3ImageButtonAspect_AspectFitWithImageSourceFromFontImage.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android-notch-36/VerifyMaterial3ImageButtonAspect_AspectFitWithImageSourceFromFontImage.png new file mode 100644 index 000000000000..2dc147c7f45c Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android-notch-36/VerifyMaterial3ImageButtonAspect_AspectFitWithImageSourceFromFontImage.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android-notch-36/VerifyMaterial3ImageButtonAspect_AspectFitWithImageSourceFromUri.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android-notch-36/VerifyMaterial3ImageButtonAspect_AspectFitWithImageSourceFromUri.png new file mode 100644 index 000000000000..622dd830aeba Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android-notch-36/VerifyMaterial3ImageButtonAspect_AspectFitWithImageSourceFromUri.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android-notch-36/VerifyMaterial3ImageButtonAspect_CenterWithImageSourceFromFile.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android-notch-36/VerifyMaterial3ImageButtonAspect_CenterWithImageSourceFromFile.png new file mode 100644 index 000000000000..fb61359d0824 Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android-notch-36/VerifyMaterial3ImageButtonAspect_CenterWithImageSourceFromFile.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android-notch-36/VerifyMaterial3ImageButtonAspect_CenterWithImageSourceFromFontImage.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android-notch-36/VerifyMaterial3ImageButtonAspect_CenterWithImageSourceFromFontImage.png new file mode 100644 index 000000000000..4c604ab076b4 Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android-notch-36/VerifyMaterial3ImageButtonAspect_CenterWithImageSourceFromFontImage.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android-notch-36/VerifyMaterial3ImageButtonAspect_FillWithImageSourceFromFile.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android-notch-36/VerifyMaterial3ImageButtonAspect_FillWithImageSourceFromFile.png new file mode 100644 index 000000000000..684ec7f04125 Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android-notch-36/VerifyMaterial3ImageButtonAspect_FillWithImageSourceFromFile.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android-notch-36/VerifyMaterial3ImageButtonAspect_FillWithImageSourceFromFontImage.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android-notch-36/VerifyMaterial3ImageButtonAspect_FillWithImageSourceFromFontImage.png new file mode 100644 index 000000000000..9d805a171deb Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android-notch-36/VerifyMaterial3ImageButtonAspect_FillWithImageSourceFromFontImage.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android-notch-36/VerifyMaterial3ImageButtonAspect_FillWithImageSourceFromUri.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android-notch-36/VerifyMaterial3ImageButtonAspect_FillWithImageSourceFromUri.png new file mode 100644 index 000000000000..714f188b2467 Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android-notch-36/VerifyMaterial3ImageButtonAspect_FillWithImageSourceFromUri.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android-notch-36/VerifyMaterial3ImageButtonFlowDirectionRTL.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android-notch-36/VerifyMaterial3ImageButtonFlowDirectionRTL.png new file mode 100644 index 000000000000..45afca00d1a3 Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android-notch-36/VerifyMaterial3ImageButtonFlowDirectionRTL.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android-notch-36/VerifyMaterial3ImageButtonWithBorderColor.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android-notch-36/VerifyMaterial3ImageButtonWithBorderColor.png new file mode 100644 index 000000000000..86845551593b Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android-notch-36/VerifyMaterial3ImageButtonWithBorderColor.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android-notch-36/VerifyMaterial3ImageButtonWithBorderColorAndWidth.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android-notch-36/VerifyMaterial3ImageButtonWithBorderColorAndWidth.png new file mode 100644 index 000000000000..b1acfd89a35f Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android-notch-36/VerifyMaterial3ImageButtonWithBorderColorAndWidth.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android-notch-36/VerifyMaterial3ImageButtonWithBorderWidth.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android-notch-36/VerifyMaterial3ImageButtonWithBorderWidth.png new file mode 100644 index 000000000000..9c52284f7e38 Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android-notch-36/VerifyMaterial3ImageButtonWithBorderWidth.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android-notch-36/VerifyMaterial3ImageButtonWithBorderWidthAndCornerRadius.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android-notch-36/VerifyMaterial3ImageButtonWithBorderWidthAndCornerRadius.png new file mode 100644 index 000000000000..9c55b4371269 Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android-notch-36/VerifyMaterial3ImageButtonWithBorderWidthAndCornerRadius.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android-notch-36/VerifyMaterial3ImageButtonWithCornerRadius.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android-notch-36/VerifyMaterial3ImageButtonWithCornerRadius.png new file mode 100644 index 000000000000..0ac59f1f9c62 Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android-notch-36/VerifyMaterial3ImageButtonWithCornerRadius.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android-notch-36/VerifyMaterial3ImageButtonWithPadding.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android-notch-36/VerifyMaterial3ImageButtonWithPadding.png new file mode 100644 index 000000000000..15f1f49916bc Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android-notch-36/VerifyMaterial3ImageButtonWithPadding.png differ diff --git a/src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/ImageButtonMaterial3FeatureTests.cs b/src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/ImageButtonMaterial3FeatureTests.cs new file mode 100644 index 000000000000..d1ba96003071 --- /dev/null +++ b/src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/ImageButtonMaterial3FeatureTests.cs @@ -0,0 +1,414 @@ +#if ANDROID +using NUnit.Framework; +using UITest.Appium; +using UITest.Core; + +namespace Microsoft.Maui.TestCases.Tests; + +public class ImageButtonMaterial3FeatureTests : _GalleryUITest +{ + public const string ImageButtonFeatureMatrix = "ImageButton Feature Matrix"; + public const string Options = "Options"; + public const string Apply = "Apply"; + public const string ImageAspectFit = "ImageAspectFit"; + public const string ImageAspectFill = "ImageAspectFill"; + public const string ImageFill = "ImageFill"; + public const string ImageCenter = "ImageCenter"; + public const string SourceTypeFile = "SourceTypeFile"; + public const string SourceTypeFontImage = "SourceTypeFontImage"; + public const string SourceTypeStream = "SourceTypeStream"; + public const string SourceTypeUri = "SourceTypeUri"; + public const string FlowDirectionRTL = "FlowDirectionRTL"; + public const string ShadowTrue = "ShadowTrue"; + public const string BorderGreen = "BorderGreen"; + public const string BorderWidthEntry = "BorderWidthEntry"; + public const string CornerRadiusEntry = "CornerRadiusEntry"; + public const string IsVisibleFalse = "IsVisibleFalse"; + public const string IsEnabledFalse = "IsEnabledFalse"; + public const string PaddingEntry = "PaddingEntry"; + + public override string GalleryPageName => ImageButtonFeatureMatrix; + + public ImageButtonMaterial3FeatureTests(TestDevice device) + : base(device) + { + } + + [Test, Order(1)] + [Category(UITestCategories.Material3)] + public void VerifyMaterial3ImageButtonAspect_AspectFitWithImageSourceFromFile() + { + App.WaitForElement(Options); + App.Tap(Options); + App.WaitForElement(ImageAspectFit); + App.Tap(ImageAspectFit); + App.WaitForElement(SourceTypeFile); + App.Tap(SourceTypeFile); + App.WaitForElement(Apply); + App.Tap(Apply); + App.WaitForElement("ImageButtonControl"); + VerifyScreenshot(tolerance: 0.5, retryTimeout: TimeSpan.FromSeconds(2)); + } + + [Test] + [Category(UITestCategories.Material3)] + public void VerifyMaterial3ImageButtonAspect_AspectFitWithImageSourceFromUri() + { + App.WaitForElement(Options); + App.Tap(Options); + App.WaitForElement(ImageAspectFit); + App.Tap(ImageAspectFit); + App.WaitForElement(SourceTypeUri); + App.Tap(SourceTypeUri); + App.WaitForElement(Apply); + App.Tap(Apply); + App.WaitForElement("ImageButtonControl", timeout: TimeSpan.FromSeconds(3)); + VerifyScreenshot(tolerance: 0.5, retryTimeout: TimeSpan.FromSeconds(2)); + } +#if TEST_FAILS_ON_ANDROID // Issue Link: https://github.com/dotnet/maui/issues/30576 + [Test] + [Category(UITestCategories.Material3)] + public void VerifyMaterial3ImageButtonAspect_AspectFitWithImageSourceFromStream() + { + App.WaitForElement(Options); + App.Tap(Options); + App.WaitForElement(ImageAspectFit); + App.Tap(ImageAspectFit); + App.WaitForElement(SourceTypeStream); + App.Tap(SourceTypeStream); + App.WaitForElement(Apply); + App.Tap(Apply); + App.WaitForElement("ImageButtonControl"); + VerifyScreenshot(tolerance: 0.5, retryTimeout: TimeSpan.FromSeconds(2)); + } + + [Test] + [Category(UITestCategories.Material3)] + public void VerifyMaterial3ImageButtonAspect_FillWithImageSourceFromStream() + { + App.WaitForElement(Options); + App.Tap(Options); + App.WaitForElement(ImageFill); + App.Tap(ImageFill); + App.WaitForElement(SourceTypeStream); + App.Tap(SourceTypeStream); + App.WaitForElement(Apply); + App.Tap(Apply); + App.WaitForElement("ImageButtonControl"); + VerifyScreenshot(tolerance: 0.5, retryTimeout: TimeSpan.FromSeconds(2)); + } +#endif + + [Test] + [Category(UITestCategories.Material3)] + public void VerifyMaterial3ImageButtonAspect_AspectFitWithImageSourceFromFontImage() + { + App.WaitForElement(Options); + App.Tap(Options); + App.WaitForElement(ImageAspectFit); + App.Tap(ImageAspectFit); + App.WaitForElement(SourceTypeFontImage); + App.Tap(SourceTypeFontImage); + App.WaitForElement(Apply); + App.Tap(Apply); + App.WaitForElement("ImageButtonControl"); + VerifyScreenshot(tolerance: 0.5, retryTimeout: TimeSpan.FromSeconds(2)); + } + +#if TEST_FAILS_ON_ANDROID // Issue Link: https://github.com/dotnet/maui/issues/29956 + [Test] + [Category(UITestCategories.Material3)] + public void VerifyMaterial3ImageButtonAspect_AspectFillWithImageSourceFromUri() + { + App.WaitForElement(Options); + App.Tap(Options); + App.WaitForElement(ImageAspectFill); + App.Tap(ImageAspectFill); + App.WaitForElement(SourceTypeUri); + App.Tap(SourceTypeUri); + App.WaitForElement(Apply); + App.Tap(Apply); + App.WaitForElement("ImageButtonControl", timeout: TimeSpan.FromSeconds(3)); + VerifyScreenshot(tolerance: 0.5, retryTimeout: TimeSpan.FromSeconds(2)); + } +#endif + + [Test] + [Category(UITestCategories.Material3)] + public void VerifyMaterial3ImageButtonAspect_FillWithImageSourceFromFile() + { + App.WaitForElement(Options); + App.Tap(Options); + App.WaitForElement(ImageFill); + App.Tap(ImageFill); + App.WaitForElement(SourceTypeFile); + App.Tap(SourceTypeFile); + App.WaitForElement(Apply); + App.Tap(Apply); + App.WaitForElement("ImageButtonControl"); + VerifyScreenshot(tolerance: 0.5, retryTimeout: TimeSpan.FromSeconds(2)); + } + + [Test] + [Category(UITestCategories.Material3)] + public void VerifyMaterial3ImageButtonAspect_FillWithImageSourceFromUri() + { + App.WaitForElement(Options); + App.Tap(Options); + App.WaitForElement(ImageFill); + App.Tap(ImageFill); + App.WaitForElement(SourceTypeUri); + App.Tap(SourceTypeUri); + App.WaitForElement(Apply); + App.Tap(Apply); + App.WaitForElement("ImageButtonControl", timeout: TimeSpan.FromSeconds(3)); + VerifyScreenshot(tolerance: 0.5, retryTimeout: TimeSpan.FromSeconds(2)); + } + + [Test] + [Category(UITestCategories.Material3)] + public void VerifyMaterial3ImageButtonAspect_CenterWithImageSourceFromFile() + { + App.WaitForElement(Options); + App.Tap(Options); + App.WaitForElement(ImageCenter); + App.Tap(ImageCenter); + App.WaitForElement(SourceTypeFile); + App.Tap(SourceTypeFile); + App.WaitForElement(Apply); + App.Tap(Apply); + App.WaitForElement("ImageButtonControl"); + VerifyScreenshot(tolerance: 0.5, retryTimeout: TimeSpan.FromSeconds(2)); + } + + +#if TEST_FAILS_ON_WINDOWS // Issue Link: https://github.com/dotnet/maui/issues/29959 + +#if TEST_FAILS_ON_ANDROID // Issue Link: https://github.com/dotnet/maui/issues/30576 + [Test] + [Category(UITestCategories.Material3)] + public void VerifyMaterial3ImageButtonAspect_AspectFillWithImageSourceFromStream() + { + App.WaitForElement(Options); + App.Tap(Options); + App.WaitForElement(ImageAspectFill); + App.Tap(ImageAspectFill); + App.WaitForElement(SourceTypeStream); + App.Tap(SourceTypeStream); + App.WaitForElement(Apply); + App.Tap(Apply); + App.WaitForElement("ImageButtonControl"); + VerifyScreenshot(tolerance: 0.5, retryTimeout: TimeSpan.FromSeconds(2)); + } + + [Test] + [Category(UITestCategories.Material3)] + public void VerifyMaterial3ImageButtonAspect_CenterWithImageSourceFromStream() + { + App.WaitForElement(Options); + App.Tap(Options); + App.WaitForElement(ImageCenter); + App.Tap(ImageCenter); + App.WaitForElement(SourceTypeStream); + App.Tap(SourceTypeStream); + App.WaitForElement(Apply); + App.Tap(Apply); + App.WaitForElement("ImageButtonControl"); + VerifyScreenshot(tolerance: 0.5, retryTimeout: TimeSpan.FromSeconds(2)); + } +#endif + + [Test] + [Category(UITestCategories.Material3)] + public void VerifyMaterial3ImageButtonAspect_AspectFillWithImageSourceFromFontImage() + { + App.WaitForElement(Options); + App.Tap(Options); + App.WaitForElement(ImageAspectFill); + App.Tap(ImageAspectFill); + App.WaitForElement(SourceTypeFontImage); + App.Tap(SourceTypeFontImage); + App.WaitForElement(Apply); + App.Tap(Apply); + App.WaitForElement("ImageButtonControl"); + VerifyScreenshot(tolerance: 0.5, retryTimeout: TimeSpan.FromSeconds(2)); + } + + [Test] + [Category(UITestCategories.Material3)] + public void VerifyMaterial3ImageButtonAspect_FillWithImageSourceFromFontImage() + { + App.WaitForElement(Options); + App.Tap(Options); + App.WaitForElement(ImageFill); + App.Tap(ImageFill); + App.WaitForElement(SourceTypeFontImage); + App.Tap(SourceTypeFontImage); + App.WaitForElement(Apply); + App.Tap(Apply); + App.WaitForElement("ImageButtonControl"); + VerifyScreenshot(tolerance: 0.5, retryTimeout: TimeSpan.FromSeconds(2)); + } + + [Test] + [Category(UITestCategories.Material3)] + public void VerifyMaterial3ImageButtonAspect_CenterWithImageSourceFromFontImage() + { + App.WaitForElement(Options); + App.Tap(Options); + App.WaitForElement(ImageCenter); + App.Tap(ImageCenter); + App.WaitForElement(SourceTypeFontImage); + App.Tap(SourceTypeFontImage); + App.WaitForElement(Apply); + App.Tap(Apply); + App.WaitForElement("ImageButtonControl"); + VerifyScreenshot(tolerance: 0.5, retryTimeout: TimeSpan.FromSeconds(2)); + } + +#if TEST_FAILS_ON_ANDROID // Issue Link: https://github.com/dotnet/maui/issues/29956 + [Test] + [Category(UITestCategories.Material3)] + public void VerifyMaterial3ImageButtonAspect_AspectFillWithImageSourceFromFile() + { + App.WaitForElement(Options); + App.Tap(Options); + App.WaitForElement(ImageAspectFill); + App.Tap(ImageAspectFill); + App.WaitForElement(SourceTypeFile); + App.Tap(SourceTypeFile); + App.WaitForElement(Apply); + App.Tap(Apply); + App.WaitForElement("ImageButtonControl"); + VerifyScreenshot(tolerance: 0.5, retryTimeout: TimeSpan.FromSeconds(2)); + } + + [Test] + [Category(UITestCategories.Material3)] + public void VerifyMaterial3ImageButtonAspect_CenterWithImageSourceFromUri() + { + App.WaitForElement(Options); + App.Tap(Options); + App.WaitForElement(ImageCenter); + App.Tap(ImageCenter); + App.WaitForElement(SourceTypeUri); + App.Tap(SourceTypeUri); + App.WaitForElement(Apply); + App.Tap(Apply); + App.WaitForElement("ImageButtonControl", timeout: TimeSpan.FromSeconds(3)); + VerifyScreenshot(tolerance: 0.5, retryTimeout: TimeSpan.FromSeconds(2)); + } +#endif +#endif + + [Test] + [Category(UITestCategories.Material3)] + public void VerifyMaterial3ImageButtonFlowDirectionRTL() + { + App.WaitForElement(Options); + App.Tap(Options); + App.WaitForElement(FlowDirectionRTL); + App.Tap(FlowDirectionRTL); + App.WaitForElement(Apply); + App.Tap(Apply); + App.WaitForElement("ImageButtonControl"); + VerifyScreenshot(tolerance: 0.5, retryTimeout: TimeSpan.FromSeconds(2)); + } + + [Test] + [Category(UITestCategories.Material3)] + public void VerifyMaterial3ImageButtonWithPadding() + { + App.WaitForElement(Options); + App.Tap(Options); + App.WaitForElement(PaddingEntry); + App.ClearText(PaddingEntry); + App.EnterText(PaddingEntry, "40,40,40,40"); + App.WaitForElement(Apply); + App.Tap(Apply); + App.WaitForElement("ImageButtonControl"); + VerifyScreenshot(tolerance: 0.5, retryTimeout: TimeSpan.FromSeconds(2)); + } + + [Test] + [Category(UITestCategories.Material3)] + public void VerifyMaterial3ImageButtonWithCornerRadius() + { + App.WaitForElement(Options); + App.Tap(Options); + App.WaitForElement(CornerRadiusEntry); + App.ClearText(CornerRadiusEntry); + App.EnterText(CornerRadiusEntry, "50,50,50,50"); + App.WaitForElement(Apply); + App.Tap(Apply); + App.WaitForElement("ImageButtonControl"); + VerifyScreenshot(tolerance: 0.5, retryTimeout: TimeSpan.FromSeconds(2)); + } + + [Test] + [Category(UITestCategories.Material3)] + public void VerifyMaterial3ImageButtonWithBorderColor() + { + App.WaitForElement(Options); + App.Tap(Options); + App.WaitForElement(BorderGreen); + App.Tap(BorderGreen); + App.WaitForElement(Apply); + App.Tap(Apply); + App.WaitForElement("ImageButtonControl"); + VerifyScreenshot(tolerance: 0.5, retryTimeout: TimeSpan.FromSeconds(2)); + } + + [Test] + [Category(UITestCategories.Material3)] + public void VerifyMaterial3ImageButtonWithBorderWidth() + { + App.WaitForElement(Options); + App.Tap(Options); + App.WaitForElement(BorderWidthEntry); + App.ClearText(BorderWidthEntry); + App.EnterText(BorderWidthEntry, "10"); + App.WaitForElement(Apply); + App.Tap(Apply); + App.WaitForElement("ImageButtonControl"); + VerifyScreenshot(tolerance: 0.5, retryTimeout: TimeSpan.FromSeconds(2)); + } + + [Test] + [Category(UITestCategories.Material3)] + public void VerifyMaterial3ImageButtonWithBorderColorAndWidth() + { + App.WaitForElement(Options); + App.Tap(Options); + App.WaitForElement(BorderGreen); + App.Tap(BorderGreen); + App.WaitForElement(BorderWidthEntry); + App.ClearText(BorderWidthEntry); + App.EnterText(BorderWidthEntry, "15"); + App.WaitForElement(Apply); + App.Tap(Apply); + App.WaitForElement("ImageButtonControl"); + VerifyScreenshot(tolerance: 0.5, retryTimeout: TimeSpan.FromSeconds(2)); + } + + [Test] + [Category(UITestCategories.Material3)] + public void VerifyMaterial3ImageButtonWithBorderWidthAndCornerRadius() + { + App.WaitForElement(Options); + App.Tap(Options); + App.WaitForElement(BorderWidthEntry); + App.ClearText(BorderWidthEntry); + App.EnterText(BorderWidthEntry, "10"); + App.WaitForElement(CornerRadiusEntry); + App.ClearText(CornerRadiusEntry); + App.EnterText(CornerRadiusEntry, "30,30,30,30"); + App.WaitForElement(SourceTypeFile); + App.Tap(SourceTypeFile); + App.WaitForElement(Apply); + App.Tap(Apply); + App.WaitForElement("ImageButtonControl"); + VerifyScreenshot(tolerance: 0.5, retryTimeout: TimeSpan.FromSeconds(2)); + } +} +#endif \ No newline at end of file diff --git a/src/Core/src/Handlers/ImageButton/ImageButtonHandler.Android.cs b/src/Core/src/Handlers/ImageButton/ImageButtonHandler.Android.cs index b71e98aa8706..bd1940e5e15e 100644 --- a/src/Core/src/Handlers/ImageButton/ImageButtonHandler.Android.cs +++ b/src/Core/src/Handlers/ImageButton/ImageButtonHandler.Android.cs @@ -9,7 +9,11 @@ public partial class ImageButtonHandler : ViewHandler