Skip to content

Fix test CanRenderLargeComponentsWithServerRenderMode #54340

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

Conversation

SteveSandersonMS
Copy link
Member

Fixes CanRenderLargeComponentsWithServerRenderMode, which should allow us to unquarantine it (#49975)

The test was mistakenly using Assert.Equal when it should be using Browser.Equal. Also it was mistakenly asserting the same thing twice, instead of asserting two different things - probably just a copy-paste error.

When merged, we can mark #49975 as test-fixed.

@SteveSandersonMS SteveSandersonMS requested a review from a team as a code owner March 4, 2024 10:05
@ghost ghost added the area-blazor Includes: Blazor, Razor Components label Mar 4, 2024
@SteveSandersonMS
Copy link
Member Author

@javiercn Thanks for approving.

Not sure if you want to re-review, but I encountered a further test issue in the CI run (build log):

Microsoft.AspNetCore.Components.E2ETests.ServerRenderingTests.FormHandlingTests.FormWithParentBindingContextTest.CanBindToFormWithFiles
Assert.Throws() Failure
Expected: typeof(OpenQA.Selenium.StaleElementReferenceException)
Actual:   typeof(OpenQA.Selenium.WebDriverException): unknown error: unhandled inspector error: {"code":-32000,"message":"Node with given id does not belong to the document"}
            (Session info: chrome=122.0.6261.69)
---- OpenQA.Selenium.WebDriverException : unknown error: unhandled inspector error: {"code":-32000,"message":"Node with given id does not belong to the document"}
  (Session info: chrome=122.0.6261.69)

... so I've added a bunch more code to deal with that everywhere throughout the whole E2E test suite. It's probably pretty rare (I haven't seen it before, unless it's just been introduced by some version update), and arguably it could be handled in a separate PR but I think we just want to squash flakiness as quickly as possible.

@javiercn
Copy link
Member

javiercn commented Mar 4, 2024

@SteveSandersonMS were you able to reproduce the flakyness locally? It would be good to have confirmation that the fixes fix the problem, but I understand testing it locally is hard, so I'm happy to merge this and see.

@SteveSandersonMS
Copy link
Member Author

were you able to reproduce the flakyness locally?

Unfortunately not - I got the StaleElementReferenceException when running locally, not the WebDriverException with the special message that occurred one time in CI.

@SteveSandersonMS SteveSandersonMS merged commit af2571f into main Mar 5, 2024
@SteveSandersonMS SteveSandersonMS deleted the stevesa/fix-CanRenderLargeComponentsWithServerRenderMode branch March 5, 2024 17:28
@amcasey
Copy link
Member

amcasey commented Mar 8, 2024

Not sure if you want to re-review, but I encountered a further test issue in the CI run (build log):

Microsoft.AspNetCore.Components.E2ETests.ServerRenderingTests.FormHandlingTests.FormWithParentBindingContextTest.CanBindToFormWithFiles
Assert.Throws() Failure
Expected: typeof(OpenQA.Selenium.StaleElementReferenceException)
Actual:   typeof(OpenQA.Selenium.WebDriverException): unknown error: unhandled inspector error: 

We saw this again in https://dev.azure.com/dnceng-public/public/_build/results?buildId=595165&view=results. #54411 hit it too, but I'm not sure how to grab the build URL now that the check has been re-run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-blazor Includes: Blazor, Razor Components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants