Skip to content

Commit

Permalink
Merge pull request #5475 from jdi-testing/5474
Browse files Browse the repository at this point in the history
#5474 add isEnabled implementation
  • Loading branch information
pnatashap authored Apr 17, 2024
2 parents 50fcda8 + 1f83145 commit f309667
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,12 @@ public boolean isDisabled() {
return containsDisabled();
}

@JDIAction("Check that '{name}' is enabled")
@Override
public boolean isEnabled() {
return !this.isDisabled();
}

@Override
public SwitchAssert is() {
return new SwitchAssert().set(this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,12 @@ public boolean isDisabled() {
return core().hasClass("v-input--is-disabled");
}

@Override
@JDIAction("Get if '{name}' is enabled")
public boolean isEnabled() {
return !this.isDisabled();
}

@JDIAction("Get if '{name}' has input field")
public boolean hasInputField() {
return input().isExist();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,11 +192,18 @@ public List<String> selected() {
return Arrays.asList(value().attr("value").split(","));
}

@Override
@JDIAction("Get if '{name}' is disabled")
public boolean isDisabled() {
return input().hasAttribute("disabled");
}

@Override
@JDIAction("Get if '{name}' is enabled")
public boolean isEnabled() {
return !this.isDisabled();
}

@JDIAction("Type text in the {name}'s text field")
public void typeText(String value) {
input().clear();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@ public boolean isDisabled() {
return core().hasClass("v-input--is-disabled");
}

@Override
@JDIAction("Get if '{name}' is enabled")
public boolean isEnabled() {
return !this.isDisabled();
}

@JDIAction("Get '{name}' files list")
public WebList files() {
return core().finds(filesLocator);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,7 @@ public boolean isReadOnly() {
/**
* @return Check if TimePicker is disabled
*/
@Override
@JDIAction("Check that '{name}' is disabled")
public boolean isDisabled() {
return core().finds(TITLE_BUTTONS_ALL).stream()
Expand All @@ -450,6 +451,12 @@ && core().finds(CLOCK_NUMBERS).stream()
.allMatch(el -> el.attr("class").contains("--disabled"));
}

@Override
@JDIAction("Check that '{name}' is enabled")
public boolean isEnabled() {
return !this.isDisabled();
}

/**
* @return Return title background color as hex {@link String}
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ public boolean isDisabled() {
return core().hasClass("v-radio--is-disabled");
}

@Override
@JDIAction("Get if '{name}' is enabled")
public boolean isEnabled() {
return !this.isDisabled();
}

@Override
@JDIAction("Get '{name}' theme")
public String theme() {
Expand Down

0 comments on commit f309667

Please sign in to comment.