All Implemented Interfaces:
Component, Element, Paging

public class N2oPaging extends N2oComponent implements Paging
Компонент пагинации для автотестирования
  • Field Details

    • ellipsisLocator

      protected String ellipsisLocator
    • pageItemLocator

      protected String pageItemLocator
    • countButtonLocator

      protected String countButtonLocator
    • pagesLocator

      protected String pagesLocator
    • nextButtonLocator

      protected String nextButtonLocator
    • prevButtonLocator

      protected String prevButtonLocator
    • paginationContainer

      protected String paginationContainer
    • totalTextLocator

      protected String totalTextLocator
  • Constructor Details

    • N2oPaging

      public N2oPaging(com.codeborne.selenide.SelenideElement element)
  • Method Details

    • shouldHaveActivePage

      public void shouldHaveActivePage(String label, Duration... duration)
      Description copied from interface: Paging
      Проверка активной/выбранной страницы
      Specified by:
      shouldHaveActivePage in interface Paging
      Parameters:
      label - ожидаемый номер выбранной страницы
    • selectPage

      public void selectPage(String number)
      Description copied from interface: Paging
      Клик по номеру страницы
      Specified by:
      selectPage in interface Paging
      Parameters:
      number - номер страницы
    • shouldHavePageNumber

      public void shouldHavePageNumber(String number)
      Description copied from interface: Paging
      Проверка наличия номера страницы
      Specified by:
      shouldHavePageNumber in interface Paging
      Parameters:
      number - проверяемый номер страницы
    • totalElements

      public int totalElements()
      Description copied from interface: Paging
      Возвращает общее количества элементов у виджета
      Specified by:
      totalElements in interface Paging
      Returns:
      Число элементов
    • shouldHaveTotalElements

      public void shouldHaveTotalElements(int count)
      Description copied from interface: Paging
      Проверка общего числа элементов у виджета
      Specified by:
      shouldHaveTotalElements in interface Paging
      Parameters:
      count - ожидаемое количество
    • shouldNotHaveTotalElements

      public void shouldNotHaveTotalElements()
      Description copied from interface: Paging
      Проверка отсутствия отображения общего числа элементов
      Specified by:
      shouldNotHaveTotalElements in interface Paging
    • shouldHavePrev

      public void shouldHavePrev()
      Description copied from interface: Paging
      Проверка наличия кнопки перехода на предыдущую страницу
      Specified by:
      shouldHavePrev in interface Paging
    • shouldNotHavePrev

      public void shouldNotHavePrev()
      Description copied from interface: Paging
      Проверка отсутствия кнопки перехода на предыдущую страницу
      Specified by:
      shouldNotHavePrev in interface Paging
    • prevButtonShouldBeEnabled

      public void prevButtonShouldBeEnabled()
      Description copied from interface: Paging
      Проверка доступности кнопки перехода на предыдущую страницу
      Specified by:
      prevButtonShouldBeEnabled in interface Paging
    • prevButtonShouldBeDisabled

      public void prevButtonShouldBeDisabled()
      Description copied from interface: Paging
      Проверка недоступности кнопки перехода на предыдущую страницу
      Specified by:
      prevButtonShouldBeDisabled in interface Paging
    • prevShouldHaveLabel

      public void prevShouldHaveLabel(String label, Duration... duration)
      Description copied from interface: Paging
      Проверка метки кнопки перехода на предыдущую страницу
      Specified by:
      prevShouldHaveLabel in interface Paging
      Parameters:
      label - ожидаемое значение метки
    • prevShouldHaveIcon

      public void prevShouldHaveIcon(String icon)
      Description copied from interface: Paging
      Проверка иконки кнопки перехода на предыдущую страницу
      Specified by:
      prevShouldHaveIcon in interface Paging
      Parameters:
      icon - ожидаемая иконка
    • selectPrev

      public void selectPrev()
      Description copied from interface: Paging
      Переход на предыдущую страницу
      Specified by:
      selectPrev in interface Paging
    • shouldNotHaveNext

      public void shouldNotHaveNext()
      Description copied from interface: Paging
      Проверка отсутствия кнопки перехода на следующую страницу
      Specified by:
      shouldNotHaveNext in interface Paging
    • shouldHaveNext

      public void shouldHaveNext()
      Description copied from interface: Paging
      Проверка наличия кнопки перехода на следующую страницу
      Specified by:
      shouldHaveNext in interface Paging
    • nextShouldHaveLabel

      public void nextShouldHaveLabel(String label, Duration... duration)
      Description copied from interface: Paging
      Проверка метки кнопки перехода на следующую страницу
      Specified by:
      nextShouldHaveLabel in interface Paging
      Parameters:
      label - ожидаемое значение метки
    • nextShouldHaveIcon

      public void nextShouldHaveIcon(String icon)
      Description copied from interface: Paging
      Проверка иконки кнопки перехода на следующую страницу
      Specified by:
      nextShouldHaveIcon in interface Paging
      Parameters:
      icon - ожидаемая иконка
    • selectNext

      public void selectNext()
      Description copied from interface: Paging
      Переход на следующую страницу
      Specified by:
      selectNext in interface Paging
    • nextButtonShouldBeEnabled

      public void nextButtonShouldBeEnabled()
      Description copied from interface: Paging
      Проверка доступности кнопки перехода на следующую страницу
      Specified by:
      nextButtonShouldBeEnabled in interface Paging
    • nextButtonShouldBeDisabled

      public void nextButtonShouldBeDisabled()
      Description copied from interface: Paging
      Проверка недоступности кнопки перехода на следующую страницу
      Specified by:
      nextButtonShouldBeDisabled in interface Paging
    • shouldHaveFirst

      public void shouldHaveFirst()
      Description copied from interface: Paging
      Проверка наличия кнопки перехода на первую страницу
      Specified by:
      shouldHaveFirst in interface Paging
    • selectFirst

      public void selectFirst()
      Description copied from interface: Paging
      Переход на первую страницу
      Specified by:
      selectFirst in interface Paging
    • shouldNotHaveLast

      public void shouldNotHaveLast()
      Description copied from interface: Paging
      Проверка отсутствия кнопки перехода на последнюю страницу
      Specified by:
      shouldNotHaveLast in interface Paging
    • shouldHaveLast

      public void shouldHaveLast()
      Description copied from interface: Paging
      Проверка наличия кнопки перехода на последнюю страницу
      Specified by:
      shouldHaveLast in interface Paging
    • lastShouldHavePage

      public void lastShouldHavePage(String label, Duration... duration)
      Description copied from interface: Paging
      Проверка значения кнопки перехода на последнюю страницу
      Specified by:
      lastShouldHavePage in interface Paging
      Parameters:
      label - ожидаемое значение кнопки
    • selectLast

      public void selectLast()
      Description copied from interface: Paging
      Переход на последнюю страницу
      Specified by:
      selectLast in interface Paging
    • firstPageShouldHaveEllipsis

      public void firstPageShouldHaveEllipsis()
      Description copied from interface: Paging
      Проверки наличия многоточия у кнопки перехода на первую страницу
      Specified by:
      firstPageShouldHaveEllipsis in interface Paging
    • firstPageShouldNotHaveEllipsis

      public void firstPageShouldNotHaveEllipsis()
      Description copied from interface: Paging
      Проверки отсутствия многоточия у кнопки перехода на первую страницу
      Specified by:
      firstPageShouldNotHaveEllipsis in interface Paging
    • lastPageShouldHaveEllipsis

      public void lastPageShouldHaveEllipsis()
      Description copied from interface: Paging
      Проверки наличия многоточия у кнопки перехода на последнюю страницу
      Specified by:
      lastPageShouldHaveEllipsis in interface Paging
    • lastPageShouldNotHaveEllipsis

      public void lastPageShouldNotHaveEllipsis()
      Description copied from interface: Paging
      Проверки отсутствия многоточия у кнопки перехода на последнюю страницу
      Specified by:
      lastPageShouldNotHaveEllipsis in interface Paging
    • pageNumberButtonShouldBeVisible

      public void pageNumberButtonShouldBeVisible(String number)
      Description copied from interface: Paging
      Проверка видимости кнопки перехода на страницу
      Specified by:
      pageNumberButtonShouldBeVisible in interface Paging
      Parameters:
      number - ожидаемая страница
    • pageNumberButtonShouldNotBeVisible

      public void pageNumberButtonShouldNotBeVisible(String number)
      Description copied from interface: Paging
      Проверка отсутствия видимости кнопки перехода на страницу
      Specified by:
      pageNumberButtonShouldNotBeVisible in interface Paging
      Parameters:
      number - ожидаемая страница
    • countButtonShouldBeVisible

      public void countButtonShouldBeVisible()
      Description copied from interface: Paging
      Проверка видимости кнопки запроса на количество записей
      Specified by:
      countButtonShouldBeVisible in interface Paging
    • countButtonShouldNotBeVisible

      public void countButtonShouldNotBeVisible()
      Description copied from interface: Paging
      Проверка отсутствия видимости кнопки запроса на количество записей
      Specified by:
      countButtonShouldNotBeVisible in interface Paging
    • countButtonClick

      public void countButtonClick()
      Description copied from interface: Paging
      Клик по "Узнать кол-во записей"
      Specified by:
      countButtonClick in interface Paging
    • shouldExists

      public void shouldExists()
      Description copied from interface: Component
      Проверка существования компонент на странице
      Specified by:
      shouldExists in interface Component
      Specified by:
      shouldExists in interface Paging
      Overrides:
      shouldExists in class N2oComponent
    • shouldNotExists

      public void shouldNotExists()
      Description copied from interface: Paging
      Проверка не существования пагинации
      Specified by:
      shouldNotExists in interface Paging
    • pageNumberButton

      protected com.codeborne.selenide.SelenideElement pageNumberButton(String number)
    • paginationInfo

      protected com.codeborne.selenide.SelenideElement paginationInfo()
    • prevButton

      protected com.codeborne.selenide.SelenideElement prevButton()
    • nextButton

      protected com.codeborne.selenide.SelenideElement nextButton()
    • firstPage

      protected com.codeborne.selenide.SelenideElement firstPage()
    • lastPage

      protected com.codeborne.selenide.SelenideElement lastPage()
    • countButton

      protected com.codeborne.selenide.SelenideElement countButton()