cirandas.net

ref: master

features/manage_fields.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
Feature: check all manage fields
  As an administrator
  I want to check and uncheck all person, enterprise and community's fields

  Background:
    Given the following users
      | login      | name        |
      | mariasilva | Maria Silva |
    And the following enterprises
      | identifier   | owner      | name         | contact_email               | contact_phone  | enabled |
      | paper-street | mariasilva | Paper Street | marial.silva@workerbees.org | (288) 555-0153 | true    |
    And the following community
      | identifier  | name         |
      | mycommunity | My Community |
    And I am logged in as admin
    And I go to /admin/features/manage_fields

  @selenium
  Scenario: check all active person fields
    Given I follow "Person's fields"
    And I check "person_active"
    And I press "save_person_fields"
    When I go to admin_user's control panel
    And I follow "Edit Profile"
    Then I should see "Custom area of study"

  @selenium
  Scenario: check all active enterprise fields
    Given I follow "Enterprise's fields"
    And I check "enterprise_active"
    And I press "save_enterprise_fields"
    When I go to paper-street's control panel
    And I follow "Enterprise Info and settings"
    Then I should see "Historic and current context"

  @selenium
  Scenario: check all active community fields
    Given I follow "Community's fields"
    And I check "community_active"
    And I press "save_community_fields"
    When I go to mycommunity's control panel
    And I follow "Community Info and settings"
    Then I should see "Economic activity"

  @selenium
  Scenario: uncheck Check/Uncheck All active person field
    Given I follow "Person's fields"
    And I check "person_active"
    And I press "save_person_fields"
    And I uncheck "person_active"
    And I press "save_person_fields"
    And I follow "Control panel"
    When I follow "Edit Profile"
    Then I should not see "Custom area of study"

  @selenium
  Scenario: uncheck Check/Uncheck All active community field
    Given I follow "Community's fields"
    And I check "community_active"
    And I press "save_community_fields"
    And I follow "Community's fields"
    And I uncheck "community_active"
    And I press "save_community_fields"
    When I go to mycommunity's control panel
    And I follow "Community Info and settings"
    Then I should not see "Economic activity"

  @selenium
  Scenario: uncheck Check/Uncheck All active enterprise field
    Given I follow "Enterprise's fields"
    And I check "enterprise_active"
    And I press "save_enterprise_fields"
    And I follow "Enterprise's fields"
    And I uncheck "enterprise_active"
    And I press "save_enterprise_fields"
    When I go to paper-street's control panel
    And I follow "Enterprise Info and settings"
    Then I should not see "Historic and current context"