From 097b927b987f7dfbc2bfd6b3c9477269d25da393 Mon Sep 17 00:00:00 2001 From: nivetha-nagalingam Date: Fri, 14 Mar 2025 10:35:54 +0530 Subject: [PATCH 1/5] Enabled the translation property for device tests --- .../Elements/BoxView/BoxViewTests.Android.cs | 29 +++++++++++++++++++ .../Elements/Button/ButtonTests.Android.cs | 28 ++++++++++++++++++ .../CheckBox/CheckBoxTests.Android.cs | 27 +++++++++++++++++ .../Elements/Editor/EditorTests.Android.cs | 21 +++++++++++++- .../Elements/Entry/EntryTests.Android.cs | 28 ++++++++++++++++++ .../Elements/Label/LabelTests.Android.cs | 20 +++++++++++++ .../SearchBar/SearchBarTests.Android.cs | 29 +++++++++++++++++++ .../SwipeView/SwipeViewTests.Android.cs | 26 +++++++++++------ 8 files changed, 198 insertions(+), 10 deletions(-) diff --git a/src/Controls/tests/DeviceTests/Elements/BoxView/BoxViewTests.Android.cs b/src/Controls/tests/DeviceTests/Elements/BoxView/BoxViewTests.Android.cs index bd5784bd80a2..5641c3f58be4 100644 --- a/src/Controls/tests/DeviceTests/Elements/BoxView/BoxViewTests.Android.cs +++ b/src/Controls/tests/DeviceTests/Elements/BoxView/BoxViewTests.Android.cs @@ -126,5 +126,34 @@ Task GetPlatformIsVisible(ShapeViewHandler boxViewViewHandler) return nativeView.Visibility == Android.Views.ViewStates.Visible; }); } + + //src/Compatibility/Core/tests/Android/TranslationTests.cs + [Fact] + [Description("The Translation property of a BoxView should match with native Translation")] + public async Task BoxViewTranslationConsistent() + { + var boxView = new BoxView() + { + HeightRequest = 100, + WidthRequest = 200, + TranslationX = 50, + TranslationY = -20 + }; + + var handler = await CreateHandlerAsync(boxView); + var nativeView = GetNativeBoxView(handler); + await InvokeOnMainThreadAsync(() => + { + var translation = nativeView.TranslationX; + var density = Microsoft.Maui.Devices.DeviceDisplay.Current.MainDisplayInfo.Density; + var expectedInPixels = density * boxView.TranslationX; + + Assert.Equal(expectedInPixels, translation, 1.0); + + var translationY = nativeView.TranslationY; + var expectedYInPixels = density * boxView.TranslationY; + Assert.Equal(expectedYInPixels, translationY, 1.0); + }); + } } } \ No newline at end of file diff --git a/src/Controls/tests/DeviceTests/Elements/Button/ButtonTests.Android.cs b/src/Controls/tests/DeviceTests/Elements/Button/ButtonTests.Android.cs index 888568f714ec..55e9df5c47d3 100644 --- a/src/Controls/tests/DeviceTests/Elements/Button/ButtonTests.Android.cs +++ b/src/Controls/tests/DeviceTests/Elements/Button/ButtonTests.Android.cs @@ -190,5 +190,33 @@ public async Task RotationConsistent() var platformRotation = await InvokeOnMainThreadAsync(() => platformButton.Rotation); Assert.Equal(expected, platformRotation); } + + //src/Compatibility/Core/tests/Android/TranslationTests.cs + [Fact] + [Description("The Translation property of a Button should match with native Translation")] + public async Task ButtonTranslationConsistent() + { + var button = new Button() + { + Text = "Button Test", + TranslationX = 50, + TranslationY = -20 + }; + + var handler = await CreateHandlerAsync(button); + var nativeView = GetPlatformButton(handler); + await InvokeOnMainThreadAsync(() => + { + var translation = nativeView.TranslationX; + var density = Microsoft.Maui.Devices.DeviceDisplay.Current.MainDisplayInfo.Density; + var expectedInPixels = density * button.TranslationX; + + Assert.Equal(expectedInPixels, translation, 1.0); + + var translationY = nativeView.TranslationY; + var expectedYInPixels = density * button.TranslationY; + Assert.Equal(expectedYInPixels, translationY, 1.0); + }); + } } } diff --git a/src/Controls/tests/DeviceTests/Elements/CheckBox/CheckBoxTests.Android.cs b/src/Controls/tests/DeviceTests/Elements/CheckBox/CheckBoxTests.Android.cs index d523f38a7a1c..67bb14396928 100644 --- a/src/Controls/tests/DeviceTests/Elements/CheckBox/CheckBoxTests.Android.cs +++ b/src/Controls/tests/DeviceTests/Elements/CheckBox/CheckBoxTests.Android.cs @@ -122,5 +122,32 @@ Task GetPlatformIsVisible(CheckBoxHandler checkBoxHandler) return nativeView.Visibility == Android.Views.ViewStates.Visible; }); } + + //src/Compatibility/Core/tests/Android/TranslationTests.cs + [Fact] + [Description("The Translation property of a CheckBox should match with native Translation")] + public async Task CheckBoxTranslationConsistent() + { + var checkBox = new CheckBox() + { + TranslationX = 50, + TranslationY = -20 + }; + + var handler = await CreateHandlerAsync(checkBox); + var nativeView = GetNativeCheckBox(handler); + await InvokeOnMainThreadAsync(() => + { + var translation = nativeView.TranslationX; + var density = Microsoft.Maui.Devices.DeviceDisplay.Current.MainDisplayInfo.Density; + var expectedInPixels = density * checkBox.TranslationX; + + Assert.Equal(expectedInPixels, translation, 1.0); + + var translationY = nativeView.TranslationY; + var expectedYInPixels = density * checkBox.TranslationY; + Assert.Equal(expectedYInPixels, translationY, 1.0); + }); + } } } \ No newline at end of file diff --git a/src/Controls/tests/DeviceTests/Elements/Editor/EditorTests.Android.cs b/src/Controls/tests/DeviceTests/Elements/Editor/EditorTests.Android.cs index 01dafc85895e..b0f0b0b61cef 100644 --- a/src/Controls/tests/DeviceTests/Elements/Editor/EditorTests.Android.cs +++ b/src/Controls/tests/DeviceTests/Elements/Editor/EditorTests.Android.cs @@ -170,5 +170,24 @@ await InvokeOnMainThreadAsync(() => Assert.Equal(expectedValue, isEnabled); }); } + + //src/Compatibility/Core/tests/Android/TranslationTests.cs + [Fact] + [Description("The Translation property of a Editor should match with native Translation")] + public async Task EditorTranslationConsistent() + { + var editor = new Editor() + { + Text = "Editor Test", + TranslationX = 50, + TranslationY = -20 + }; + + var handler = await CreateHandlerAsync(editor); + var nativeView = GetPlatformControl(handler); + await InvokeOnMainThreadAsync(() => + { + AssertTranslationMatches(nativeView, editor.TranslationX, editor.TranslationY); + }); + } } -} diff --git a/src/Controls/tests/DeviceTests/Elements/Entry/EntryTests.Android.cs b/src/Controls/tests/DeviceTests/Elements/Entry/EntryTests.Android.cs index 608196d9535e..0cfbc0d18fb0 100644 --- a/src/Controls/tests/DeviceTests/Elements/Entry/EntryTests.Android.cs +++ b/src/Controls/tests/DeviceTests/Elements/Entry/EntryTests.Android.cs @@ -164,5 +164,33 @@ public async Task RotationConsistent() var platformRotation = await InvokeOnMainThreadAsync(() => platformEntry.Rotation); Assert.Equal(expected, platformRotation); } + + //src/Compatibility/Core/tests/Android/TranslationTests.cs + [Fact] + [Description("The Translation property of a Entry should match with native Translation")] + public async Task EntryTranslationConsistent() + { + var entry = new Entry() + { + Text = "Entry Test", + TranslationX = 50, + TranslationY = -20 + }; + + var handler = await CreateHandlerAsync(entry); + var nativeView = GetPlatformControl(handler); + await InvokeOnMainThreadAsync(() => + { + var translation = nativeView.TranslationX; + var density = Microsoft.Maui.Devices.DeviceDisplay.Current.MainDisplayInfo.Density; + var expectedInPixels = density * entry.TranslationX; + + Assert.Equal(expectedInPixels, translation, 1.0); + + var translationY = nativeView.TranslationY; + var expectedYInPixels = density * entry.TranslationY; + Assert.Equal(expectedYInPixels, translationY, 1.0); + }); + } } } diff --git a/src/Controls/tests/DeviceTests/Elements/Label/LabelTests.Android.cs b/src/Controls/tests/DeviceTests/Elements/Label/LabelTests.Android.cs index 59a3cf4768f2..c13704e2c5ec 100644 --- a/src/Controls/tests/DeviceTests/Elements/Label/LabelTests.Android.cs +++ b/src/Controls/tests/DeviceTests/Elements/Label/LabelTests.Android.cs @@ -182,6 +182,26 @@ await InvokeOnMainThreadAsync(() => }); } + //src/Compatibility/Core/tests/Android/TranslationTests.cs + [Fact] + [Description("The Translation property of a Label should match with native Translation")] + public async Task LabelTranslationConsistent() + { + var label = new Label() + { + Text = "Label Test", + TranslationX = 50, + TranslationY = -20 + }; + + var handler = await CreateHandlerAsync(label); + var nativeView = GetPlatformLabel(handler); + await InvokeOnMainThreadAsync(() => + { + AssertTranslationMatches(nativeView, label.TranslationX, label.TranslationY); + }); + } + TextView GetPlatformLabel(LabelHandler labelHandler) => labelHandler.PlatformView; diff --git a/src/Controls/tests/DeviceTests/Elements/SearchBar/SearchBarTests.Android.cs b/src/Controls/tests/DeviceTests/Elements/SearchBar/SearchBarTests.Android.cs index 49e910697f2d..a18a5a41831d 100644 --- a/src/Controls/tests/DeviceTests/Elements/SearchBar/SearchBarTests.Android.cs +++ b/src/Controls/tests/DeviceTests/Elements/SearchBar/SearchBarTests.Android.cs @@ -8,6 +8,7 @@ using Xunit; using SearchView = AndroidX.AppCompat.Widget.SearchView; + namespace Microsoft.Maui.DeviceTests { public partial class SearchBarTests @@ -145,5 +146,33 @@ Task GetPlatformIsVisible(SearchBarHandler searchBarHandler) return nativeView.Visibility == Android.Views.ViewStates.Visible; }); } + + //src/Compatibility/Core/tests/Android/TranslationTests.cs + [Fact] + [Description("The Translation property of a SearchBar should match with native Translation")] + public async Task SearchBarTranslationConsistent() + { + var searchBar = new SearchBar() + { + Text = "SearchBar Test", + TranslationX = 50, + TranslationY = -20 + }; + + var handler = await CreateHandlerAsync(searchBar); + var nativeView = GetPlatformControl(handler); + await InvokeOnMainThreadAsync(() => + { + var translation = nativeView.TranslationX; + var density = Microsoft.Maui.Devices.DeviceDisplay.Current.MainDisplayInfo.Density; + var expectedInPixels = density * searchBar.TranslationX; + + Assert.Equal(expectedInPixels, translation, 1.0); + + var translationY = nativeView.TranslationY; + var expectedYInPixels = density * searchBar.TranslationY; + Assert.Equal(expectedYInPixels, translationY, 1.0); + }); + } } } diff --git a/src/Controls/tests/DeviceTests/Elements/SwipeView/SwipeViewTests.Android.cs b/src/Controls/tests/DeviceTests/Elements/SwipeView/SwipeViewTests.Android.cs index bf29a1b1a387..978680d39c8d 100644 --- a/src/Controls/tests/DeviceTests/Elements/SwipeView/SwipeViewTests.Android.cs +++ b/src/Controls/tests/DeviceTests/Elements/SwipeView/SwipeViewTests.Android.cs @@ -171,23 +171,31 @@ await InvokeOnMainThreadAsync(() => }); } + //src/Compatibility/Core/tests/Android/TranslationTests.cs [Fact] - [Description("The IsVisible property of a SwipeView should match with native IsVisible")] - public async Task VerifySwipeViewIsVisibleProperty() + [Description("The Translation property of a SwipeView should match with native Translation")] + public async Task SwipeViewTranslationConsistent() { - var swipeView = new SwipeView + var swipeView = new SwipeView() { - IsVisible = false + TranslationX = 50, + TranslationY = -20 }; - var expectedValue = swipeView.IsVisible; var handler = await CreateHandlerAsync(swipeView); var nativeView = GetPlatformControl(handler); await InvokeOnMainThreadAsync(() => - { - var isVisible = nativeView.Visibility == Android.Views.ViewStates.Visible; - Assert.Equal(expectedValue, isVisible); - }); + { + var translation = nativeView.TranslationX; + var density = Microsoft.Maui.Devices.DeviceDisplay.Current.MainDisplayInfo.Density; + var expectedInPixels = density * swipeView.TranslationX; + + Assert.Equal(expectedInPixels, translation, 1.0); + + var translationY = nativeView.TranslationY; + var expectedYInPixels = density * swipeView.TranslationY; + Assert.Equal(expectedYInPixels, translationY, 1.0); + }); } [Fact] From 5458b3cdca0a842d0a6453f4931f3fc7dd0a9f67 Mon Sep 17 00:00:00 2001 From: nivetha-nagalingam Date: Mon, 17 Mar 2025 13:33:44 +0530 Subject: [PATCH 2/5] Added the helper method --- .../DeviceTests/ControlsHandlerTestBase.Android.cs | 11 +++++++++++ .../Elements/BoxView/BoxViewTests.Android.cs | 10 +--------- .../Elements/Button/ButtonTests.Android.cs | 10 +--------- .../Elements/CheckBox/CheckBoxTests.Android.cs | 10 +--------- .../DeviceTests/Elements/Entry/EntryTests.Android.cs | 10 +--------- .../Elements/SearchBar/SearchBarTests.Android.cs | 10 +--------- .../Elements/SwipeView/SwipeViewTests.Android.cs | 10 +--------- 7 files changed, 17 insertions(+), 54 deletions(-) diff --git a/src/Controls/tests/DeviceTests/ControlsHandlerTestBase.Android.cs b/src/Controls/tests/DeviceTests/ControlsHandlerTestBase.Android.cs index 5b02fb9ae307..fd928757641e 100644 --- a/src/Controls/tests/DeviceTests/ControlsHandlerTestBase.Android.cs +++ b/src/Controls/tests/DeviceTests/ControlsHandlerTestBase.Android.cs @@ -219,6 +219,17 @@ protected bool IsBackButtonVisible(IElementHandler handler) return false; } + protected void AssertTranslationMatches(Android.Views.View nativeView, double expectedTranslationX, double expectedTranslationY) + { + var context = nativeView?.Context ?? throw new InvalidOperationException("Context cannot be null."); + + var expectedXInPixels = context.ToPixels(expectedTranslationX); + Assert.Equal(expectedXInPixels, nativeView.TranslationX, precision: 1); + + var expectedYInPixels = context.ToPixels(expectedTranslationY); + Assert.Equal(expectedYInPixels, nativeView.TranslationY, precision: 1); + } + class WindowTestFragment : Fragment { TaskCompletionSource _taskCompletionSource = new TaskCompletionSource(); diff --git a/src/Controls/tests/DeviceTests/Elements/BoxView/BoxViewTests.Android.cs b/src/Controls/tests/DeviceTests/Elements/BoxView/BoxViewTests.Android.cs index 5641c3f58be4..933a39a4b2f9 100644 --- a/src/Controls/tests/DeviceTests/Elements/BoxView/BoxViewTests.Android.cs +++ b/src/Controls/tests/DeviceTests/Elements/BoxView/BoxViewTests.Android.cs @@ -144,15 +144,7 @@ public async Task BoxViewTranslationConsistent() var nativeView = GetNativeBoxView(handler); await InvokeOnMainThreadAsync(() => { - var translation = nativeView.TranslationX; - var density = Microsoft.Maui.Devices.DeviceDisplay.Current.MainDisplayInfo.Density; - var expectedInPixels = density * boxView.TranslationX; - - Assert.Equal(expectedInPixels, translation, 1.0); - - var translationY = nativeView.TranslationY; - var expectedYInPixels = density * boxView.TranslationY; - Assert.Equal(expectedYInPixels, translationY, 1.0); + AssertTranslationMatches(nativeView, boxView.TranslationX, boxView.TranslationY); }); } } diff --git a/src/Controls/tests/DeviceTests/Elements/Button/ButtonTests.Android.cs b/src/Controls/tests/DeviceTests/Elements/Button/ButtonTests.Android.cs index 55e9df5c47d3..e767a2167128 100644 --- a/src/Controls/tests/DeviceTests/Elements/Button/ButtonTests.Android.cs +++ b/src/Controls/tests/DeviceTests/Elements/Button/ButtonTests.Android.cs @@ -207,15 +207,7 @@ public async Task ButtonTranslationConsistent() var nativeView = GetPlatformButton(handler); await InvokeOnMainThreadAsync(() => { - var translation = nativeView.TranslationX; - var density = Microsoft.Maui.Devices.DeviceDisplay.Current.MainDisplayInfo.Density; - var expectedInPixels = density * button.TranslationX; - - Assert.Equal(expectedInPixels, translation, 1.0); - - var translationY = nativeView.TranslationY; - var expectedYInPixels = density * button.TranslationY; - Assert.Equal(expectedYInPixels, translationY, 1.0); + AssertTranslationMatches(nativeView, button.TranslationX, button.TranslationY); }); } } diff --git a/src/Controls/tests/DeviceTests/Elements/CheckBox/CheckBoxTests.Android.cs b/src/Controls/tests/DeviceTests/Elements/CheckBox/CheckBoxTests.Android.cs index 67bb14396928..bec2ebec1491 100644 --- a/src/Controls/tests/DeviceTests/Elements/CheckBox/CheckBoxTests.Android.cs +++ b/src/Controls/tests/DeviceTests/Elements/CheckBox/CheckBoxTests.Android.cs @@ -138,15 +138,7 @@ public async Task CheckBoxTranslationConsistent() var nativeView = GetNativeCheckBox(handler); await InvokeOnMainThreadAsync(() => { - var translation = nativeView.TranslationX; - var density = Microsoft.Maui.Devices.DeviceDisplay.Current.MainDisplayInfo.Density; - var expectedInPixels = density * checkBox.TranslationX; - - Assert.Equal(expectedInPixels, translation, 1.0); - - var translationY = nativeView.TranslationY; - var expectedYInPixels = density * checkBox.TranslationY; - Assert.Equal(expectedYInPixels, translationY, 1.0); + AssertTranslationMatches(nativeView, checkBox.TranslationX, checkBox.TranslationY); }); } } diff --git a/src/Controls/tests/DeviceTests/Elements/Entry/EntryTests.Android.cs b/src/Controls/tests/DeviceTests/Elements/Entry/EntryTests.Android.cs index 0cfbc0d18fb0..a5e0a0d8caaa 100644 --- a/src/Controls/tests/DeviceTests/Elements/Entry/EntryTests.Android.cs +++ b/src/Controls/tests/DeviceTests/Elements/Entry/EntryTests.Android.cs @@ -181,15 +181,7 @@ public async Task EntryTranslationConsistent() var nativeView = GetPlatformControl(handler); await InvokeOnMainThreadAsync(() => { - var translation = nativeView.TranslationX; - var density = Microsoft.Maui.Devices.DeviceDisplay.Current.MainDisplayInfo.Density; - var expectedInPixels = density * entry.TranslationX; - - Assert.Equal(expectedInPixels, translation, 1.0); - - var translationY = nativeView.TranslationY; - var expectedYInPixels = density * entry.TranslationY; - Assert.Equal(expectedYInPixels, translationY, 1.0); + AssertTranslationMatches(nativeView, entry.TranslationX, entry.TranslationY); }); } } diff --git a/src/Controls/tests/DeviceTests/Elements/SearchBar/SearchBarTests.Android.cs b/src/Controls/tests/DeviceTests/Elements/SearchBar/SearchBarTests.Android.cs index a18a5a41831d..42adf79416e5 100644 --- a/src/Controls/tests/DeviceTests/Elements/SearchBar/SearchBarTests.Android.cs +++ b/src/Controls/tests/DeviceTests/Elements/SearchBar/SearchBarTests.Android.cs @@ -163,15 +163,7 @@ public async Task SearchBarTranslationConsistent() var nativeView = GetPlatformControl(handler); await InvokeOnMainThreadAsync(() => { - var translation = nativeView.TranslationX; - var density = Microsoft.Maui.Devices.DeviceDisplay.Current.MainDisplayInfo.Density; - var expectedInPixels = density * searchBar.TranslationX; - - Assert.Equal(expectedInPixels, translation, 1.0); - - var translationY = nativeView.TranslationY; - var expectedYInPixels = density * searchBar.TranslationY; - Assert.Equal(expectedYInPixels, translationY, 1.0); + AssertTranslationMatches(nativeView, searchBar.TranslationX, searchBar.TranslationY); }); } } diff --git a/src/Controls/tests/DeviceTests/Elements/SwipeView/SwipeViewTests.Android.cs b/src/Controls/tests/DeviceTests/Elements/SwipeView/SwipeViewTests.Android.cs index 978680d39c8d..e4ae5910c8de 100644 --- a/src/Controls/tests/DeviceTests/Elements/SwipeView/SwipeViewTests.Android.cs +++ b/src/Controls/tests/DeviceTests/Elements/SwipeView/SwipeViewTests.Android.cs @@ -186,15 +186,7 @@ public async Task SwipeViewTranslationConsistent() var nativeView = GetPlatformControl(handler); await InvokeOnMainThreadAsync(() => { - var translation = nativeView.TranslationX; - var density = Microsoft.Maui.Devices.DeviceDisplay.Current.MainDisplayInfo.Density; - var expectedInPixels = density * swipeView.TranslationX; - - Assert.Equal(expectedInPixels, translation, 1.0); - - var translationY = nativeView.TranslationY; - var expectedYInPixels = density * swipeView.TranslationY; - Assert.Equal(expectedYInPixels, translationY, 1.0); + AssertTranslationMatches(nativeView, swipeView.TranslationX, swipeView.TranslationY); }); } From e7dab425ff23d2505bba40af5118128580a8a3eb Mon Sep 17 00:00:00 2001 From: nivetha-nagalingam Date: Tue, 1 Apr 2025 11:20:00 +0530 Subject: [PATCH 3/5] Reverted the changes --- .../SearchBar/SearchBarTests.Android.cs | 1 - .../SwipeView/SwipeViewTests.Android.cs | 19 +++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/src/Controls/tests/DeviceTests/Elements/SearchBar/SearchBarTests.Android.cs b/src/Controls/tests/DeviceTests/Elements/SearchBar/SearchBarTests.Android.cs index 42adf79416e5..0c1bd108b5ae 100644 --- a/src/Controls/tests/DeviceTests/Elements/SearchBar/SearchBarTests.Android.cs +++ b/src/Controls/tests/DeviceTests/Elements/SearchBar/SearchBarTests.Android.cs @@ -8,7 +8,6 @@ using Xunit; using SearchView = AndroidX.AppCompat.Widget.SearchView; - namespace Microsoft.Maui.DeviceTests { public partial class SearchBarTests diff --git a/src/Controls/tests/DeviceTests/Elements/SwipeView/SwipeViewTests.Android.cs b/src/Controls/tests/DeviceTests/Elements/SwipeView/SwipeViewTests.Android.cs index e4ae5910c8de..61dfdf051bd3 100644 --- a/src/Controls/tests/DeviceTests/Elements/SwipeView/SwipeViewTests.Android.cs +++ b/src/Controls/tests/DeviceTests/Elements/SwipeView/SwipeViewTests.Android.cs @@ -171,6 +171,25 @@ await InvokeOnMainThreadAsync(() => }); } + [Fact] + [Description("The IsVisible property of a SwipeView should match with native IsVisible")] + public async Task VerifySwipeViewIsVisibleProperty() + { + var swipeView = new SwipeView + { + IsVisible = false + }; + var expectedValue = swipeView.IsVisible; + + var handler = await CreateHandlerAsync(swipeView); + var nativeView = GetPlatformControl(handler); + await InvokeOnMainThreadAsync(() => + { + var isVisible = nativeView.Visibility == Android.Views.ViewStates.Visible; + Assert.Equal(expectedValue, isVisible); + }); + } + //src/Compatibility/Core/tests/Android/TranslationTests.cs [Fact] [Description("The Translation property of a SwipeView should match with native Translation")] From b449c4f4041f7277e9913641e426bb2d97beba81 Mon Sep 17 00:00:00 2001 From: nivetha-nagalingam Date: Thu, 17 Apr 2025 12:08:43 +0530 Subject: [PATCH 4/5] Updated EditorTests.Android.cs --- .../tests/DeviceTests/Elements/Editor/EditorTests.Android.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Controls/tests/DeviceTests/Elements/Editor/EditorTests.Android.cs b/src/Controls/tests/DeviceTests/Elements/Editor/EditorTests.Android.cs index b0f0b0b61cef..5e3e62d4abf2 100644 --- a/src/Controls/tests/DeviceTests/Elements/Editor/EditorTests.Android.cs +++ b/src/Controls/tests/DeviceTests/Elements/Editor/EditorTests.Android.cs @@ -191,3 +191,4 @@ await InvokeOnMainThreadAsync(() => }); } } +} From 12c9c16b9d84c4b60c97cf8937747c848d859f8f Mon Sep 17 00:00:00 2001 From: nivetha-nagalingam Date: Wed, 14 May 2025 13:10:18 +0530 Subject: [PATCH 5/5] Fix formating --- .../Elements/SwipeView/SwipeViewTests.Android.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Controls/tests/DeviceTests/Elements/SwipeView/SwipeViewTests.Android.cs b/src/Controls/tests/DeviceTests/Elements/SwipeView/SwipeViewTests.Android.cs index 61dfdf051bd3..2b6245a23f3b 100644 --- a/src/Controls/tests/DeviceTests/Elements/SwipeView/SwipeViewTests.Android.cs +++ b/src/Controls/tests/DeviceTests/Elements/SwipeView/SwipeViewTests.Android.cs @@ -172,7 +172,7 @@ await InvokeOnMainThreadAsync(() => } [Fact] - [Description("The IsVisible property of a SwipeView should match with native IsVisible")] + [Description("The IsVisible property of a SwipeView should match with native IsVisible")] public async Task VerifySwipeViewIsVisibleProperty() { var swipeView = new SwipeView @@ -185,9 +185,9 @@ public async Task VerifySwipeViewIsVisibleProperty() var nativeView = GetPlatformControl(handler); await InvokeOnMainThreadAsync(() => { - var isVisible = nativeView.Visibility == Android.Views.ViewStates.Visible; - Assert.Equal(expectedValue, isVisible); - }); + var isVisible = nativeView.Visibility == Android.Views.ViewStates.Visible; + Assert.Equal(expectedValue, isVisible); + }); } //src/Compatibility/Core/tests/Android/TranslationTests.cs