[ci][playwright] Solidify flaky Playwright tests #12373
Merged
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.
What it does
This is an attempt at solidifying the playwright test suite, that has had testcases intermitently failing. I have been lucky to be able to observe some race conditions rather consistently locally, and so be able to debug them and solidify against them.
The race conditions are very slight - the Playwright test suite takes a screenshot at every failure, and consistently I see the correct state on those, meaning that the state is what it should be, by the time the screenshot is taken.
In consequence, I wound that, for a given flaky scenario, addressing one race consition would often mask a second one, present in the same scenario. It's possible that under a different execution context, more race conditions would occur. Here are the race coditions I have found:
closes #12063
[1] Example of a testcase failing because of the expectation that file tree nodes should be immediately visible after opening the explorer view:
[2] Example of a testcase failing because the Explorer view tab is not immediately visible after Explorer view creation:
[3] Example of failed testcase where explorer tree node selection was tested before it became effective:
How to test
Make sure the playwright test suite passes
Review checklist
Reminder for reviewers