Skip to content

Commit 1ff8a13

Browse files
javier-godoypaodb
authored andcommitted
test: make tests compatible with Vaadin 25
1 parent fbc1d51 commit 1ff8a13

File tree

4 files changed

+43
-3
lines changed

4 files changed

+43
-3
lines changed

pom.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,12 @@
130130
<artifactId>json-migration-helper</artifactId>
131131
<version>0.9.0</version>
132132
</dependency>
133+
<dependency>
134+
<groupId>org.ow2.asm</groupId>
135+
<artifactId>asm</artifactId>
136+
<version>9.8</version>
137+
<scope>test</scope>
138+
</dependency>
133139
<dependency>
134140
<groupId>org.slf4j</groupId>
135141
<artifactId>slf4j-simple</artifactId>

src/test/java/com/flowingcode/vaadin/addons/chipfield/integration/IntegrationView.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,17 @@
2020
package com.flowingcode.vaadin.addons.chipfield.integration;
2121

2222
import com.flowingcode.vaadin.addons.chipfield.ChipField;
23+
import com.flowingcode.vaadin.jsonmigration.InstrumentedRoute;
2324
import com.flowingcode.vaadin.testbench.rpc.JsonArrayList;
2425
import com.vaadin.flow.component.ClientCallable;
2526
import com.vaadin.flow.component.html.Div;
26-
import com.vaadin.flow.router.Route;
2727
import elemental.json.Json;
2828
import java.lang.reflect.Method;
2929
import java.util.Arrays;
3030
import java.util.List;
3131
import java.util.Optional;
3232

33-
@Route("it")
33+
@InstrumentedRoute("it")
3434
public class IntegrationView extends Div implements IntegrationViewCallables {
3535

3636
public ChipField<String> field;
@@ -166,7 +166,7 @@ public void addItemCreatedListener() {
166166
@Override
167167
@ClientCallable
168168
public JsonArrayList<String> getLastValueChange() {
169-
return JsonArrayList.fromStringArray(lastValueChange);
169+
return JsonArrayList.fromStrings(lastValueChange);
170170
}
171171

172172
@Override
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/*-
2+
* #%L
3+
* RPC for Vaadin TestBench
4+
* %%
5+
* Copyright (C) 2021 - 2025 Flowing Code
6+
* %%
7+
* Licensed under the Apache License, Version 2.0 (the "License");
8+
* you may not use this file except in compliance with the License.
9+
* You may obtain a copy of the License at
10+
*
11+
* http://www.apache.org/licenses/LICENSE-2.0
12+
*
13+
* Unless required by applicable law or agreed to in writing, software
14+
* distributed under the License is distributed on an "AS IS" BASIS,
15+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
* See the License for the specific language governing permissions and
17+
* limitations under the License.
18+
* #L%
19+
*/
20+
package com.flowingcode.vaadin.addons.chipfield.integration;
21+
22+
import com.flowingcode.vaadin.jsonmigration.InstrumentationViewInitializer;
23+
import com.vaadin.flow.server.ServiceInitEvent;
24+
25+
@SuppressWarnings("serial")
26+
public class ViewInitializerImpl extends InstrumentationViewInitializer {
27+
28+
@Override
29+
public void serviceInit(ServiceInitEvent event) {
30+
registerInstrumentedRoute(IntegrationView.class);
31+
}
32+
33+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
com.flowingcode.vaadin.addons.chipfield.integration.ViewInitializerImpl

0 commit comments

Comments
 (0)