Skip to content
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

[Testing] Remove IgnoreIfPlatforms usage on UITests #22526

Merged
merged 11 commits into from
Jun 7, 2024
Merged

Conversation

jsuarezruiz
Copy link
Contributor

Description of Change

Remove IgnoreIfPlatforms usage on UITests. The changes should reduce the time needed to pass UI tests.

Issues Fixed

Fixes #22525

@jsuarezruiz jsuarezruiz requested a review from a team as a code owner May 20, 2024 13:15
@@ -16,10 +16,9 @@ public CarouselViewNoItemTemplate(TestDevice device)
// Issue12777 (src\ControlGallery\src\Issues.Shared\Issue12777.cs
[Test]
[Category(UITestCategories.CarouselView)]
[FailsOnWindows]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we change these attributes to require a description? Not that this is something that you're doing right now, but imo people should add a description as to why they're adding this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've been thinking about it and if we are going to ignore tests for some reason, it makes sense to add a brief description indicating why.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Applied changes, the ignore reason is now mandatory.

@@ -1,4 +1,5 @@
using NUnit.Framework;
#if ANDROID
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For this one (and other #if statements) should we consider not adding this? Ideally tests run for all platforms unless there is something REALLY specific which I don't think should be a lot of tests. What if we just enable them, will they run fine on other platforms as well and suddenly get a lot of extra tests "for free"?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe if we don't want to fix that right now then let's make sure there is an issue for it to go over these and test that

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree, but we need to review every case. I mean, there are many cases that just was validating something in one specific platform and the test only have the reference snapshot for that platform. We just need to generate the rest and validate it.

I can do that in this PR if we want, or create another issue an review it there.

@@ -46,10 +46,9 @@ public void KeepItemsInView()
// KeepScrollOffset (src\Compatibility\ControlGallery\src\Issues.Shared\CollectionViewItemsUpdatingScrollMode.cs)
[Test]
[Category(UITestCategories.CollectionView)]
[FailsOnAllPlatforms]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the difference between Ignore that I have seen on other tests and FailsOnAllPlatforms?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Internally, no differences. However, it can cause confusion so I have made changes to always follow the same pattern using FailsOn with a description.

}

#if ANDROID
public class FailsOnAndroid : IgnoreAttribute
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't we have this in a different place too? Can we move it to somewhere so it's shared maybe?

@jsuarezruiz
Copy link
Contributor Author

Ignored golden tests, ui tests verifying an snapshot with a reference one, on macOS for now

[FailsOnMac("VerifyScreenshot method not implemented on macOS")]
Until implement VerifyScreenshot on Catalyst.

@jsuarezruiz jsuarezruiz requested a review from jfversluis May 28, 2024 10:14
@jfversluis jfversluis merged commit 5451aaf into main Jun 7, 2024
49 checks passed
@jfversluis jfversluis deleted the fix-22525 branch June 7, 2024 08:18
@github-actions github-actions bot locked and limited conversation to collaborators Jul 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Testing] Remove IgnoreIfPlatforms usage on UITests
3 participants