Sha256: 6751d65673a88d98a5c8b0721a3c2f26a2c2c504d475eb468a944b3f514fe749

Contents?: true

Size: 935 Bytes

Versions: 13

Compression:

Stored size: 935 Bytes

Contents

@dsl
Feature: Show resource page

  Background:
    Given I am logged in
    And products exists with attributes:
      | sku     | name      | price |
      | sofa-12 | FancySofa | 123   |

  Scenario: Default show view
    Given a configuration of:
      """
      class AbAdminProduct < AbAdmin::AbstractResource
      end
      """
    When I am on the admin product page
    Then I should see attributes table:
      | Sku   | sofa-12   |
      | Name  | FancySofa |
      | Price | 123       |

  Scenario: Default show view
    Given a configuration of:
      """
      class AbAdminProduct < AbAdmin::AbstractResource
        show do
          field :sku
          field(:price) {|item| "$#{item.price}" }
        end
      end
      """
    When I am on the admin product page
    Then I should see attributes table:
      | Sku   | sofa-12   |
      | Price | $123      |
    And I should not see "FancySofa" within "table"

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
ab_admin-0.3.6 features/dsl/show.feature
ab_admin-0.3.5 features/dsl/show.feature
ab_admin-0.3.4 features/dsl/show.feature
ab_admin-0.3.3 features/dsl/show.feature
ab_admin-0.3.2 features/dsl/show.feature
ab_admin-0.3.1 features/dsl/show.feature
ab_admin-0.3.0 features/dsl/show.feature
ab_admin-0.2.3 features/dsl/show.feature
ab_admin-0.2.2 features/dsl/show.feature
ab_admin-0.2.1 features/dsl/show.feature
ab_admin-0.2.0 features/dsl/show.feature
ab_admin-0.1.2 features/dsl/show.feature
ab_admin-0.1.1 features/dsl/show.feature