From 7a779fcd3603934b9acda041265621c85ca737b9 Mon Sep 17 00:00:00 2001 From: Jerome Laban Date: Thu, 3 Oct 2024 11:38:31 -0400 Subject: [PATCH 01/27] chore: adjust for CLI limit on android tests (cherry picked from commit cb65def5b5c759ff227cb03a51773348c812cdac) --- build/test-scripts/android-uitest-run.sh | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/build/test-scripts/android-uitest-run.sh b/build/test-scripts/android-uitest-run.sh index f37a07c4f3ba..156875b645ef 100755 --- a/build/test-scripts/android-uitest-run.sh +++ b/build/test-scripts/android-uitest-run.sh @@ -231,15 +231,16 @@ else cd $UNO_TESTS_LOCAL_TESTS_FILE - ## Run NUnit tests - dotnet test \ - -c Release \ - -l:"console;verbosity=normal" \ - --logger "nunit;LogFileName=$UNO_ORIGINAL_TEST_RESULTS" \ - --filter "$UNO_TESTS_FILTER" \ - --blame-hang-timeout 120m \ - -v m || true + # Response file for testing to avoid the command line length limitation + echo "test" > tests.rsp + echo "-l:\"console;verbosity=normal\"" >> tests.rsp + echo "--logger \"nunit;LogFileName=$UNO_ORIGINAL_TEST_RESULTS\"" >> tests.rsp + echo "--filter \"$UNO_TESTS_FILTER\"" >> tests.rsp + echo "--blame-hang-timeout 120m" >> tests.rsp + echo "-v m" >> tests.rsp + ## Run NUnit tests + dotnet @tests.rsp || true fi ## Dump the emulator's system log From 422743de3869d5d1f97ff30bd7dfcdc117a29189 Mon Sep 17 00:00:00 2001 From: Jerome Laban Date: Thu, 3 Oct 2024 12:06:36 -0400 Subject: [PATCH 02/27] chore: Adjust response file (cherry picked from commit 14e59f3eb3a85b8f1612e4685616d67289f394d6) --- build/test-scripts/android-uitest-run.sh | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/build/test-scripts/android-uitest-run.sh b/build/test-scripts/android-uitest-run.sh index 156875b645ef..f8d039d22e56 100755 --- a/build/test-scripts/android-uitest-run.sh +++ b/build/test-scripts/android-uitest-run.sh @@ -232,15 +232,14 @@ else cd $UNO_TESTS_LOCAL_TESTS_FILE # Response file for testing to avoid the command line length limitation - echo "test" > tests.rsp - echo "-l:\"console;verbosity=normal\"" >> tests.rsp - echo "--logger \"nunit;LogFileName=$UNO_ORIGINAL_TEST_RESULTS\"" >> tests.rsp - echo "--filter \"$UNO_TESTS_FILTER\"" >> tests.rsp - echo "--blame-hang-timeout 120m" >> tests.rsp - echo "-v m" >> tests.rsp + echo "-l:\"console;verbosity=normal\" " > tests.rsp + echo "--logger \"nunit;LogFileName=$UNO_ORIGINAL_TEST_RESULTS\" " >> tests.rsp + echo "--filter \"$UNO_TESTS_FILTER\" " >> tests.rsp + echo "--blame-hang-timeout 120m " >> tests.rsp + echo "-v m " >> tests.rsp ## Run NUnit tests - dotnet @tests.rsp || true + dotnet test @tests.rsp || true fi ## Dump the emulator's system log From e6cad8eb38ad1b92d16f597b1169ef98021a85b9 Mon Sep 17 00:00:00 2001 From: Jerome Laban Date: Thu, 3 Oct 2024 13:20:08 -0400 Subject: [PATCH 03/27] chore: adjust response options (cherry picked from commit 622ed96725be870a36639e26c52d8ba1409b384f) --- build/test-scripts/android-uitest-run.sh | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/build/test-scripts/android-uitest-run.sh b/build/test-scripts/android-uitest-run.sh index f8d039d22e56..cf751424fe64 100755 --- a/build/test-scripts/android-uitest-run.sh +++ b/build/test-scripts/android-uitest-run.sh @@ -232,14 +232,16 @@ else cd $UNO_TESTS_LOCAL_TESTS_FILE # Response file for testing to avoid the command line length limitation - echo "-l:\"console;verbosity=normal\" " > tests.rsp - echo "--logger \"nunit;LogFileName=$UNO_ORIGINAL_TEST_RESULTS\" " >> tests.rsp - echo "--filter \"$UNO_TESTS_FILTER\" " >> tests.rsp - echo "--blame-hang-timeout 120m " >> tests.rsp - echo "-v m " >> tests.rsp + # new parameters must include the ":" to separate parameter options + echo "test" > tests.rsp + echo "-l:\"console;verbosity=normal\"" >> tests.rsp + echo "--logger:\"nunit;LogFileName=$UNO_ORIGINAL_TEST_RESULTS\"" >> tests.rsp + echo "--filter:\"$UNO_TESTS_FILTER\"" >> tests.rsp + echo "--blame-hang-timeout:120m" >> tests.rsp + echo "-v:m " >> tests.rsp ## Run NUnit tests - dotnet test @tests.rsp || true + dotnet @tests.rsp || true fi ## Dump the emulator's system log From 2d438b90b4b2fc4c25e348cbeab64e846ada326f Mon Sep 17 00:00:00 2001 From: Jerome Laban Date: Thu, 3 Oct 2024 22:37:24 -0400 Subject: [PATCH 04/27] test: Adjust test duration for navigation On iOS simulators on CI, the navigation can be very slow. (cherry picked from commit 696e3bc96d89f50b68178725c3c1f4e1cf809b46) # Conflicts: # src/Uno.UI.RuntimeTests/Tests/Microsoft_UI_Xaml_Controls/Given_WebView2.cs # src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml_Controls/Given_WebView.cs --- .../Given_WebView2.cs | 20 ++++++++++++++----- .../Windows_UI_Xaml_Controls/Given_WebView.cs | 12 ++++++++++- 2 files changed, 26 insertions(+), 6 deletions(-) diff --git a/src/Uno.UI.RuntimeTests/Tests/Microsoft_UI_Xaml_Controls/Given_WebView2.cs b/src/Uno.UI.RuntimeTests/Tests/Microsoft_UI_Xaml_Controls/Given_WebView2.cs index abc69ebe6996..32290b39ea09 100644 --- a/src/Uno.UI.RuntimeTests/Tests/Microsoft_UI_Xaml_Controls/Given_WebView2.cs +++ b/src/Uno.UI.RuntimeTests/Tests/Microsoft_UI_Xaml_Controls/Given_WebView2.cs @@ -75,14 +75,14 @@ public async Task When_NavigateToString() webView.NavigationCompleted += (s, e) => navigationDone = true; webView.Source = uri; Assert.IsNotNull(webView.Source); - await TestServices.WindowHelper.WaitFor(() => navigationStarting, 3000); - await TestServices.WindowHelper.WaitFor(() => navigationDone, 3000); + await TestServices.WindowHelper.WaitFor(() => navigationStarting, 10000); + await TestServices.WindowHelper.WaitFor(() => navigationDone, 10000); Assert.IsNotNull(webView.Source); navigationStarting = false; navigationDone = false; webView.NavigateToString(""); - await TestServices.WindowHelper.WaitFor(() => navigationStarting, 3000); - await TestServices.WindowHelper.WaitFor(() => navigationDone, 3000); + await TestServices.WindowHelper.WaitFor(() => navigationStarting, 10000); + await TestServices.WindowHelper.WaitFor(() => navigationDone, 10000); Assert.AreEqual(new Uri("about:blank"), webView.Source); } @@ -106,8 +106,13 @@ public async Task When_GoBack() Assert.IsFalse(webView.CanGoForward); webView.NavigationCompleted += (sender, e) => navigated = true; +<<<<<<< HEAD webView.CoreWebView2.Navigate("https://example.com/1"); await TestServices.WindowHelper.WaitFor(() => navigated, 3000); +======= + webView.CoreWebView2.Navigate("https://uno-assets.platform.uno/tests/docs/WebView_NavigateToAnchor.html"); + await TestServices.WindowHelper.WaitFor(() => navigated, 10000); +>>>>>>> 696e3bc96d (test: Adjust test duration for navigation) Assert.IsFalse(webView.CoreWebView2.CanGoBack); Assert.IsFalse(webView.CanGoBack); @@ -115,15 +120,20 @@ public async Task When_GoBack() Assert.IsFalse(webView.CanGoForward); navigated = false; +<<<<<<< HEAD webView.CoreWebView2.Navigate("https://example.com/2"); await TestServices.WindowHelper.WaitFor(() => navigated, 3000); +======= + webView.CoreWebView2.Navigate("https://platform.uno"); + await TestServices.WindowHelper.WaitFor(() => navigated, 10000); +>>>>>>> 696e3bc96d (test: Adjust test duration for navigation) Assert.IsTrue(webView.CoreWebView2.CanGoBack); Assert.IsTrue(webView.CanGoBack); navigated = false; webView.GoBack(); - await TestServices.WindowHelper.WaitFor(() => navigated, 3000); + await TestServices.WindowHelper.WaitFor(() => navigated, 10000); Assert.IsFalse(webView.CoreWebView2.CanGoBack); Assert.IsFalse(webView.CanGoBack); diff --git a/src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml_Controls/Given_WebView.cs b/src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml_Controls/Given_WebView.cs index b4ef0e6bbb57..f66bdd19ba8d 100644 --- a/src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml_Controls/Given_WebView.cs +++ b/src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml_Controls/Given_WebView.cs @@ -141,21 +141,31 @@ public async Task When_GoBack() Assert.IsFalse(webView.CanGoForward); webView.NavigationCompleted += (sender, e) => navigated = true; +<<<<<<< HEAD webView.Navigate(new Uri("https://example.com/1")); await TestServices.WindowHelper.WaitFor(() => navigated, 3000); +======= + webView.Navigate(new Uri("https://uno-assets.platform.uno/tests/docs/WebView_NavigateToAnchor.html")); + await TestServices.WindowHelper.WaitFor(() => navigated, 10000); +>>>>>>> 696e3bc96d (test: Adjust test duration for navigation) Assert.IsFalse(webView.CanGoBack); Assert.IsFalse(webView.CanGoForward); navigated = false; +<<<<<<< HEAD webView.Navigate(new Uri("https://example.com/2")); await TestServices.WindowHelper.WaitFor(() => navigated, 3000); +======= + webView.Navigate(new Uri("https://platform.uno")); + await TestServices.WindowHelper.WaitFor(() => navigated, 10000); +>>>>>>> 696e3bc96d (test: Adjust test duration for navigation) Assert.IsTrue(webView.CanGoBack); navigated = false; webView.GoBack(); - await TestServices.WindowHelper.WaitFor(() => navigated, 3000); + await TestServices.WindowHelper.WaitFor(() => navigated, 10000); Assert.IsFalse(webView.CanGoBack); Assert.IsTrue(webView.CanGoForward); From b880f6811ea178fccc77d278f80fff139e880dbe Mon Sep 17 00:00:00 2001 From: Jerome Laban Date: Thu, 3 Oct 2024 22:44:26 -0400 Subject: [PATCH 05/27] chore: Fix When_Image_Source_Nullify race condition (cherry picked from commit c0fe0c4944158cdb846a9ad560b3b7e84993a8f1) --- .../Tests/Windows_UI_Xaml_Controls/Given_Image.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml_Controls/Given_Image.cs b/src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml_Controls/Given_Image.cs index 1b1ce5e23cd9..d75f7087c6de 100644 --- a/src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml_Controls/Given_Image.cs +++ b/src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml_Controls/Given_Image.cs @@ -356,13 +356,20 @@ public async Task When_Image_Source_Nullify() { Width = 100, Height = 100, - Source = new BitmapImage(new Uri("ms-appx:///Assets/square100.png")), Stretch = Stretch.Fill }; + var imageOpened = false; + image.ImageOpened += (_, _) => imageOpened = true; + + SUT.Source = new BitmapImage(new Uri("ms-appx:///Assets/square100.png")); + parent.Child = SUT; WindowHelper.WindowContent = parent; await WindowHelper.WaitForLoaded(parent); + + await TestServices.WindowHelper.WaitFor(() => imageOpened, 3000); + var result = await TakeScreenshot(parent); var sample = parent.GetRelativeCoords(SUT); From 0996e3ab459d4a2a434ddba3fda2b3c8f10b305f Mon Sep 17 00:00:00 2001 From: Jerome Laban Date: Thu, 3 Oct 2024 22:51:24 -0400 Subject: [PATCH 06/27] chore: Adjust ValidateOverflowScrollViewerDoesNotScrollWithArrowKeys (cherry picked from commit f470534b97b0729504fdf212ba4d34f4cfd2d30b) --- .../commandbar/CommandBarIntegrationTests.cs | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/Uno.UI.RuntimeTests/IntegrationTests/dxaml/controls/commandbar/CommandBarIntegrationTests.cs b/src/Uno.UI.RuntimeTests/IntegrationTests/dxaml/controls/commandbar/CommandBarIntegrationTests.cs index 144222b9b17f..91323b004084 100644 --- a/src/Uno.UI.RuntimeTests/IntegrationTests/dxaml/controls/commandbar/CommandBarIntegrationTests.cs +++ b/src/Uno.UI.RuntimeTests/IntegrationTests/dxaml/controls/commandbar/CommandBarIntegrationTests.cs @@ -1364,13 +1364,18 @@ await RunOnUIThread(() => KeyboardHelper.Down(secondaryItemsPresenter); await WindowHelper.WaitForIdle(); - await RunOnUIThread(() => + await TestHelper.RetryAssert(async () => { - var item = (AppBarButton)cmdBar.SecondaryCommands[0]; - var transform = item.TransformToVisual(null); - var firstItemNewPosition = transform.TransformPoint(new Point(0, 0)); + // This keyboard and animation driven, it may need a few retries to get the right position. - VERIFY_ARE_EQUAL(firstItemNewPosition, firstItemOriginalPosition); + await RunOnUIThread(() => + { + var item = (AppBarButton)cmdBar.SecondaryCommands[0]; + var transform = item.TransformToVisual(null); + var firstItemNewPosition = transform.TransformPoint(new Point(0, 0)); + + VERIFY_ARE_EQUAL(firstItemNewPosition, firstItemOriginalPosition); + }); }); } From 0371525199fea4adc551febef23bdcd8be1fa6e6 Mon Sep 17 00:00:00 2001 From: Jerome Laban Date: Thu, 3 Oct 2024 23:07:50 -0400 Subject: [PATCH 07/27] chore: Adjust test (cherry picked from commit 21bdd95951b72393c19f27bd8548b335e3ad8a13) --- .../Tests/Windows_UI_Xaml_Controls/Given_Image.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml_Controls/Given_Image.cs b/src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml_Controls/Given_Image.cs index d75f7087c6de..96ad9023563a 100644 --- a/src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml_Controls/Given_Image.cs +++ b/src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml_Controls/Given_Image.cs @@ -360,7 +360,7 @@ public async Task When_Image_Source_Nullify() }; var imageOpened = false; - image.ImageOpened += (_, _) => imageOpened = true; + SUT.ImageOpened += (_, _) => imageOpened = true; SUT.Source = new BitmapImage(new Uri("ms-appx:///Assets/square100.png")); From 2b34cf7768608a523d466437caf5997fec5a174a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Laban?= Date: Thu, 3 Oct 2024 14:37:53 -0400 Subject: [PATCH 08/27] chore: Adjust response (cherry picked from commit 302378db43836a16875431447585ddbd4ea34079) --- build/test-scripts/android-uitest-run.sh | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/build/test-scripts/android-uitest-run.sh b/build/test-scripts/android-uitest-run.sh index cf751424fe64..65288c0c8820 100755 --- a/build/test-scripts/android-uitest-run.sh +++ b/build/test-scripts/android-uitest-run.sh @@ -233,15 +233,17 @@ else # Response file for testing to avoid the command line length limitation # new parameters must include the ":" to separate parameter options - echo "test" > tests.rsp - echo "-l:\"console;verbosity=normal\"" >> tests.rsp - echo "--logger:\"nunit;LogFileName=$UNO_ORIGINAL_TEST_RESULTS\"" >> tests.rsp - echo "--filter:\"$UNO_TESTS_FILTER\"" >> tests.rsp - echo "--blame-hang-timeout:120m" >> tests.rsp - echo "-v:m " >> tests.rsp + # the response file contains only the filters, in order to get proper stderr + echo "--filter:\"$UNO_TESTS_FILTER\"" > tests.rsp ## Run NUnit tests - dotnet @tests.rsp || true + dotnet test \ + -c Release \ + -l:"console;verbosity=normal" \ + --logger "nunit;LogFileName=$UNO_ORIGINAL_TEST_RESULTS" \ + --blame-hang-timeout 120m \ + -v m \ + @tests.rsp || true fi ## Dump the emulator's system log From bd484aec7374ec97162481b2507bb0cb766280f8 Mon Sep 17 00:00:00 2001 From: Jerome Laban Date: Fri, 4 Oct 2024 07:51:08 -0400 Subject: [PATCH 09/27] chore: Adjust for collected TextBoxView reference (cherry picked from commit febb5fa1b2a9a69b56a37f55a35f7a3472fd1e4f) --- src/Uno.UI/UI/Xaml/Controls/TextBox/TextBoxView.Android.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Uno.UI/UI/Xaml/Controls/TextBox/TextBoxView.Android.cs b/src/Uno.UI/UI/Xaml/Controls/TextBox/TextBoxView.Android.cs index 8069abc79a66..4434466b2161 100644 --- a/src/Uno.UI/UI/Xaml/Controls/TextBox/TextBoxView.Android.cs +++ b/src/Uno.UI/UI/Xaml/Controls/TextBox/TextBoxView.Android.cs @@ -314,7 +314,10 @@ private void OnForegroundChanged(Brush oldValue, Brush newValue) void ApplyColor() { - if (_isDisposed) + if (_isDisposed + + // This is based on `Java.Interop.JniPeerMembers.AssertSelf` + || !this.PeerReference.IsValid) { // Binding changes may happen after the // underlying control has been disposed From 32b97106e046ab86f4ead4989de9d47d827b016e Mon Sep 17 00:00:00 2001 From: Jerome Laban Date: Thu, 3 Oct 2024 11:38:31 -0400 Subject: [PATCH 10/27] chore: adjust for CLI limit on android tests (cherry picked from commit f97f60670c112fcfc1169639801debf80ca23535) --- build/test-scripts/android-uitest-run.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 build/test-scripts/android-uitest-run.sh diff --git a/build/test-scripts/android-uitest-run.sh b/build/test-scripts/android-uitest-run.sh old mode 100755 new mode 100644 From 03d83d42f5e21fe4a0d4132e68aa92fcecb2cd5c Mon Sep 17 00:00:00 2001 From: Jerome Laban Date: Thu, 3 Oct 2024 12:06:36 -0400 Subject: [PATCH 11/27] chore: Adjust response file (cherry picked from commit 9aee7a92078fdc0f6fd879e1bf7a94f1acaf7573) --- build/test-scripts/android-uitest-run.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build/test-scripts/android-uitest-run.sh b/build/test-scripts/android-uitest-run.sh index 65288c0c8820..3e071eb67133 100644 --- a/build/test-scripts/android-uitest-run.sh +++ b/build/test-scripts/android-uitest-run.sh @@ -235,8 +235,8 @@ else # new parameters must include the ":" to separate parameter options # the response file contains only the filters, in order to get proper stderr echo "--filter:\"$UNO_TESTS_FILTER\"" > tests.rsp + echo "-v m" >> tests.rsp - ## Run NUnit tests dotnet test \ -c Release \ -l:"console;verbosity=normal" \ @@ -244,6 +244,7 @@ else --blame-hang-timeout 120m \ -v m \ @tests.rsp || true + dotnet @tests.rsp || true fi ## Dump the emulator's system log From 5322bee4718a0028092168292e57d8daf5691759 Mon Sep 17 00:00:00 2001 From: Jerome Laban Date: Thu, 3 Oct 2024 13:20:08 -0400 Subject: [PATCH 12/27] chore: adjust response options (cherry picked from commit 29faf4b7ac8095c4d5f249ec90de9f714c43aff6) --- build/test-scripts/android-uitest-run.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/build/test-scripts/android-uitest-run.sh b/build/test-scripts/android-uitest-run.sh index 3e071eb67133..65288c0c8820 100644 --- a/build/test-scripts/android-uitest-run.sh +++ b/build/test-scripts/android-uitest-run.sh @@ -235,8 +235,8 @@ else # new parameters must include the ":" to separate parameter options # the response file contains only the filters, in order to get proper stderr echo "--filter:\"$UNO_TESTS_FILTER\"" > tests.rsp - echo "-v m" >> tests.rsp + ## Run NUnit tests dotnet test \ -c Release \ -l:"console;verbosity=normal" \ @@ -244,7 +244,6 @@ else --blame-hang-timeout 120m \ -v m \ @tests.rsp || true - dotnet @tests.rsp || true fi ## Dump the emulator's system log From 32f4b54b182ea75c7edb0e51074dd2e8a4dbe952 Mon Sep 17 00:00:00 2001 From: Jerome Laban Date: Fri, 4 Oct 2024 08:21:08 -0400 Subject: [PATCH 13/27] chore: Adjust execute flag (cherry picked from commit 4b3cbaaac152e558b7127d5d857b0bec6fd14ec9) --- build/ci/.azure-devops-android-tests.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build/ci/.azure-devops-android-tests.yml b/build/ci/.azure-devops-android-tests.yml index 331df7e66022..bd53d98f5391 100644 --- a/build/ci/.azure-devops-android-tests.yml +++ b/build/ci/.azure-devops-android-tests.yml @@ -178,6 +178,8 @@ jobs: ## First tests run (https://github.com/unoplatform/uno/issues/6714) - bash: | + # always set execute bit, as git has a tendency to remove it + chmod +x $(build.sourcesdirectory)/build/test-scripts/android-uitest-run.sh $(build.sourcesdirectory)/build/test-scripts/android-uitest-run.sh displayName: Run Android Tests From 8644ac71e0fa1597e4d375dccc8a1a5d285430ee Mon Sep 17 00:00:00 2001 From: Jerome Laban Date: Fri, 4 Oct 2024 09:17:06 -0400 Subject: [PATCH 14/27] chore: Don't copy crash reports if the folder does not exist (cherry picked from commit 00d5b310031983c326569ed21dce5023ea2a29a7) --- build/test-scripts/ios-uitest-run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/test-scripts/ios-uitest-run.sh b/build/test-scripts/ios-uitest-run.sh index 3e58f7acc2c5..321be664a997 100755 --- a/build/test-scripts/ios-uitest-run.sh +++ b/build/test-scripts/ios-uitest-run.sh @@ -287,7 +287,7 @@ if [ ! -f "$UNO_ORIGINAL_TEST_RESULTS" ]; then fi echo "Copying crash reports" -cp -R ~/Library/Logs/DiagnosticReports/* $LOG_FILE_DIRECTORY +cp -R ~/Library/Logs/DiagnosticReports/* $LOG_FILE_DIRECTORY || true pushd $BUILD_SOURCESDIRECTORY/src/Uno.NUnitTransformTool mkdir -p $(dirname ${UNO_TESTS_FAILED_LIST}) From b099ca5417f16d56a5c99147538bf38b1d1b09a5 Mon Sep 17 00:00:00 2001 From: Jerome Laban Date: Fri, 4 Oct 2024 09:17:20 -0400 Subject: [PATCH 15/27] chore: Log more commandbar tests (cherry picked from commit f0b6abc7d610242e2516476c6196f2bf0b629751) --- .../dxaml/controls/commandbar/CommandBarIntegrationTests.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Uno.UI.RuntimeTests/IntegrationTests/dxaml/controls/commandbar/CommandBarIntegrationTests.cs b/src/Uno.UI.RuntimeTests/IntegrationTests/dxaml/controls/commandbar/CommandBarIntegrationTests.cs index 91323b004084..7f200bc5a6b2 100644 --- a/src/Uno.UI.RuntimeTests/IntegrationTests/dxaml/controls/commandbar/CommandBarIntegrationTests.cs +++ b/src/Uno.UI.RuntimeTests/IntegrationTests/dxaml/controls/commandbar/CommandBarIntegrationTests.cs @@ -5231,7 +5231,11 @@ private async Task CloseCommandBar(CommandBar cmdBar) var closedRegistration = CreateSafeEventRegistration>("Closed"); closedRegistration.Attach(cmdBar, (s, e) => closedEvent.Set()); - await RunOnUIThread(() => cmdBar.IsOpen = false); + await RunOnUIThread(() => + { + Assert.IsTrue(cmdBar.IsOpen, "Command bar is not opened"); + cmdBar.IsOpen = false; + }); await closedEvent.WaitForDefault(); await WindowHelper.WaitForIdle(); } From 48ceea2c991616d4651ed44a86f087feac6714c2 Mon Sep 17 00:00:00 2001 From: Jerome Laban Date: Fri, 4 Oct 2024 09:41:37 -0400 Subject: [PATCH 16/27] chore: Adjust for When_Stretch instability (cherry picked from commit 82442d340efcaed59152970cd58c850566a6ef2d) --- .../Windows_UI_Xaml_Media/Given_ImageBrush.cs | 50 ++++++++++--------- 1 file changed, 27 insertions(+), 23 deletions(-) diff --git a/src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml_Media/Given_ImageBrush.cs b/src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml_Media/Given_ImageBrush.cs index aa758f9fd775..ca8ebbf95565 100644 --- a/src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml_Media/Given_ImageBrush.cs +++ b/src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml_Media/Given_ImageBrush.cs @@ -80,36 +80,40 @@ public async Task When_Stretch(Stretch stretch, bool useRectangle) WindowHelper.WindowContent = SUT; await WindowHelper.WaitForLoaded(SUT); - float BorderOffset = + // Retry is required because the brush even is not always raised + await TestHelper.RetryAssert(async () => + { + float BorderOffset = #if __SKIA__ - useRectangle ? 4 : 7; + useRectangle ? 4 : 7; #elif __IOS__ - 6; + 6; #else - 3; + 3; #endif - float width = (float)SUT.Width, height = (float)SUT.Height; - float centerX = width / 2, centerY = height / 2; - var expectations = stretch switch - { - // All edges are red-ish - Stretch.Fill => (Top: Redish, Bottom: Redish, Left: Redish, Right: Redish), - // Top and bottom are red-ish. Left and right are yellow-ish - Stretch.UniformToFill => (Top: Redish, Bottom: Redish, Left: Yellowish, Right: Yellowish), - // Top and bottom are same as background. Left and right are red-ish - Stretch.Uniform => (Top: Transparent, Bottom: Transparent, Left: Redish, Right: Redish), - // Everything is green-ish - Stretch.None => (Top: Greenish, Bottom: Greenish, Left: Greenish, Right: Greenish), + float width = (float)SUT.Width, height = (float)SUT.Height; + float centerX = width / 2, centerY = height / 2; + var expectations = stretch switch + { + // All edges are red-ish + Stretch.Fill => (Top: Redish, Bottom: Redish, Left: Redish, Right: Redish), + // Top and bottom are red-ish. Left and right are yellow-ish + Stretch.UniformToFill => (Top: Redish, Bottom: Redish, Left: Yellowish, Right: Yellowish), + // Top and bottom are same as background. Left and right are red-ish + Stretch.Uniform => (Top: Transparent, Bottom: Transparent, Left: Redish, Right: Redish), + // Everything is green-ish + Stretch.None => (Top: Greenish, Bottom: Greenish, Left: Greenish, Right: Greenish), - _ => throw new ArgumentOutOfRangeException($"unexpected stretch: {stretch}"), - }; + _ => throw new ArgumentOutOfRangeException($"unexpected stretch: {stretch}"), + }; - var bitmap = await UITestHelper.ScreenShot(SUT); + var bitmap = await UITestHelper.ScreenShot(SUT); - ImageAssert.HasColorAt(bitmap, centerX, BorderOffset, expectations.Top, tolerance: 28); - ImageAssert.HasColorAt(bitmap, centerX, height - BorderOffset, expectations.Bottom, tolerance: 28); - ImageAssert.HasColorAt(bitmap, BorderOffset, centerY, expectations.Left, tolerance: 28); - ImageAssert.HasColorAt(bitmap, width - BorderOffset, centerY, expectations.Right, tolerance: 28); + ImageAssert.HasColorAt(bitmap, centerX, BorderOffset, expectations.Top, tolerance: 28); + ImageAssert.HasColorAt(bitmap, centerX, height - BorderOffset, expectations.Bottom, tolerance: 28); + ImageAssert.HasColorAt(bitmap, BorderOffset, centerY, expectations.Left, tolerance: 28); + ImageAssert.HasColorAt(bitmap, width - BorderOffset, centerY, expectations.Right, tolerance: 28); + }, 10); } #if __SKIA__ From 4e0350d3757a95e0e43f1580fe61615530958070 Mon Sep 17 00:00:00 2001 From: Jerome Laban Date: Fri, 4 Oct 2024 10:52:03 -0400 Subject: [PATCH 17/27] chore: Adjust retries in ValidateVisualStateUpdatesWhenDynamicOverflowCausesItemsToMove (cherry picked from commit 21698a244bfd0db3dc33cb7bc199bceec1e99539) --- .../commandbar/CommandBarIntegrationTests.cs | 39 +++++++++++-------- 1 file changed, 22 insertions(+), 17 deletions(-) diff --git a/src/Uno.UI.RuntimeTests/IntegrationTests/dxaml/controls/commandbar/CommandBarIntegrationTests.cs b/src/Uno.UI.RuntimeTests/IntegrationTests/dxaml/controls/commandbar/CommandBarIntegrationTests.cs index 7f200bc5a6b2..197c144172d2 100644 --- a/src/Uno.UI.RuntimeTests/IntegrationTests/dxaml/controls/commandbar/CommandBarIntegrationTests.cs +++ b/src/Uno.UI.RuntimeTests/IntegrationTests/dxaml/controls/commandbar/CommandBarIntegrationTests.cs @@ -3256,27 +3256,32 @@ await RunOnUIThread(() => VERIFY_ARE_EQUAL(primaryItemsControl.Visibility, Visibility.Collapsed); }); - LOG_OUTPUT("Now open and close the CommandBar."); - await OpenCommandBar(cmdBar, OpenMethod.Programmatic); - await CloseCommandBar(cmdBar); - - await RunOnUIThread(() => + // in some unknown conditions, the OpenCommandBar may not happen on android + // Retry a few times until it does. + await TestHelper.RetryAssert(async () => { - LOG_OUTPUT("The primary items control should still be collapsed."); - VERIFY_ARE_EQUAL(primaryItemsControl.Visibility, Visibility.Collapsed); + LOG_OUTPUT("Now open and close the CommandBar."); + await OpenCommandBar(cmdBar, OpenMethod.Programmatic); + await CloseCommandBar(cmdBar); - LOG_OUTPUT("Change the width of the CommandBar back to 600. The AppBarButton should be moved back from the overflow."); - expectItemsAdded = false; - cmdBar.Width = 600; - }); + await RunOnUIThread(() => + { + LOG_OUTPUT("The primary items control should still be collapsed."); + VERIFY_ARE_EQUAL(primaryItemsControl.Visibility, Visibility.Collapsed); - await dynamicOverflowItemsChangingEvent.WaitForDefault(); - await WindowHelper.WaitForIdle(); + LOG_OUTPUT("Change the width of the CommandBar back to 600. The AppBarButton should be moved back from the overflow."); + expectItemsAdded = false; + cmdBar.Width = 600; + }); - await RunOnUIThread(() => - { - LOG_OUTPUT("The primary items control should now be visible since the AppBarButton is back in it."); - VERIFY_ARE_EQUAL(primaryItemsControl.Visibility, Visibility.Visible); + await dynamicOverflowItemsChangingEvent.WaitForDefault(); + await WindowHelper.WaitForIdle(); + + await RunOnUIThread(() => + { + LOG_OUTPUT("The primary items control should now be visible since the AppBarButton is back in it."); + VERIFY_ARE_EQUAL(primaryItemsControl.Visibility, Visibility.Visible); + }); }); } From 228cc24fb073fa52d4ba0b815a86e70d3dd1c7e0 Mon Sep 17 00:00:00 2001 From: Jerome Laban Date: Fri, 4 Oct 2024 12:38:24 -0400 Subject: [PATCH 18/27] chore: Adjust default style for button to remove animation (cherry picked from commit 5f83f29878fe9eed71cfed578ee30ea7c0401069) --- src/SamplesApp/SamplesApp.Shared/App.xaml | 143 ++++++++++++++++++++++ 1 file changed, 143 insertions(+) diff --git a/src/SamplesApp/SamplesApp.Shared/App.xaml b/src/SamplesApp/SamplesApp.Shared/App.xaml index 508e7be4d003..db6edb0ef5bc 100644 --- a/src/SamplesApp/SamplesApp.Shared/App.xaml +++ b/src/SamplesApp/SamplesApp.Shared/App.xaml @@ -7,6 +7,7 @@ xmlns:ios="http://nventive.com/ios" xmlns:local="using:SamplesApp" xmlns:toolkit="using:Uno.UI.Toolkit" + xmlns:uc="using:Uno.UI.Controls" mc:Ignorable="ios" RequestedTheme="Light"> @@ -170,6 +171,148 @@ global App.Resources + + + + From 3c95d94b78b12f0b0e56b9df5722af7d58b064db Mon Sep 17 00:00:00 2001 From: Jerome Laban Date: Fri, 4 Oct 2024 12:38:36 -0400 Subject: [PATCH 19/27] chore: Close popups at the end of the test (cherry picked from commit a65da3b545c0e6d792aae3a47d16684068166621) --- .../Flyout/Flyout_ShowAt_Window_Content.xaml.cs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/SamplesApp/UITests.Shared/Windows_UI_Xaml_Controls/Flyout/Flyout_ShowAt_Window_Content.xaml.cs b/src/SamplesApp/UITests.Shared/Windows_UI_Xaml_Controls/Flyout/Flyout_ShowAt_Window_Content.xaml.cs index 0ea6ee55137a..ef30e9d6f045 100644 --- a/src/SamplesApp/UITests.Shared/Windows_UI_Xaml_Controls/Flyout/Flyout_ShowAt_Window_Content.xaml.cs +++ b/src/SamplesApp/UITests.Shared/Windows_UI_Xaml_Controls/Flyout/Flyout_ShowAt_Window_Content.xaml.cs @@ -1,7 +1,9 @@ -using Uno.UI.Samples.Controls; + +using Uno.UI.Samples.Controls; using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Controls; using Microsoft.UI.Xaml.Media; +using Uno.UI.RuntimeTests.Tests.Windows_UI_Xaml; // The Blank Page item template is documented at https://go.microsoft.com/fwlink/?LinkId=234238 @@ -13,9 +15,18 @@ namespace UITests.Windows_UI_Xaml_Controls.FlyoutTests [Sample("Flyouts")] public sealed partial class Flyout_ShowAt_Window_Content : Page { + private XamlRoot _xamlRoot; + public Flyout_ShowAt_Window_Content() { this.InitializeComponent(); + + Unloaded += (s, e) => _xamlRoot = XamlRoot; + Unloaded += (s, e) => + { + // close all popups at the end of the test. + VisualTreeHelper.CloseAllPopups(_xamlRoot); + }; } private void ButtonButton_Click(object sender, RoutedEventArgs e) From 7c449acc65f74e3ba0e96407afe6b60ebe5333fc Mon Sep 17 00:00:00 2001 From: Jerome Laban Date: Fri, 4 Oct 2024 15:52:07 -0400 Subject: [PATCH 20/27] chore: Adjust for uno only (cherry picked from commit 81d69be523197973ee611a2fbc9194941197a269) --- .../Flyout/Flyout_ShowAt_Window_Content.xaml.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/SamplesApp/UITests.Shared/Windows_UI_Xaml_Controls/Flyout/Flyout_ShowAt_Window_Content.xaml.cs b/src/SamplesApp/UITests.Shared/Windows_UI_Xaml_Controls/Flyout/Flyout_ShowAt_Window_Content.xaml.cs index ef30e9d6f045..6ecafd6aef04 100644 --- a/src/SamplesApp/UITests.Shared/Windows_UI_Xaml_Controls/Flyout/Flyout_ShowAt_Window_Content.xaml.cs +++ b/src/SamplesApp/UITests.Shared/Windows_UI_Xaml_Controls/Flyout/Flyout_ShowAt_Window_Content.xaml.cs @@ -21,12 +21,14 @@ public Flyout_ShowAt_Window_Content() { this.InitializeComponent(); +#if HAS_UNO Unloaded += (s, e) => _xamlRoot = XamlRoot; Unloaded += (s, e) => { // close all popups at the end of the test. VisualTreeHelper.CloseAllPopups(_xamlRoot); }; +#endif } private void ButtonButton_Click(object sender, RoutedEventArgs e) From 099fd10f9dc728a1041d137ffce7076a6eada0bd Mon Sep 17 00:00:00 2001 From: Jerome Laban Date: Fri, 4 Oct 2024 15:52:23 -0400 Subject: [PATCH 21/27] chore: Retry calendar open/close test (cherry picked from commit da9268b218d8758687cb571d328cceaf55bc71c2) --- .../CalendarDatePickerIntegrationTests.cs | 62 ++++++++++--------- 1 file changed, 33 insertions(+), 29 deletions(-) diff --git a/src/Uno.UI.RuntimeTests/IntegrationTests/dxaml/controls/calendardatepicker/CalendarDatePickerIntegrationTests.cs b/src/Uno.UI.RuntimeTests/IntegrationTests/dxaml/controls/calendardatepicker/CalendarDatePickerIntegrationTests.cs index 6de28a26800b..ee5c39f18f99 100644 --- a/src/Uno.UI.RuntimeTests/IntegrationTests/dxaml/controls/calendardatepicker/CalendarDatePickerIntegrationTests.cs +++ b/src/Uno.UI.RuntimeTests/IntegrationTests/dxaml/controls/calendardatepicker/CalendarDatePickerIntegrationTests.cs @@ -263,46 +263,50 @@ public async Task CanOpenCloseFlyoutBySettingIsCalendarOpen() { TestCleanupWrapper cleanup; - Grid rootPanel = null; - CalendarDatePickerHelper helper = new CalendarDatePickerHelper(); - await helper.PrepareLoadedEvent(); - Microsoft.UI.Xaml.Controls.CalendarDatePicker cp = await helper.GetCalendarDatePicker(); + // This test may be unstable on iOS + await TestHelper.RetryAssert(async () => + { + Grid rootPanel = null; + CalendarDatePickerHelper helper = new CalendarDatePickerHelper(); + await helper.PrepareLoadedEvent(); + Microsoft.UI.Xaml.Controls.CalendarDatePicker cp = await helper.GetCalendarDatePicker(); - rootPanel = await CreateTestResources(); + rootPanel = await CreateTestResources(); - // load into visual tree - await RunOnUIThread(() => - { - rootPanel.Children.Append(cp); - }); + // load into visual tree + await RunOnUIThread(() => + { + rootPanel.Children.Append(cp); + }); - await helper.WaitForLoaded(); + await helper.WaitForLoaded(); - await TestServices.WindowHelper.WaitForIdle(); + await TestServices.WindowHelper.WaitForIdle(); - await helper.PrepareOpenedEvent(); + await helper.PrepareOpenedEvent(); - await RunOnUIThread(() => - { - cp.IsCalendarOpen = true; - }); - await helper.WaitForOpened(); + await RunOnUIThread(() => + { + cp.IsCalendarOpen = true; + }); + await helper.WaitForOpened(); - await helper.PrepareClosedEvent(); + await helper.PrepareClosedEvent(); - await RunOnUIThread(() => - { - cp.IsCalendarOpen = false; - }); + await RunOnUIThread(() => + { + cp.IsCalendarOpen = false; + }); - await helper.WaitForClosed(); + await helper.WaitForClosed(); - await RunOnUIThread(() => - { - // disable CP to make sure input pane is not open during clean up. - cp.IsEnabled = false; + await RunOnUIThread(() => + { + // disable CP to make sure input pane is not open during clean up. + cp.IsEnabled = false; + }); + await TestServices.WindowHelper.WaitForIdle(); }); - await TestServices.WindowHelper.WaitForIdle(); } [TestMethod] From aaf54c611f3a10c6644c0b8841440389a1cbdd17 Mon Sep 17 00:00:00 2001 From: Jerome Laban Date: Fri, 4 Oct 2024 16:52:26 -0400 Subject: [PATCH 22/27] chore: Adjust sample for winui (cherry picked from commit 28c0ba0e6d5e108bd297a6a6297218e74c11c5e5) --- .../Flyout/Flyout_ShowAt_Window_Content.xaml.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/SamplesApp/UITests.Shared/Windows_UI_Xaml_Controls/Flyout/Flyout_ShowAt_Window_Content.xaml.cs b/src/SamplesApp/UITests.Shared/Windows_UI_Xaml_Controls/Flyout/Flyout_ShowAt_Window_Content.xaml.cs index 6ecafd6aef04..dd22097616b7 100644 --- a/src/SamplesApp/UITests.Shared/Windows_UI_Xaml_Controls/Flyout/Flyout_ShowAt_Window_Content.xaml.cs +++ b/src/SamplesApp/UITests.Shared/Windows_UI_Xaml_Controls/Flyout/Flyout_ShowAt_Window_Content.xaml.cs @@ -15,13 +15,12 @@ namespace UITests.Windows_UI_Xaml_Controls.FlyoutTests [Sample("Flyouts")] public sealed partial class Flyout_ShowAt_Window_Content : Page { - private XamlRoot _xamlRoot; - public Flyout_ShowAt_Window_Content() { this.InitializeComponent(); #if HAS_UNO + XamlRoot _xamlRoot = null; Unloaded += (s, e) => _xamlRoot = XamlRoot; Unloaded += (s, e) => { From 0d3e5f9611c691d19f392efb0c708dc06ec24d2a Mon Sep 17 00:00:00 2001 From: Jerome Laban Date: Fri, 4 Oct 2024 17:15:56 -0400 Subject: [PATCH 23/27] chore: Adjust button style (cherry picked from commit 8dee4f79b3289f48ea35dfabf62b5ee024cb2ab7) --- src/SamplesApp/SamplesApp.Shared/App.xaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/SamplesApp/SamplesApp.Shared/App.xaml b/src/SamplesApp/SamplesApp.Shared/App.xaml index db6edb0ef5bc..645b81072ff1 100644 --- a/src/SamplesApp/SamplesApp.Shared/App.xaml +++ b/src/SamplesApp/SamplesApp.Shared/App.xaml @@ -175,7 +175,7 @@ Duplicate the fluent button style to remove the default animation that breaks screenshot tests. --> - + From 787a89eb234251fc57d08f080adf99751966cb29 Mon Sep 17 00:00:00 2001 From: Jerome Laban Date: Fri, 4 Oct 2024 20:29:48 -0400 Subject: [PATCH 24/27] chore: adjust button style (cherry picked from commit 41fc61a9c23ec9a3e1a6cc8b93f371eac3390b61) --- src/SamplesApp/SamplesApp.Shared/App.xaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SamplesApp/SamplesApp.Shared/App.xaml b/src/SamplesApp/SamplesApp.Shared/App.xaml index 645b81072ff1..5795ae296a49 100644 --- a/src/SamplesApp/SamplesApp.Shared/App.xaml +++ b/src/SamplesApp/SamplesApp.Shared/App.xaml @@ -8,7 +8,7 @@ xmlns:local="using:SamplesApp" xmlns:toolkit="using:Uno.UI.Toolkit" xmlns:uc="using:Uno.UI.Controls" - mc:Ignorable="ios" + mc:Ignorable="ios not_win" RequestedTheme="Light"> From f625952d001db957fc50c2de696532c2bd2b49b3 Mon Sep 17 00:00:00 2001 From: Jerome Laban Date: Sat, 5 Oct 2024 00:06:59 -0400 Subject: [PATCH 25/27] chore: Adjust test (cherry picked from commit 521bcd14a82f0e85a0e30c6655a4dd549375530c) --- .../Flyout/Flyout_ShowAt_Window_Content.xaml.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SamplesApp/UITests.Shared/Windows_UI_Xaml_Controls/Flyout/Flyout_ShowAt_Window_Content.xaml.cs b/src/SamplesApp/UITests.Shared/Windows_UI_Xaml_Controls/Flyout/Flyout_ShowAt_Window_Content.xaml.cs index dd22097616b7..e0b5014633b8 100644 --- a/src/SamplesApp/UITests.Shared/Windows_UI_Xaml_Controls/Flyout/Flyout_ShowAt_Window_Content.xaml.cs +++ b/src/SamplesApp/UITests.Shared/Windows_UI_Xaml_Controls/Flyout/Flyout_ShowAt_Window_Content.xaml.cs @@ -21,7 +21,7 @@ public Flyout_ShowAt_Window_Content() #if HAS_UNO XamlRoot _xamlRoot = null; - Unloaded += (s, e) => _xamlRoot = XamlRoot; + Loaded += (s, e) => _xamlRoot = XamlRoot; Unloaded += (s, e) => { // close all popups at the end of the test. From 06b8fc85014677c9b7383d7978f5da109172c334 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Laban?= Date: Sat, 5 Oct 2024 16:55:06 -0400 Subject: [PATCH 26/27] chore: Adjust for backport --- src/SamplesApp/SamplesApp.Shared/App.xaml | 145 +----------------- .../Flyout_ShowAt_Window_Content.xaml.cs | 3 +- .../Windows_UI_Xaml_Controls/Given_WebView.cs | 10 -- 3 files changed, 2 insertions(+), 156 deletions(-) diff --git a/src/SamplesApp/SamplesApp.Shared/App.xaml b/src/SamplesApp/SamplesApp.Shared/App.xaml index 5795ae296a49..508e7be4d003 100644 --- a/src/SamplesApp/SamplesApp.Shared/App.xaml +++ b/src/SamplesApp/SamplesApp.Shared/App.xaml @@ -7,8 +7,7 @@ xmlns:ios="http://nventive.com/ios" xmlns:local="using:SamplesApp" xmlns:toolkit="using:Uno.UI.Toolkit" - xmlns:uc="using:Uno.UI.Controls" - mc:Ignorable="ios not_win" + mc:Ignorable="ios" RequestedTheme="Light"> @@ -171,148 +170,6 @@ global App.Resources - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/SamplesApp/UITests.Shared/Windows_UI_Xaml_Controls/Flyout/Flyout_ShowAt_Window_Content.xaml.cs b/src/SamplesApp/UITests.Shared/Windows_UI_Xaml_Controls/Flyout/Flyout_ShowAt_Window_Content.xaml.cs index e0b5014633b8..4ee4c4ea3229 100644 --- a/src/SamplesApp/UITests.Shared/Windows_UI_Xaml_Controls/Flyout/Flyout_ShowAt_Window_Content.xaml.cs +++ b/src/SamplesApp/UITests.Shared/Windows_UI_Xaml_Controls/Flyout/Flyout_ShowAt_Window_Content.xaml.cs @@ -1,5 +1,4 @@ - -using Uno.UI.Samples.Controls; +using Uno.UI.Samples.Controls; using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Controls; using Microsoft.UI.Xaml.Media; diff --git a/src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml_Controls/Given_WebView.cs b/src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml_Controls/Given_WebView.cs index f66bdd19ba8d..9ba67815433c 100644 --- a/src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml_Controls/Given_WebView.cs +++ b/src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml_Controls/Given_WebView.cs @@ -141,25 +141,15 @@ public async Task When_GoBack() Assert.IsFalse(webView.CanGoForward); webView.NavigationCompleted += (sender, e) => navigated = true; -<<<<<<< HEAD - webView.Navigate(new Uri("https://example.com/1")); - await TestServices.WindowHelper.WaitFor(() => navigated, 3000); -======= webView.Navigate(new Uri("https://uno-assets.platform.uno/tests/docs/WebView_NavigateToAnchor.html")); await TestServices.WindowHelper.WaitFor(() => navigated, 10000); ->>>>>>> 696e3bc96d (test: Adjust test duration for navigation) Assert.IsFalse(webView.CanGoBack); Assert.IsFalse(webView.CanGoForward); navigated = false; -<<<<<<< HEAD - webView.Navigate(new Uri("https://example.com/2")); - await TestServices.WindowHelper.WaitFor(() => navigated, 3000); -======= webView.Navigate(new Uri("https://platform.uno")); await TestServices.WindowHelper.WaitFor(() => navigated, 10000); ->>>>>>> 696e3bc96d (test: Adjust test duration for navigation) Assert.IsTrue(webView.CanGoBack); From 8002015fe71ebc408d24ac232a311cde5dd35202 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Laban?= Date: Sun, 6 Oct 2024 00:06:32 -0400 Subject: [PATCH 27/27] chore: Adjust for backport --- .../Tests/Microsoft_UI_Xaml_Controls/Given_WebView2.cs | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/Uno.UI.RuntimeTests/Tests/Microsoft_UI_Xaml_Controls/Given_WebView2.cs b/src/Uno.UI.RuntimeTests/Tests/Microsoft_UI_Xaml_Controls/Given_WebView2.cs index 32290b39ea09..06f2a51aeeb1 100644 --- a/src/Uno.UI.RuntimeTests/Tests/Microsoft_UI_Xaml_Controls/Given_WebView2.cs +++ b/src/Uno.UI.RuntimeTests/Tests/Microsoft_UI_Xaml_Controls/Given_WebView2.cs @@ -106,13 +106,8 @@ public async Task When_GoBack() Assert.IsFalse(webView.CanGoForward); webView.NavigationCompleted += (sender, e) => navigated = true; -<<<<<<< HEAD - webView.CoreWebView2.Navigate("https://example.com/1"); - await TestServices.WindowHelper.WaitFor(() => navigated, 3000); -======= webView.CoreWebView2.Navigate("https://uno-assets.platform.uno/tests/docs/WebView_NavigateToAnchor.html"); await TestServices.WindowHelper.WaitFor(() => navigated, 10000); ->>>>>>> 696e3bc96d (test: Adjust test duration for navigation) Assert.IsFalse(webView.CoreWebView2.CanGoBack); Assert.IsFalse(webView.CanGoBack); @@ -120,13 +115,8 @@ public async Task When_GoBack() Assert.IsFalse(webView.CanGoForward); navigated = false; -<<<<<<< HEAD - webView.CoreWebView2.Navigate("https://example.com/2"); - await TestServices.WindowHelper.WaitFor(() => navigated, 3000); -======= webView.CoreWebView2.Navigate("https://platform.uno"); await TestServices.WindowHelper.WaitFor(() => navigated, 10000); ->>>>>>> 696e3bc96d (test: Adjust test duration for navigation) Assert.IsTrue(webView.CoreWebView2.CanGoBack); Assert.IsTrue(webView.CanGoBack);