playwright: Wait for file stat nodes #12310
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
The
theia-workspace.test.ts
checks for existence of file nodes in the explorer view to verify whether the workspace has been prepared correctly. However, occasionally it may happen that the explorer view doesn't show them yet, as the files are just being loaded.This resulted in occasionally flaky test executions (#12063).
To fix this problem, we now use the
existsDirectoryNode
andexistsFileNode
checks to explicitly wait for them to appear and only fail if the check times out.Contributed on behalf of STMicroelectronics.
Fixes #12063
How to test
There is nothing really to test other than to make sure the playwright tests have passed and to observe in the future whether this reduces the number of flaky test failures in
theia-workspace.test.ts
.Review checklist
Reminder for reviewers