Repository navigation
Further attempt to fix CancelsOutdatedRefreshes_Async in CI - #32998
Conversation
| for (var y = 1000; y <= 5000; y += 1000) | ||
| { | ||
| js.ExecuteScript($"document.getElementById('async-container').scrollTo({{ top: {y} }})"); | ||
| Browser.Equal(y, () => (long)js.ExecuteScript("return document.getElementById('async-container').scrollTop")); |
There was a problem hiding this comment.
This line is just about waiting until we can observe the browser did what we asked.
|
@SteveSandersonMS if you want, you can try also your fix with a PR against the current playwright PR (https://github.com/dotnet/aspnetcore/tree/haok/pw3) and add this test there to see if it helps (I believe there are many issues that are alleviated due to playwright running on helix machines without resource contention)? I'd also love for you to try things for more feedback/suggestions in case anything feels off during the conversion: Here's a similar test that does an evaluate: |
|
@HaoK Thanks for the info. Since this has passed now I'm keen to get it in as-is. We can certainly consider migrating this test to Playwright if it continues to see issues. |
The previous attempt to fix this in #32869 actually made it worse. It went from being flaky in CI to failing 100% of the time in CI, even though it passes 100% of the time locally.
The implementation here is just a manual equivalent to the
behavior: 'smooth'flag to see if that works better.Sidenote: I'm increasingly thinking it may be a more fundamental aspect of the CI environment that makes anything based on human timescales for interactivity (which UI tests should and must be) unviable. Browsers aren't designed to operate in conditions where they're unable to execute code in response to events because of excessive resource contention. If that is the case we're going to have to set up a separate, dedicated environment for running E2E tests that is not in contention for resources with other build or test activities, or at least have a more sophisticated mechanism for retries. If the Playwright efforts prove this wrong then of course that would be better still, but as yet we haven't got there.