Skip to content

Commit

Permalink
4949-refactoringCheckBoxRequiredPlus
Browse files Browse the repository at this point in the history
  • Loading branch information
MayaElf committed Oct 11, 2023
1 parent 569b15f commit 02258c2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.epam.jdi.light.angular.elements.common.Checkbox;
import com.epam.jdi.light.elements.pageobjects.annotations.locators.UI;
import com.epam.jdi.light.ui.html.elements.common.Button;
import com.epam.jdi.light.ui.html.elements.common.Text;

public class CheckBoxPage extends NewAngularPage {
@UI("#basic-checkbox")
Expand Down Expand Up @@ -44,4 +45,7 @@ public class CheckBoxPage extends NewAngularPage {
@UI("#checkbox-required-option")
public static Checkbox requiredCheckbox;

@UI("//*[@class='error']")
public static Text requiredCheckboxText;

}
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import static io.github.com.pages.CheckBoxPage.indeterminateCheckbox;
import static io.github.com.pages.CheckBoxPage.primaryColorCheckbox;
import static io.github.com.pages.CheckBoxPage.requiredCheckbox;
import static io.github.com.pages.CheckBoxPage.requiredCheckboxText;
import static io.github.com.pages.CheckBoxPage.resultCheckbox;
import static io.github.com.pages.CheckBoxPage.warnColorCheckbox;

Expand Down Expand Up @@ -85,6 +86,10 @@ public void ariaLabel() {
public void isRequired() {
requiredCheckbox.show();
resultCheckbox.is().isRequired();
requiredCheckboxText.text().contains("Checkbox should be checked!");
requiredCheckbox.check();
requiredCheckboxText.isNotExist();

}

@Test(description = "Verifies checkbox colors")
Expand Down

0 comments on commit 02258c2

Please sign in to comment.