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

Fix Windows device tests #20401

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from
Draft

Fix Windows device tests #20401

wants to merge 11 commits into from

Conversation

mattleibow
Copy link
Member

@mattleibow mattleibow commented Feb 6, 2024

Description of Change

  • Some views need a few ms to finish animating
    The switch on WinUI needs to animate to "on" so we need to wait a few ms so that the control is ready for the screenshots/color comparisons.
  • We now have too many tests for WinUI to handle
    We need to break up all the tests by category to avoid "running out of windows"

Fixes:

PureWeen
PureWeen previously approved these changes Feb 6, 2024
@mattleibow mattleibow enabled auto-merge (squash) February 6, 2024 20:30
@mattleibow
Copy link
Member Author

Waiting a long time on windows just so we can see how long it really takes instead of slowly incrementing to let the tests finish.

@mattleibow mattleibow force-pushed the dev/fix-win-animated branch 3 times, most recently from d12ef22 to 55738c8 Compare February 7, 2024 21:05
@mattleibow mattleibow changed the title Some views need a few ms to finish animating Fix Windows device tests Feb 7, 2024
@mattleibow mattleibow force-pushed the dev/fix-win-animated branch 2 times, most recently from bd65e21 to 7a07c7d Compare February 9, 2024 13:54
Comment on lines +234 to +239
// Some views (like the switch) are animating when the window is shown
// so we need to wait a few milliseconds for the animation to complete.
// If the animated views are still a bit flakey, we can increase this to
// about 250. If we start going above that then there is likely another
// issue.
await Task.Delay(100);
Copy link
Member Author

Choose a reason for hiding this comment

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

This is the main fix for a few "flaky tests" that are testing controls that make use of animations. Typically animations only start once the control is on-screen, so we need to wiat for them to actually complete befoer snapshots/testing colros/testing state

@PureWeen
Copy link
Member

/rebase

- Some views need a few ms to finish animating
  The switch on WinUI needs to animate to "on" so we need to wait a few
  ms so that the control is ready for the screenshots/color comparisons.
- We now have too many tests for WinUI to handle
  We need to break up all the tests by category to avoid "running out of
  windows"
@mattleibow mattleibow marked this pull request as draft February 18, 2024 15:34
auto-merge was automatically disabled February 18, 2024 15:34

Pull request was converted to draft

@jsuarezruiz
Copy link
Contributor

Hey @mattleibow, could you rebase it?

@Eilon Eilon added the area-testing Unit tests, device tests label May 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-testing Unit tests, device tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Testing] Rework current WinUI device tests to be more resilient Flaky tests in windows with some controls
6 participants