Sha256: 43ebf45a5395321aedef99dbd1cff5b0736ad9fb90478be0df4f5ef162418571

Contents?: true

Size: 1.68 KB

Versions: 17

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 2 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

17 entries across 17 versions & 5 rubygems

Version Path
activeadmin-0.6.6 features/index/pagination.feature
activeadmin-0.6.5 features/index/pagination.feature
activeadmin-0.6.4 features/index/pagination.feature
yousty-activeadmin-1.0.4.pre features/index/pagination.feature
yousty-activeadmin-1.0.3.pre features/index/pagination.feature
active_administration-0.0.3 features/index/pagination.feature
activeadministration-0.0.2 features/index/pagination.feature
active_administration-0.0.2 features/index/pagination.feature
activeadministration-0.0.1 features/index/pagination.feature
active_administration-0.0.1 features/index/pagination.feature
yousty-activeadmin-1.0.2.pre features/index/pagination.feature
activeadmin-0.6.3 features/index/pagination.feature
yousty-activeadmin-1.0.1.pre features/index/pagination.feature
yousty-activeadmin-1.0.0.pre features/index/pagination.feature
activeadmin-0.6.2 features/index/pagination.feature
activeadmin-0.6.1 features/index/pagination.feature
aa-rails4-0.6.0 features/index/pagination.feature