Sha256: 3d2e47ebb8872b341eaa6e401fe8c0bae2526a59095cc439dac2da52798ccc92

Contents?: true

Size: 1.35 KB

Versions: 21

Compression:

Stored size: 1.35 KB

Contents

Feature: Index as Grid

  Viewing resources as a grid on the index page

  Scenario: Viewing index as a grid with a simple block configuration
    Given 9 posts exist
    And an index configuration of:
      """
      ActiveAdmin.register Post do
        index as: :grid do |post|
          h2 auto_link(post)
        end
      end
      """
    Then the table ".index_grid" should have 3 rows
    And the table ".index_grid" should have 3 columns
    And there should be 9 "a" tags within index grid

  Scenario: Viewing index as a grid and set the number of columns
    Given 9 posts exist
    And an index configuration of:
      """
      ActiveAdmin.register Post do
      index as: :grid, columns: 1 do |post|
          h2 auto_link(post)
        end
      end
      """
    Then the table ".index_grid" should have 9 rows
    And the table ".index_grid" should have 1 columns
    And there should be 9 "a" tags within "table.index_grid"

  Scenario: Viewing index as a grid with an odd number of items
    Given 9 posts exist
    And an index configuration of:
      """
      ActiveAdmin.register Post do
      index as: :grid, columns: 2 do |post|
          h2 auto_link(post)
        end
      end
      """
    Then the table ".index_grid" should have 5 rows
    And the table ".index_grid" should have 2 columns
    And there should be 9 "a" tags within "table.index_grid"

Version data entries

21 entries across 21 versions & 4 rubygems

Version Path
activeadmin-rails-1.7.1 features/index/index_as_grid.feature
activeadmin-rails-1.7.0 features/index/index_as_grid.feature
activeadmin-rb-1.6.0 features/index/index_as_grid.feature
activeadmin-rb-1.5.2 features/index/index_as_grid.feature
activeadmin-rb-1.5.1 features/index/index_as_grid.feature
activeadmin-rb-1.5.0 features/index/index_as_grid.feature
activeadmin_addons-1.7.1 vendor/bundle/ruby/2.3.0/bundler/gems/activeadmin-f71b375325eb/features/index/index_as_grid.feature
activeadmin-rb-1.4.0 features/index/index_as_grid.feature
activeadmin_addons-1.7.0 vendor/bundle/ruby/2.3.0/bundler/gems/activeadmin-f71b375325eb/features/index/index_as_grid.feature
activeadmin-1.3.1 features/index/index_as_grid.feature
activeadmin_addons-1.6.0 vendor/bundle/ruby/2.3.0/bundler/gems/activeadmin-f71b375325eb/features/index/index_as_grid.feature
activeadmin_addons-1.5.0 vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-f71b375325eb/features/index/index_as_grid.feature
activeadmin-1.3.0 features/index/index_as_grid.feature
activeadmin_addons-1.4.0 vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-f71b375325eb/features/index/index_as_grid.feature
activeadmin_addons-1.3.0 vendor/bundle/ruby/2.3.0/bundler/gems/activeadmin-f71b375325eb/features/index/index_as_grid.feature
activeadmin_addons-1.2.0 vendor/bundle/ruby/2.3.0/bundler/gems/activeadmin-f71b375325eb/features/index/index_as_grid.feature
activeadmin-1.2.1 features/index/index_as_grid.feature
activeadmin-1.2.0 features/index/index_as_grid.feature
activeadmin-1.1.0 features/index/index_as_grid.feature
activeadmin-1.0.0 features/index/index_as_grid.feature