-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Fixed the 18751 and 18896 flaky tests #33737
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
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
59aace3
Fixed the 18751 and 18896 flaky tests
Ahamed-Ali 78775c2
Updated the images and review concerns
Ahamed-Ali 3262474
updated to hide scrollbar in windows and mac
Ahamed-Ali 7b5c152
Resave the correct image of listview after scrollup
Ahamed-Ali 6f19518
Updated the images
Ahamed-Ali 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 modified
BIN
+15.6 KB
(100%)
src/Controls/tests/TestCases.Android.Tests/snapshots/android/Issue18751Test.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 modified
BIN
+16.6 KB
(100%)
src/Controls/tests/TestCases.Android.Tests/snapshots/android/Issue18896Test.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+237 Bytes
(100%)
src/Controls/tests/TestCases.Mac.Tests/snapshots/mac/Issue18751Test.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.4 KB
src/Controls/tests/TestCases.Mac.Tests/snapshots/mac/Issue18896Test.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 changes: 16 additions & 24 deletions
40
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue18751.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 |
|---|---|---|
| @@ -1,32 +1,24 @@ | ||
| #if TEST_FAILS_ON_IOS && TEST_FAILS_ON_CATALYST && TEST_FAILS_ON_WINDOWS && TEST_FAILS_ON_ANDROID //related issues: https://github.com/dotnet/maui/issues/33507, https://github.com/dotnet/maui/issues/15994 | ||
| using NUnit.Framework; | ||
| using NUnit.Framework; | ||
| using UITest.Appium; | ||
| using UITest.Core; | ||
|
|
||
| namespace Microsoft.Maui.TestCases.Tests.Issues | ||
| namespace Microsoft.Maui.TestCases.Tests.Issues; | ||
|
|
||
| public class Issue18751 : _IssuesUITest | ||
| { | ||
| public class Issue18751 : _IssuesUITest | ||
| public Issue18751(TestDevice device) : base(device) | ||
| { | ||
| public Issue18751(TestDevice device) : base(device) | ||
| { | ||
| } | ||
|
|
||
| public override string Issue => "Can scroll CollectionView inside RefreshView"; | ||
|
|
||
| [Test] | ||
| [Category(UITestCategories.CollectionView)] | ||
| public async Task Issue18751Test() | ||
| { | ||
| VerifyInternetConnectivity(); | ||
|
|
||
| App.WaitForElement("WaitForStubControl"); | ||
| } | ||
|
|
||
| // Load images. | ||
| await Task.Delay(1000); | ||
| public override string Issue => "Can scroll CollectionView inside RefreshView"; | ||
|
|
||
| // The test passes if you are able to see the image, name, and location of each monkey. | ||
| VerifyScreenshot(); | ||
| } | ||
| [Test] | ||
| [Category(UITestCategories.CollectionView)] | ||
| public void Issue18751Test() | ||
| { | ||
| App.WaitForElement("WaitForStubControl"); | ||
| // Load images and hide scrollbar. | ||
| // The test passes if you are able to see the image, name, and location of each monkey. | ||
| VerifyScreenshot(retryDelay: TimeSpan.FromSeconds(2)); | ||
| } | ||
| } | ||
| #endif | ||
| } |
47 changes: 19 additions & 28 deletions
47
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue18896.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 |
|---|---|---|
| @@ -1,40 +1,31 @@ | ||
| #if TEST_FAILS_ON_ANDROID && TEST_FAILS_ON_IOS && TEST_FAILS_ON_CATALYST && TEST_FAILS_ON_WINDOWS//Related issues : https://github.com/dotnet/maui/issues/33507, https://github.com/dotnet/maui/issues/18811, https://github.com/dotnet/maui/issues/15994 | ||
| using NUnit.Framework; | ||
| using UITest.Appium; | ||
| using UITest.Core; | ||
|
|
||
| namespace Microsoft.Maui.TestCases.Tests.Issues | ||
| { | ||
| public class Issue18896 : _IssuesUITest | ||
| { | ||
| const string ListView = "TestListView"; | ||
| namespace Microsoft.Maui.TestCases.Tests.Issues; | ||
|
|
||
| public Issue18896(TestDevice device) : base(device) | ||
| { | ||
| } | ||
| public class Issue18896 : _IssuesUITest | ||
| { | ||
| const string ListView = "TestListView"; | ||
|
|
||
| public override string Issue => "Can scroll ListView inside RefreshView"; | ||
| public Issue18896(TestDevice device) : base(device) | ||
| { | ||
| } | ||
|
|
||
| [Test] | ||
| [Category(UITestCategories.ListView)] | ||
| [FailsOnIOSWhenRunningOnXamarinUITest("Currently fails on iOS; see https://github.com/dotnet/maui/issues/18811")] | ||
| [FailsOnMacWhenRunningOnXamarinUITest("Currently fails on Catalyst; see https://github.com/dotnet/maui/issues/18811")] | ||
| [FailsOnWindowsWhenRunningOnXamarinUITest("Currently fails on Windows; see https://github.com/dotnet/maui/issues/15994")] | ||
| public void Issue18896Test() | ||
| { | ||
| VerifyInternetConnectivity(); | ||
| App.WaitForElement("WaitForStubControl"); | ||
| public override string Issue => "Can scroll ListView inside RefreshView"; | ||
|
|
||
| App.ScrollDown(ListView); | ||
| [Test] | ||
| [Category(UITestCategories.ListView)] | ||
| public void Issue18896Test() | ||
| { | ||
| App.WaitForElement("WaitForStubControl"); | ||
|
|
||
| App.ScrollUp(ListView); | ||
| App.ScrollDown(ListView); | ||
|
|
||
| // Load images and hide scrollbar. | ||
| Thread.Sleep(2000); | ||
| App.ScrollUp(ListView); | ||
|
|
||
| // The test passes if you are able to see the image, name, and location of each monkey. | ||
| VerifyScreenshot(retryDelay: TimeSpan.FromSeconds(2)); | ||
| } | ||
| // Load images and hide scrollbar. | ||
| // The test passes if you are able to see the image, name, and location of each monkey. | ||
| VerifyScreenshot(retryDelay: TimeSpan.FromSeconds(2)); | ||
| } | ||
| } | ||
| #endif | ||
| } |
Binary file added
BIN
+81.8 KB
src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/Issue18751Test.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
+81.5 KB
src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/Issue18896Test.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 modified
BIN
+1.17 KB
(100%)
src/Controls/tests/TestCases.iOS.Tests/snapshots/ios/Issue18751Test.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
+544 KB
src/Controls/tests/TestCases.iOS.Tests/snapshots/ios/Issue18896Test.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.