diff --git a/jdi-light-angular-tests/src/test/java/io/github/epam/angular/tests/elements/common/CheckboxTests.java b/jdi-light-angular-tests/src/test/java/io/github/epam/angular/tests/elements/common/CheckboxTests.java index 048fc10d59..c3704a8545 100644 --- a/jdi-light-angular-tests/src/test/java/io/github/epam/angular/tests/elements/common/CheckboxTests.java +++ b/jdi-light-angular-tests/src/test/java/io/github/epam/angular/tests/elements/common/CheckboxTests.java @@ -1,15 +1,17 @@ package io.github.epam.angular.tests.elements.common; -import com.epam.jdi.light.angular.elements.enums.AngularColors; import io.github.epam.TestsInit; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; -import static io.github.com.enums.CheckBoxAlignPosition.AFTER; -import static io.github.com.enums.CheckBoxAlignPosition.BEFORE; +import static com.epam.jdi.light.angular.elements.enums.CustomColors.BLACK_SEMI_TRANSPARENT; +import static com.epam.jdi.light.angular.elements.enums.CustomColors.PURPLE; +import static com.epam.jdi.light.angular.elements.enums.CustomColors.RED; +import static com.epam.jdi.light.angular.elements.enums.CustomColors.YELLOW; import static com.jdiai.tools.Timer.waitCondition; - import static io.github.com.StaticSite.checkBoxPage; +import static io.github.com.enums.CheckBoxAlignPosition.AFTER; +import static io.github.com.enums.CheckBoxAlignPosition.BEFORE; import static io.github.com.pages.CheckBoxPage.accentColorCheckbox; import static io.github.com.pages.CheckBoxPage.basicCheckbox; import static io.github.com.pages.CheckBoxPage.disabledCheckbox; @@ -86,16 +88,16 @@ public void isRequiredCheckboxTest() { public void angularColorCheckBoxTest() { //Check color for checkboxes with attribute 'color' primaryColorCheckbox.uncheck(); - primaryColorCheckbox.has().color(AngularColors.UNSELECTED); + primaryColorCheckbox.has().color(BLACK_SEMI_TRANSPARENT.getColor()); primaryColorCheckbox.check(); - primaryColorCheckbox.has().color(AngularColors.PRIMARY); + primaryColorCheckbox.has().color(PURPLE.getColor()); accentColorCheckbox.check(); - accentColorCheckbox.has().color(AngularColors.ACCENT); + accentColorCheckbox.has().color(YELLOW.getColor()); warnColorCheckbox.check(); - warnColorCheckbox.has().color(AngularColors.WARN); + warnColorCheckbox.has().color(RED.getColor()); //Check color for checkbox without attribute 'color' requiredCheckbox.check(); - requiredCheckbox.has().color(AngularColors.ACCENT); + requiredCheckbox.has().color(YELLOW.getColor()); } } diff --git a/jdi-light-angular/src/main/java/com/epam/jdi/light/angular/asserts/CheckboxAssert.java b/jdi-light-angular/src/main/java/com/epam/jdi/light/angular/asserts/CheckboxAssert.java index 6c99c03be3..9ec714f52c 100644 --- a/jdi-light-angular/src/main/java/com/epam/jdi/light/angular/asserts/CheckboxAssert.java +++ b/jdi-light-angular/src/main/java/com/epam/jdi/light/angular/asserts/CheckboxAssert.java @@ -1,7 +1,6 @@ package com.epam.jdi.light.angular.asserts; import com.epam.jdi.light.angular.elements.common.Checkbox; -import com.epam.jdi.light.angular.elements.enums.AngularColors; import com.epam.jdi.light.asserts.generic.UIAssert; import com.epam.jdi.light.common.JDIAction; import org.hamcrest.Matchers; @@ -71,12 +70,6 @@ public CheckboxAssert notRequired() { return this; } - @JDIAction(value = "Assert that '{name}' angular color is '{0}'", isAssert = true) - public CheckboxAssert color(AngularColors expectedColor) { - jdiAssert(element().color(), Matchers.is(expectedColor)); - return this; - } - @JDIAction(value = "Assert that '{name}' color is '{0}'", isAssert = true) public CheckboxAssert color(String expectedColor) { jdiAssert(element().color(), Matchers.is(expectedColor));