Skip to content

Commit

Permalink
chore: bump Testbench to 9.3.0.alpha1 (vaadin#6242)
Browse files Browse the repository at this point in the history
* chore: bump Testbench to 9.3.0.alpha1

* fix tests

Test fixed to adapt to new semantic of 'id()' query selector
throwing an exception when there are more elements with
the same id.

For CompositeIT, two modal dialogs are opened, adding two
elements with 'overlay' id. The test now takes the last
one, that corresponds to the Language edit dialog.

* format code

---------

Co-authored-by: Zhe Sun <[email protected]>
  • Loading branch information
mcollovati and ZheSun88 authored Apr 30, 2024
1 parent 2b4d418 commit 73c1d59
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<url>https://vaadin.com/components</url>
<properties>
<flow.version>24.4-SNAPSHOT</flow.version>
<testbench.version>9.2.7</testbench.version>
<testbench.version>9.3.0.alpha1</testbench.version>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ public void compositeTouchesDirtyState() {
$(TextFieldElement.class).attribute("editor-role", "language-field")
.first().setValue("English");

$(TestBenchElement.class).id("overlay").$(ButtonElement.class).first()
.click();
$(TestBenchElement.class).withId("overlay").last()
.$(ButtonElement.class).first().click();

Assert.assertTrue(
$(CrudElement.class).first().getEditorSaveButton().isEnabled());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ private void addNumberFields() {

dollarField.setId("dollar-field");
euroField.setId("euro-field");
stepperField.setId("step-number-field");
stepperField.setId("step-number-field-2");

add(dollarField, euroField, stepperField);
}
Expand Down

0 comments on commit 73c1d59

Please sign in to comment.