Sha256: fefd44464efb9316e8d1797096f823fb14bc84ca6fbccafef17380801b5d80e8

Contents?: true

Size: 1.09 KB

Versions: 84

Compression:

Stored size: 1.09 KB

Contents

Feature: Decorators

  Using decorators for index and show sections

  Background:
    Given a user named "John Doe" exists
    Given a post with the title "A very unique post" exists
    And I am logged in

  Scenario: Index page with decorator
    Given a configuration of:
    """
      ActiveAdmin.register Post do
        decorate_with PostDecorator

        index do
          column(:id)
          column(:title)
          column(:decorator_method)
        end
      end
    """
    When I am on the index page for posts
    Then I should see "A method only available on the decorator"
    And I should see "A very unique post"

  Scenario: Show page with decorator
    Given a configuration of:
    """
      ActiveAdmin.register Post do
        decorate_with PostDecorator

        show do
          attributes_table :title, :decorator_method
        end
      end
    """
    When I am on the index page for posts
    And I follow "View"
    And I should see the attribute "Decorator Method" with "A method only available on the decorator"
    And I should see the attribute "Title" with "A very unique post"

Version data entries

84 entries across 84 versions & 7 rubygems

Version Path
lalala-4.0.0.dev.134 vendor/deps/active_admin/features/decorators.feature
lalala-4.0.0.dev.133 vendor/deps/active_admin/features/decorators.feature
lalala-4.0.0.dev.132 vendor/deps/active_admin/features/decorators.feature
lalala-4.0.0.dev.131 vendor/deps/active_admin/features/decorators.feature
lalala-4.0.0.dev.129 vendor/deps/active_admin/features/decorators.feature
lalala-4.0.0.dev.128 vendor/deps/active_admin/features/decorators.feature
lalala-4.0.0.dev.126 vendor/deps/active_admin/features/decorators.feature
lalala-4.0.0.dev.125 vendor/deps/active_admin/features/decorators.feature
lalala-4.0.0.dev.124 vendor/deps/active_admin/features/decorators.feature
lalala-4.0.0.dev.123 vendor/deps/active_admin/features/decorators.feature
lalala-4.0.0.dev.118 vendor/deps/active_admin/features/decorators.feature
lalala-4.0.0.dev.116 vendor/deps/active_admin/features/decorators.feature
lalala-4.0.0.dev.114 vendor/deps/active_admin/features/decorators.feature
lalala-4.0.0.dev.113 vendor/deps/active_admin/features/decorators.feature
lalala-4.0.0.dev.111 vendor/deps/active_admin/features/decorators.feature
lalala-4.0.0.dev.109 vendor/deps/active_admin/features/decorators.feature
lalala-4.0.0.dev.107 vendor/deps/active_admin/features/decorators.feature
lalala-4.0.0.dev.94 vendor/deps/active_admin/features/decorators.feature
lalala-4.0.0.dev.92 vendor/deps/active_admin/features/decorators.feature
lalala-4.0.0.dev.90 vendor/deps/active_admin/features/decorators.feature