feat: delegate waitForVaadin readiness checks to Flow#2160
Draft
feat: delegate waitForVaadin readiness checks to Flow#2160
Conversation
db49f71 to
2c0976c
Compare
Move readiness logic (active connectors, dev server status) out of TestBench and into Flow's whenReady callback. TestBench now polls Java-side until whenReady is a function, then makes a single async call to let Flow handle all readiness checks. The Java-side polling survives page reloads during dev server startup, unlike the previous JS-side approach.
2c0976c to
6cfbe71
Compare
Test Results294 tests 214 ✅ 2h 7m 45s ⏱️ For more details on these failures and errors, see this check. Results for commit cedbad6. |
TatuLund
reviewed
Mar 4, 2026
...n-testbench-shared/src/main/java/com/vaadin/testbench/commands/TestBenchCommandExecutor.java
Show resolved
Hide resolved
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Replace the synchronous polling script that checked document.readyState,
devServerIsNotLoaded, and active clients directly with a call to
Flow's whenReady callback, which now owns all readiness logic.
TestBench polls Java-side until whenReady is a function (handling dev
server startup where the page may not have Flow loaded yet), then
makes a single executeAsyncScript call to let Flow report readiness.
Remove the waitForVaadinLoopHook testing mechanism and update
integration tests to use whenReady=false and setTimeout instead.