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.84 vendor/deps/active_admin/features/decorators.feature
lalala-4.0.0.dev.80 vendor/deps/active_admin/features/decorators.feature
lalala-4.0.0.dev.79 vendor/deps/active_admin/features/decorators.feature
lalala-4.0.0.dev.78 vendor/deps/active_admin/features/decorators.feature
lalala-4.0.0.dev.77 vendor/deps/active_admin/features/decorators.feature
lalala-4.0.0.dev.74 vendor/deps/active_admin/features/decorators.feature
lalala-4.0.0.dev.73 vendor/deps/active_admin/features/decorators.feature
lalala-4.0.0.dev.72 vendor/deps/active_admin/features/decorators.feature
lalala-4.0.0.dev.71 vendor/deps/active_admin/features/decorators.feature
lalala-4.0.0.dev.66 vendor/deps/active_admin/features/decorators.feature
lalala-4.0.0.dev.65 vendor/deps/active_admin/features/decorators.feature
activeadmin-0.6.0 features/decorators.feature
lalala-4.0.0.dev.64 vendor/deps/active_admin/features/decorators.feature
lalala-4.0.0.dev.63 vendor/deps/active_admin/features/decorators.feature
lalala-4.0.0.dev.62 vendor/deps/active_admin/features/decorators.feature
lalala-4.0.0.dev.61 vendor/deps/active_admin/features/decorators.feature
lalala-4.0.0.dev.60 vendor/deps/active_admin/features/decorators.feature
lalala-4.0.0.dev.59 vendor/deps/active_admin/features/decorators.feature
lalala-4.0.0.dev.58 vendor/deps/active_admin/features/decorators.feature
lalala-4.0.0.dev.57 vendor/deps/active_admin/features/decorators.feature