Skip to content

Conversation

@javier-godoy
Copy link
Member

@javier-godoy javier-godoy commented Dec 30, 2025

Close #158

Summary by CodeRabbit

  • Tests

    • Updated test assertions for improved validation.
    • Enhanced test infrastructure with instrumented route handling.
  • Chores

    • Updated test-related dependency version.
    • Refined test service configuration.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Dec 30, 2025

Walkthrough

This PR addresses test failures in Vaadin 25 integration tests by: (1) updating test annotations from standard Vaadin to instrumented variants (@Route→@InstrumentedRoute, @ClientCallable→@LegacyClientCallable), (2) refactoring assertion checks in HeaderFooterStylesIT from exact to substring matching to accommodate changed class attributes, (3) creating a service initializer to register instrumented routes, and (4) updating a dependency version.

Changes

Cohort / File(s) Summary
Dependency management
pom.xml
Updated com.flowingcode.vaadin.test:testbench-rpc from 1.3.0 to 1.4.0; added duplicate com.vaadin:vaadin-dev entry in v25 profile
Test annotation refactoring
src/test/java/com/flowingcode/vaadin/addons/gridhelpers/it/HeaderFooterStylesView.java, HeightByRowsITView.java, IntegrationView.java, ResponsiveGridITView.java
Replaced @Route with @InstrumentedRoute and @ClientCallable with @LegacyClientCallable on class and method annotations; updated imports accordingly; copyright year updated to 2025 in IntegrationView
Test assertion semantics
src/test/java/com/flowingcode/vaadin/addons/gridhelpers/it/HeaderFooterStylesIT.java
Changed assertion checks from exact equality (assertEquals) to substring matching (assertThat(..., containsString(...))) using Hamcrest; updated imports
Service initialization
src/test/java/com/flowingcode/vaadin/addons/gridhelpers/it/ViewInitializerImpl.java, src/test/resources/META-INF/services/com.vaadin.flow.server.VaadinServiceInitListener
Added new ViewInitializerImpl class extending InstrumentationViewInitializer to register instrumented routes; registered service provider in META-INF descriptor

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Possibly related PRs

Suggested reviewers

  • mlopezFC
  • paodb

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning The pom.xml dependency duplication (duplicate vaadin-dev entry in v25 profile) appears to be an unintended out-of-scope change not mentioned in the issue objectives. Remove the duplicate vaadin-dev dependency entry from the v25 profile in pom.xml, keeping only one instance of the dependency.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'test: make tests compatible with Vaadin 25' directly and clearly describes the main objective of the changeset - updating test files to work with Vaadin 25.
Linked Issues check ✅ Passed The PR successfully addresses issue #158 by updating test assertions to use substring matching, replacing routing annotations with instrumented variants, and adding necessary service initializer configuration for Vaadin 25 compatibility.
✨ Finishing touches
  • 📝 Generate docstrings

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@sonarqubecloud
Copy link

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between dd16955 and fd58d99.

📒 Files selected for processing (8)
  • pom.xml
  • src/test/java/com/flowingcode/vaadin/addons/gridhelpers/it/HeaderFooterStylesIT.java
  • src/test/java/com/flowingcode/vaadin/addons/gridhelpers/it/HeaderFooterStylesView.java
  • src/test/java/com/flowingcode/vaadin/addons/gridhelpers/it/HeightByRowsITView.java
  • src/test/java/com/flowingcode/vaadin/addons/gridhelpers/it/IntegrationView.java
  • src/test/java/com/flowingcode/vaadin/addons/gridhelpers/it/ResponsiveGridITView.java
  • src/test/java/com/flowingcode/vaadin/addons/gridhelpers/it/ViewInitializerImpl.java
  • src/test/resources/META-INF/services/com.vaadin.flow.server.VaadinServiceInitListener
🧰 Additional context used
🧬 Code graph analysis (1)
src/test/java/com/flowingcode/vaadin/addons/gridhelpers/it/ViewInitializerImpl.java (2)
src/test/java/com/flowingcode/vaadin/addons/gridhelpers/it/HeaderFooterStylesView.java (1)
  • SuppressWarnings (40-120)
src/test/java/com/flowingcode/vaadin/addons/gridhelpers/it/IntegrationView.java (1)
  • SuppressWarnings (42-187)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: build-vaadin24
🔇 Additional comments (18)
pom.xml (1)

131-131: LGTM! Dependency version updated.

The testbench-rpc library has been updated to version 1.4.0, which aligns with the PR objective to support Vaadin 25 compatibility.

src/test/resources/META-INF/services/com.vaadin.flow.server.VaadinServiceInitListener (1)

1-1: LGTM! Service provider configuration added correctly.

This service descriptor properly registers the ViewInitializerImpl to enable instrumented route registration during test initialization.

src/test/java/com/flowingcode/vaadin/addons/gridhelpers/it/HeaderFooterStylesIT.java (3)

22-23: LGTM! Imports updated for Hamcrest assertions.

The switch from JUnit's assertEquals to Hamcrest's containsString matcher is appropriate for validating partial class attribute matches.


58-63: Excellent fix for Vaadin 25 compatibility!

