Skip to content

Commit

Permalink
chore: replace deprecated TB api in test (24.4) (#1357)
Browse files Browse the repository at this point in the history
  • Loading branch information
ZheSun88 authored Jun 13, 2024
1 parent 40003d4 commit 4c5dd53
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
public class OrderCardElement extends DivElement {

public String getGoodsCount(int index) {
SpanElement count = $(DivElement.class).attributeContains("class", "goods-item").get(index)
SpanElement count = $(DivElement.class).withAttributeContainingWord("class", "goods-item").get(index)
.$(SpanElement.class).first();
return count.getText();
}

@Override
public void click() {
$(DivElement.class).attributeContains("class", "wrapper").first().click();
$(DivElement.class).withAttributeContainingWord("class", "wrapper").first().click();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ private void clickAmountFieldPlusOrMinus(int value) {
throw new IllegalArgumentException("Value should be -1 or 1");
}
final String part = value < 0 ? "decrease-button" : "increase-button";
$("vaadin-integer-field").first().$("div").attribute("part", part).first().click();
$("vaadin-integer-field").first().$("div").withAttribute("part", part).first().click();
}
}

0 comments on commit 4c5dd53

Please sign in to comment.