cirandas.net

ref: master

features/organization_custom_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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
Feature: organization custom fields
  As a noosfero admin
  I want to choose what fields are active or required for organizations
  In order to have more consistency in the system

  Background:
    Given the following users
      | login     | name       |
      | joaosilva | Joao Silva |
    And I am logged in as "joaosilva"
    And feature "enterprise_registration" is enabled on environment
    And I go to joaosilva's control panel

  Scenario Outline: organization active fields are not displayed on creation
    Given the following <organization> fields are active fields
      | display_name  |
      | contact_email |
      | location      |
    And I follow "Manage my groups"
    When I follow <creation_button>
    Then I should not see "Display name"
    Then I should not see "Contact email"
    Then I should not see "City"
  Examples:
    | organization  | creation_button             |
    | community     | "Create a new community"    |
    | enterprise    | "Register a new enterprise" |

  Scenario Outline: organization active fields are displayed on edition
    Given the following <organization> fields are active fields
      | display_name  |
      | contact_email |
    And the following <organization>
      | name          | identifier    |
      | Organization  | organization  |
    And "Joao Silva" is admin of "Organization"
    And I am on organization's control panel
    And I follow <information>
    Then I should see "Display name"
    Then I should see "Contact email"
  Examples:
    | organization  | information                     |
    | community     | "Community Info and settings"   |
    | enterprise    | "Enterprise Info and settings"  |

  Scenario Outline: organization required fields are displayed on creation
    Given the following <organization> fields are required fields
      | display_name  |
      | contact_email |
    And I follow "Manage my groups"
    And I follow <creation_button>
    When I press <confirmation_button>
    Then I should see "Display name can't be blank"
    Then I should see "Contact email can't be blank"
  Examples:
    | organization  | creation_button             | confirmation_button |
    | community     | "Create a new community"    | "Create"            |
    | enterprise    | "Register a new enterprise" |  "Next"             |

  Scenario Outline: organization required fields are displayed on edition
    Given the following <organization> fields are required fields
      | display_name  |
      | contact_email |
    And the following <organization>
      | name          | identifier    | display_name | contact_email | city |
      | Organization  |  organization | organization | bla@bleee.com | city |
    And "Joao Silva" is admin of "Organization"
    And I am on organization's control panel
    And I follow <information>
    And I fill in the following:
      | Display name  | |
      | Contact email | |
    When I press "Save"
    Then I should see "Display name can't be blank"
    Then I should see "Contact email can't be blank"
  Examples:
    | organization  | information                     |
    | community     | "Community Info and settings"   |
    | enterprise    | "Enterprise Info and settings"  |

  Scenario Outline: organization signup fields are displayed on creation
    Given the following <organization> fields are signup fields
      | display_name  |
      | contact_email |
      | location      |
    And I follow "Manage my groups"
    When I follow <creation_button>
    Then I should see "Display name"
    Then I should see "Contact email"
    Then I should see "City"
  Examples:
    | organization  | creation_button             |
    | community     | "Create a new community"    |
    | enterprise    | "Register a new enterprise" |