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
activeadmin_addons-1.1.2 vendor/bundle/ruby/2.3.0/bundler/gems/activeadmin-a5a53c3f2b8f/features/decorators.feature
activeadmin_addons-1.1.1 vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/features/decorators.feature
yousty-activeadmin-1.0.17.pre features/decorators.feature
yousty-activeadmin-1.0.16.pre features/decorators.feature
activeadmin_addons-1.1.0 vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/features/decorators.feature
activeadmin_addons-1.0.1 vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/features/decorators.feature
activeadmin_addons-1.0.0 vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/features/decorators.feature
yousty-activeadmin-1.0.15.pre features/decorators.feature
yousty-activeadmin-1.0.14.pre features/decorators.feature
yousty-activeadmin-1.0.13.pre features/decorators.feature
yousty-activeadmin-1.0.12.pre features/decorators.feature
yousty-activeadmin-1.0.11.pre features/decorators.feature
yousty-activeadmin-1.0.10.pre features/decorators.feature
yousty-activeadmin-1.0.9.pre features/decorators.feature
yousty-activeadmin-1.0.8.pre features/decorators.feature
activeadmin-1.0.0.pre2 features/decorators.feature
activeadmin-1.0.0.pre1 features/decorators.feature
yousty-activeadmin-1.0.7.pre features/decorators.feature
yousty-activeadmin-1.0.6.pre features/decorators.feature
yousty-activeadmin-1.0.5.pre features/decorators.feature