Skip to content

Commit

Permalink
solve conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
Kate-Semenova committed Jun 13, 2024
1 parent 211bbdf commit 772e85c
Showing 1 changed file with 15 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,36 +9,37 @@
import java.util.List;

import static com.epam.jdi.light.asserts.core.SoftAssert.jdiAssert;
import static org.hamcrest.Matchers.equalTo;

public class PaginatorAssert extends UIAssert<PaginatorAssert, Paginator> {
@JDIAction(value = "Assert that '{name}' has '{0}' label", isAssert = true)
public PaginatorAssert pageSizeLabel(final String label) {
jdiAssert(element().itemPerPageLabel(), Matchers.equalTo(label));
jdiAssert(element().itemPerPageLabel(), equalTo(label));
return this;
}

@JDIAction(value = "Assert that '{0}' option selected for '{name}'", isAssert = true)
public PaginatorAssert itemsPerPageSelected(final int number) {
jdiAssert(element().selected(), Matchers.equalTo(number));
jdiAssert(element().selected(), equalTo(number));
return this;
}

@JDIAction(value = "Assert that '{0}' options for '{name}'", isAssert = true)
public PaginatorAssert itemsPerPageList(final List<Integer> options) {
jdiAssert(element().options(), Matchers.equalTo(options));
jdiAssert(element().options(), equalTo(options));
return this;

}

@JDIAction(value = "Assert that range is '{0}' for '{name}'", isAssert = true)
public PaginatorAssert rangeLabel(final String label) {
jdiAssert(element().range(), Matchers.equalTo(label));
jdiAssert(element().range(), equalTo(label));
return this;
}

@JDIAction(value = "Assert that '{name}' has '{0}' color theme", isAssert = true)
public PaginatorAssert colorTheme(final AngularColors value) {
jdiAssert(AngularColors.fromName(element().colorTheme()), Matchers.equalTo(value));
jdiAssert(AngularColors.fromType(element().colorTheme()), equalTo(value));
return this;
}

Expand All @@ -50,37 +51,37 @@ public PaginatorAssert colorTheme(final String value) {

@JDIAction(value = "Assert that '{name}' has '{0}' color of the boarder", isAssert = true)
public PaginatorAssert borderColor(final AngularColors value) {
jdiAssert(AngularColors.fromColor(element().boarderColor()), Matchers.equalTo(value));
jdiAssert(AngularColors.fromType(element().boarderColor()), Matchers.equalTo(value));
return this;
}

@JDIAction(value = "Assert that '{name}' has '{0}' color of the boarder", isAssert = true)
public PaginatorAssert borderColor(final String value) {
jdiAssert(element().boarderColor(), Matchers.equalTo(value));
jdiAssert(element().boarderColor(), equalTo(value));
return this;
}

@JDIAction(value = "Assert that '{name}' has '{0}' color of the selected option", isAssert = true)
public PaginatorAssert selectedOptionColor(final AngularColors value) {
jdiAssert(AngularColors.fromColor(element().selectedOptionColor()), Matchers.equalTo(value));
jdiAssert((element().selectedOptionColor()), equalTo(value));
return this;
}

@JDIAction(value = "Assert that '{name}' has '{0}' color of the selected option", isAssert = true)
public PaginatorAssert selectedOptionColor(final String value) {
jdiAssert(element().selectedOptionColor(), Matchers.equalTo(value));
jdiAssert(element().selectedOptionColor(), equalTo(value));
return this;
}

@JDIAction(value = "Assert that '{name} has firstPageLabel='{0}'", isAssert = true)
public PaginatorAssert firstPageLabel(final String label) {
jdiAssert(element().firstPageLabel(), Matchers.equalTo(label));
jdiAssert(element().firstPageLabel(), equalTo(label));
return this;
}

@JDIAction(value = "Assert that '{name} has lastPageLabel='{0}'", isAssert = true)
public PaginatorAssert lastPageLabel(final String label) {
jdiAssert(element().lastPageLabel(), Matchers.equalTo(label));
jdiAssert(element().lastPageLabel(), equalTo(label));
return this;
}

Expand All @@ -104,13 +105,13 @@ public PaginatorAssert firstLastButtonsShown(boolean value) {
*/
@JDIAction(value = "Assert that '{name}' has current page index of {0}", isAssert = true)
public PaginatorAssert pageIndexCurrent(int pageIndex) {
jdiAssert(element().pageIndexCurrent(), Matchers.equalTo(pageIndex));
jdiAssert(element().pageIndexCurrent(), equalTo(pageIndex));
return this;
}

@JDIAction(value = "Assert that '{name}' has {0} total number of items that are being paginated", isAssert = true)
public PaginatorAssert totalNumberOfPaginatedItems(int length) {
jdiAssert(element().totalNumberOfPaginatedItems(), Matchers.equalTo(length));
jdiAssert(element().totalNumberOfPaginatedItems(), equalTo(length));
return this;
}

Expand Down Expand Up @@ -144,7 +145,7 @@ public PaginatorAssert nextPageButtonDisabled() {

@JDIAction(value = "Assert that item per page selector is disabled for '{name}'", isAssert = true)
public PaginatorAssert itemPerPageSelectorDisabled() {
jdiAssert(element().itemPerPageSelector().attr("aria-disabled"), Matchers.equalTo("true"),
jdiAssert(element().itemPerPageSelector().attr("aria-disabled"), equalTo("true"),
"item per page selector should be DISABLED");
return this;
}
Expand Down

0 comments on commit 772e85c

Please sign in to comment.