You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test: detect client function calls on Vaadin 25.4 - #50
Since vaadin/flow#25852, Element.callJsFunction sends one shared
expression and passes the function name as the first parameter, so SimpleTimerClientCallsTest no longer finds _sync in the expression.
The test now also checks the first parameter. Tested against Vaadin 14,
23, 24, 25.1 and 25.4.0-alpha6.
No actionable comments were generated in the recent review.
Walkthrough
The test helper now recognizes queued JavaScript calls when the function name appears in the invocation expression or in the first parameter. The count helper uses this matching logic.
Changes
Client call test matching
Layer / File(s)
Summary
Match queued JavaScript calls src/test/java/com/flowingcode/vaadin/addons/simpletimer/SimpleTimerClientCallsTest.java
The count helper delegates to calls, which matches the requested function name against the invocation expression or the first parameter.
This change only updates a test so it recognizes client function calls on newer Vaadin versions. It does not alter add-on runtime behavior, and the merge risk is minimal.
Pre-merge checks: 4
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title names the change: the test now detects client function calls on Vaadin 25.4. The raw summary confirms the test helper now also checks the first parameter of a queued JavaScript call, which m…
Linked Issues check
Issue #48 requires that SimpleTimerClientCallsTest.resumingOnAttachSyncsOnce pass on every supported Vaadin version. It suggests also checking getInvocation().getParameters(). At the reviewed head, Si…
Out of Scope Changes check
The whole-PR change set (merge base 2995747 to head 139d9cc) touches only SimpleTimerClientCallsTest.java, per the supplied summary (+12/-3). The change adds the parameter-based check in the test help…
Full details: Title check
Explanation
The title names the change: the test now detects client function calls on Vaadin 25.4. The raw summary confirms the test helper now also checks the first parameter of a queued JavaScript call, which matches the linked issue's request. The prefix "test:" fits the change, which only touches a test file. The title is short, specific, and does not describe unrelated work.
Full details: Linked Issues check
Explanation
Issue #48 requires that SimpleTimerClientCallsTest.resumingOnAttachSyncsOnce pass on every supported Vaadin version. It suggests also checking getInvocation().getParameters(). At the reviewed head, SimpleTimerClientCallsTest.calls(...) returns true when the expression contains the function name or when the first parameter equals that name. count(...) uses this predicate. resumingOnAttachSyncsOnce asserts count(flush(), "_sync") equals 1, so it now matches the Vaadin 25.4 call shape described in #48. The removingDisplayWhileTimerIsDetachedClearsIt test also uses the same predicate for "_unbindDisplay". The PR reports runs against Vaadin 14, 23, 24, 25.1 and 25.4.0-alpha6. I did not execute the test suite, so the cross-version result rests on the author's report. The add-on code is unchanged, which matches the issue statement that the add-on is unaffected.
Full details: Out of Scope Changes check
Explanation
The whole-PR change set (merge base 2995747 to head 139d9cc) touches only SimpleTimerClientCallsTest.java, per the supplied summary (+12/-3). The change adds the parameter-based check in the test helper and updates its Javadoc. Both changes directly support the fix for #48. No production code, build configuration, or unrelated test changes appear in the supplied evidence. The diff tool could not return a text diff, so this verdict relies on the reviewed head file contents and the supplied summary.
Finishing Touches
Generate unit tests (beta)
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.
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
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.
Since vaadin/flow#25852,
Element.callJsFunctionsends one sharedexpression and passes the function name as the first parameter, so
SimpleTimerClientCallsTestno longer finds_syncin the expression.The test now also checks the first parameter. Tested against Vaadin 14,
23, 24, 25.1 and 25.4.0-alpha6.
Thanks @mstahv for the patch.
Close #48
Summary by CodeRabbit