Sha256: 9879f7cfd4975c911ce46e63b1fa9dba1548601e6c1f8faf8edd4c509b84523d

Contents?: true

Size: 1.14 KB

Versions: 24

Compression:

Stored size: 1.14 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)
          column(:starred)
        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"
    And I should see "No"

  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

24 entries across 24 versions & 4 rubygems

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