Sha256: 1b3872567c7fa593976eb225f624413bc68c80ce48493b780b74cf8d2998aa4f

Contents?: true

Size: 1.08 KB

Versions: 7

Compression:

Stored size: 1.08 KB

Contents

@dsl
Feature: Resource action items

  Background:
    Given I am logged in
    And a product with sku "table"

  Scenario: Default resource action items
    Given a configuration of:
    """
      class AbAdminProduct < AbAdmin::AbstractResource
      end
      """
    When I am on the admin products page
    Then I should see resource action items:
      | Edit | Review | Remove |

  Scenario: Define list of resource action items
    Given a configuration of:
    """
      class AbAdminProduct < AbAdmin::AbstractResource
        resource_action_items :show, :edit
      end
      """
    When I am on the admin products page
    Then I should see resource action items:
      | Edit | Review |
    And I should not see resource action item "Remove"

  Scenario: Custom resource action item
    Given a configuration of:
    """
      class AbAdminProduct < AbAdmin::AbstractResource
        resource_action_item do
          link_to icon('arrow-down'), '/', title: 'Custom'
        end
      end
      """
    When I am on the admin products page
    Then I should see resource action item "Custom"

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
ab_admin-0.3.6 features/dsl/resource_action_items.feature
ab_admin-0.3.5 features/dsl/resource_action_items.feature
ab_admin-0.3.4 features/dsl/resource_action_items.feature
ab_admin-0.3.3 features/dsl/resource_action_items.feature
ab_admin-0.3.2 features/dsl/resource_action_items.feature
ab_admin-0.3.1 features/dsl/resource_action_items.feature
ab_admin-0.3.0 features/dsl/resource_action_items.feature