cirandas.net

ref: master

features/manage_categories.feature


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
Feature: manage categories
  As an environment administrator
  I want to manage categories

  Background:
    Given the following categories
      | name |
      | Products |
      | Services |
    And the following categories
      | name          | parent    |
      | Beans         | products  |
      | Potatoes      | products  |
      | Development   | services  |
    And I am logged in as admin
    And I am on the environment control panel
    And I follow "Categories"

  Scenario: load only top level categories
    Then I should see "Products"
    And I should see "Services"
    And I should not see "Beans"
    And I should not see "Development"

  @selenium
  Scenario: load subcategories only after following parent
    Then I should not see "Beans"
    And I should not see "Potatoes"
    When I follow "Show"
    And I wait 0.5 seconds for Services show animation to finish
    And I follow "Show"
    Then I should see "Beans"
    And I should see "Potatoes"