Switching from exact class attribute matching to substring matching correctly addresses the test failures noted in issue #158. This accommodates the additional CSS classes that Vaadin 25 adds (e.g., "cell", "header-cell", "first-column-cell") while still verifying the custom classes are applied.


76-77: LGTM! Consistent assertion pattern applied.

The substring matching approach is consistently applied to handle Vaadin 25's additional CSS classes.

src/test/java/com/flowingcode/vaadin/addons/gridhelpers/it/HeightByRowsITView.java (3)

24-25: LGTM! Annotations migrated to instrumented variants.

The migration from standard Vaadin annotations to instrumented variants enables proper test instrumentation for Vaadin 25 compatibility.


39-39: LGTM! Route annotation updated consistently.

The @InstrumentedRoute annotation works in conjunction with ViewInitializerImpl to register this test view properly.


89-89: LGTM! Client-callable annotation updated.

The @LegacyClientCallable annotation maintains RPC functionality while supporting the instrumented routing approach.

src/test/java/com/flowingcode/vaadin/addons/gridhelpers/it/ViewInitializerImpl.java (1)

26-34: LGTM! Test initializer properly registers instrumented routes.

The ViewInitializerImpl correctly registers all four test views that have been migrated to use @InstrumentedRoute annotations, enabling proper test discovery and execution in Vaadin 25.

src/test/java/com/flowingcode/vaadin/addons/gridhelpers/it/HeaderFooterStylesView.java (3)

24-25: LGTM! Imports updated for instrumented annotations.

The imports align with the test infrastructure changes for Vaadin 25 compatibility.


41-41: LGTM! Route annotation migrated consistently.

The @InstrumentedRoute annotation is consistent with the other test views and properly registered in ViewInitializerImpl.


62-62: LGTM! Client-callable annotation updated.

The @LegacyClientCallable annotation maintains the RPC testing functionality.

src/test/java/com/flowingcode/vaadin/addons/gridhelpers/it/ResponsiveGridITView.java (3)

25-26: LGTM! Annotations migrated to instrumented variants.

The import changes support the instrumented routing pattern used throughout the test suite.


39-39: LGTM! Route annotation updated consistently.

The @InstrumentedRoute annotation follows the pattern applied to all test views in this PR.


63-63: LGTM! Client-callable annotation updated.

The @LegacyClientCallable annotation maintains RPC functionality with instrumentation support.

src/test/java/com/flowingcode/vaadin/addons/gridhelpers/it/IntegrationView.java (3)

26-27: LGTM! Imports updated for instrumented routing.

The import changes complete the systematic migration of all test views to use instrumented annotations.


43-43: LGTM! Route annotation migrated to instrumented variant.

The @InstrumentedRoute annotation is properly registered in ViewInitializerImpl along with the other test views.


80-80: LGTM! Client-callable annotation updated.

The @LegacyClientCallable annotation maintains the RPC functionality required for integration testing.

Comment on lines +547 to +550
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-dev</artifactId>
</dependency>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Remove duplicate vaadin-dev dependency.

The vaadin-dev dependency is declared twice in the v25 profile. Lines 543-546 already include this dependency.

🔎 Proposed fix
 			<groupId>com.vaadin</groupId>
 			<artifactId>vaadin-dev</artifactId>
 		</dependency>
-		<dependency>
-			<groupId>com.vaadin</groupId>
-			<artifactId>vaadin-dev</artifactId>
-		</dependency>
 	</dependencies>
 </profile>
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-dev</artifactId>
</dependency>
</dependency>
</dependencies>
</profile>
🤖 Prompt for AI Agents
In pom.xml around lines 547 to 550, the com.vaadin:vaadin-dev dependency is
duplicated in the v25 profile; remove this duplicate declaration (delete the
<dependency> block at lines 547-550) and verify there is only one
com.vaadin:vaadin-dev entry in that profile to avoid redundancy and potential
build issues.

Comment on lines +1 to +19
/*-
* #%L
* RPC for Vaadin TestBench
* %%
* Copyright (C) 2021 - 2025 Flowing Code
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Fix incorrect license header project name.

The license header incorrectly identifies this as "RPC for Vaadin TestBench" when it should be "Grid Helpers Add-on" to match the other files in this project.

🔎 Proposed fix
 /*-
  * #%L
- * RPC for Vaadin TestBench
+ * Grid Helpers Add-on
  * %%
  * Copyright (C) 2021 - 2025 Flowing Code
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
/*-
* #%L
* RPC for Vaadin TestBench
* %%
* Copyright (C) 2021 - 2025 Flowing Code
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
/*-
* #%L
* Grid Helpers Add-on
* %%
* Copyright (C) 2021 - 2025 Flowing Code
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
🤖 Prompt for AI Agents
In
src/test/java/com/flowingcode/vaadin/addons/gridhelpers/it/ViewInitializerImpl.java
lines 1-19, the license header's project name is incorrect ("RPC for Vaadin
TestBench"); update the header to use the correct project name "Grid Helpers
Add-on" so it matches other files in the repository—edit the text in the header
block only, preserving the rest of the license boilerplate and formatting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: To Do

Development

Successfully merging this pull request may close these issues.

Vaadin 25: HeaderFooterStylesIT integration tests fail

2 participants