Skip to content
Snippets Groups Projects
Commit 5cbef157 authored by Robert Goldmann's avatar Robert Goldmann
Browse files

Refactoring: use hasSize() with assertJ

parent 394f9773
Branches
Tags
No related merge requests found
...@@ -69,7 +69,7 @@ class SearchTest extends SeleniumTestBase ...@@ -69,7 +69,7 @@ class SearchTest extends SeleniumTestBase
{ {
// === PAGE 1 === // === PAGE 1 ===
List<WebElement> pages = driver.findElements(By.cssSelector(".pagination-position-top .pagination li")); List<WebElement> pages = driver.findElements(By.cssSelector(".pagination-position-top .pagination li"));
assertThat(pages.size()).isEqualTo(5); assertThat(pages).hasSize(5);
assertThat(pages.get(0).getAttribute("class")).contains("disabled"); assertThat(pages.get(0).getAttribute("class")).contains("disabled");
assertThat(pages.get(1).findElement(By.className("page-link")).getText()).isEqualTo("1"); assertThat(pages.get(1).findElement(By.className("page-link")).getText()).isEqualTo("1");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment