Sha256: 501e5c54934d0f5ad0f2f185fdc27d6fad466cd073c6b303e702d288badc93d7

Contents?: true

Size: 1.47 KB

Versions: 19

Compression:

Stored size: 1.47 KB

Contents

Feature: Show - Attributes Table Title
  
  Modifying the title of the panel wrapping the attributes table
  
  Background:
    Given a post with the title "Hello World" written by "Jane Doe" exists
  
  Scenario: Set a string as the title
    Given a show configuration of:
    """
      ActiveAdmin.register Post do
        show do
          attributes_table title: "Title From String"
        end
      end
    """
    Then I should see the panel title "Title From String"
    And I should see the attributes table
  
  Scenario: Set a method to be called on the resource as the title
    Given a show configuration of:
    """
      ActiveAdmin.register Post do
        show do
          attributes_table title: :title
        end
      end
    """
    Then I should see the panel title "Hello World"
    And I should see the attributes table
  
  Scenario: Set a proc as the title
    Given a show configuration of:
    """
      ActiveAdmin.register Post do
        show do
          attributes_table title: proc{ |post| "Title: #{post.title}" }
        end
      end
    """
    Then I should see the panel title "Title: Hello World"
    And I should see the attributes table
  
  Scenario: Should not accept other keys
    Given a show configuration of:
    """
      ActiveAdmin.register Post do
        show do
          attributes_table foo: "Title From String"
        end
      end
    """
    Then I should not see the panel title "Title From String"
    And I should see the attributes table

Version data entries

19 entries across 19 versions & 4 rubygems

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