-
Notifications
You must be signed in to change notification settings - Fork 2
test: make tests compatible with Vaadin 25 #160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
WalkthroughThis PR addresses test failures in Vaadin 25 integration tests by: (1) updating test annotations from standard Vaadin to instrumented variants ( Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Possibly related PRs
Suggested reviewers
Pre-merge checks and finishing touches❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing touches
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. Comment |
|
There was a problem hiding this 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
📒 Files selected for processing (8)
pom.xmlsrc/test/java/com/flowingcode/vaadin/addons/gridhelpers/it/HeaderFooterStylesIT.javasrc/test/java/com/flowingcode/vaadin/addons/gridhelpers/it/HeaderFooterStylesView.javasrc/test/java/com/flowingcode/vaadin/addons/gridhelpers/it/HeightByRowsITView.javasrc/test/java/com/flowingcode/vaadin/addons/gridhelpers/it/IntegrationView.javasrc/test/java/com/flowingcode/vaadin/addons/gridhelpers/it/ResponsiveGridITView.javasrc/test/java/com/flowingcode/vaadin/addons/gridhelpers/it/ViewInitializerImpl.javasrc/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.
| <dependency> | ||
| <groupId>com.vaadin</groupId> | ||
| <artifactId>vaadin-dev</artifactId> | ||
| </dependency> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
| <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.
| /*- | ||
| * #%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% | ||
| */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
| /*- | |
| * #%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.



Close #158
Summary by CodeRabbit
Tests
Chores
✏️ Tip: You can customize this high-level summary in your review settings.