Sha256: e0f0b4d5aae3198c61c438ea8c70a583702f719e87c5e0a55e32923b4b98cae5

Contents?: true

Size: 1.68 KB

Versions: 14

Compression:

Stored size: 1.68 KB

Contents

Feature: Index Pagination

  Background:
  Scenario: Viewing index when one page of resources exist
    Given an index configuration of:
    """
      ActiveAdmin.register Post
    """
    Given 20 posts exist
    When I am on the index page for posts
    Then I should see "Displaying all 20 Posts"
    And I should not see pagination

  Scenario: Viewing index when multiple pages of resources exist
    Given an index configuration of:
    """
      ActiveAdmin.register Post
    """
    Given 31 posts exist
    When I am on the index page for posts
    Then I should see pagination with 2 pages

  Scenario: Viewing index with a custom per page set
    Given an index configuration of:
    """
      ActiveAdmin.register Post do
        config.per_page = 2
      end
    """
    Given 3 posts exist
    When I am on the index page for posts
    Then I should see pagination with 2 pages
    And I should see "Displaying Posts 1 - 2 of 3 in total"

  Scenario: Viewing index with pagination disabled
    Given an index configuration of:
    """
      ActiveAdmin.register Post do
        config.paginate = false
      end
    """
    Given 31 posts exist
    When I am on the index page for posts
    Then I should not see pagination

    Scenario: Viewing index with pagination_total set to false
      Given an index configuration of:
      """
        ActiveAdmin.register Post do
          index :pagination_total => false do
          end
        end
      """
      Given 100 posts exist
      When I am on the index page for posts
      Then I should see pagination with 4 pages
      Then I should see "Displaying Posts 1 - 30"
      And I should not see "Displaying Posts 1 - 30 of 100 in total"

Version data entries

14 entries across 14 versions & 2 rubygems

Version Path
yousty-activeadmin-1.0.17.pre features/index/pagination.feature
yousty-activeadmin-1.0.16.pre features/index/pagination.feature
yousty-activeadmin-1.0.15.pre features/index/pagination.feature
yousty-activeadmin-1.0.14.pre features/index/pagination.feature
yousty-activeadmin-1.0.13.pre features/index/pagination.feature
yousty-activeadmin-1.0.12.pre features/index/pagination.feature
yousty-activeadmin-1.0.11.pre features/index/pagination.feature
yousty-activeadmin-1.0.10.pre features/index/pagination.feature
yousty-activeadmin-1.0.9.pre features/index/pagination.feature
yousty-activeadmin-1.0.8.pre features/index/pagination.feature
activeadmin-1.0.0.pre1 features/index/pagination.feature
yousty-activeadmin-1.0.7.pre features/index/pagination.feature
yousty-activeadmin-1.0.6.pre features/index/pagination.feature
yousty-activeadmin-1.0.5.pre features/index/pagination.feature