Commit cd79e9fb6646303fcbc18cf21b332a04342b84e0
1 parent
da3f1073
Exists in
master
and in
23 other branches
Tabs to display fields for each kind of profile
Also fixed tests (ActionItem2962)
Showing
5 changed files
with
24 additions
and
18 deletions
Show diff stats
app/views/features/_manage_community_fields.rhtml
app/views/features/_manage_enterprise_fields.rhtml
app/views/features/_manage_person_fields.rhtml
app/views/features/manage_fields.rhtml
| 1 | -<%= javascript_include_tag "manage-fields.js" %> | |
| 2 | - | |
| 3 | -<%= render :partial => 'manage_person_fields' %> | |
| 1 | +<h1><%= _('Manage fields displayed for profiles') %></h1> | |
| 4 | 2 | |
| 5 | -<% if !environment.enabled?('disable_asset_enterprises') %> | |
| 6 | - <%= render :partial => 'manage_enterprise_fields' %> | |
| 3 | +<% tabs = [] %> | |
| 4 | +<% tabs << {:title => _("Person's fields"), :id => 'person-fields', | |
| 5 | + :content => (render :partial => 'manage_person_fields')} %> | |
| 6 | +<% tabs << {:title => _("Community's fields"), :id => 'community-fields', | |
| 7 | + :content => (render :partial => 'manage_community_fields')} %> | |
| 8 | +<% unless environment.enabled?('disable_asset_enterprises') %> | |
| 9 | + <% tabs << {:title => _("Enterprise's fields"), :id => 'enterprise-fields', | |
| 10 | + :content => (render :partial => 'manage_enterprise_fields')} %> | |
| 7 | 11 | <% end %> |
| 8 | 12 | |
| 9 | -<%= render :partial => 'manage_community_fields' %> | |
| 13 | +<%= render_tabs(tabs) %> | |
| 14 | + | |
| 15 | +<%= javascript_include_tag "manage-fields.js" %> | ... | ... |
features/manage_fields.feature
| ... | ... | @@ -17,7 +17,8 @@ Feature: check all manage fields |
| 17 | 17 | |
| 18 | 18 | @selenium |
| 19 | 19 | Scenario: check all active person fields |
| 20 | - Given I check "person_active" | |
| 20 | + Given I follow "Person's fields" | |
| 21 | + And I check "person_active" | |
| 21 | 22 | And I press "save_person_fields" |
| 22 | 23 | When I go to admin_user's control panel |
| 23 | 24 | And I follow "Edit Profile" |
| ... | ... | @@ -25,7 +26,8 @@ Feature: check all manage fields |
| 25 | 26 | |
| 26 | 27 | @selenium |
| 27 | 28 | Scenario: check all active enterprise fields |
| 28 | - Given I check "enterprise_active" | |
| 29 | + Given I follow "Enterprise's fields" | |
| 30 | + And I check "enterprise_active" | |
| 29 | 31 | And I press "save_enterprise_fields" |
| 30 | 32 | When I go to paper-street's control panel |
| 31 | 33 | And I follow "Enterprise Info and settings" |
| ... | ... | @@ -33,7 +35,8 @@ Feature: check all manage fields |
| 33 | 35 | |
| 34 | 36 | @selenium |
| 35 | 37 | Scenario: check all active community fields |
| 36 | - Given I check "community_active" | |
| 38 | + Given I follow "Community's fields" | |
| 39 | + And I check "community_active" | |
| 37 | 40 | And I press "save_community_fields" |
| 38 | 41 | When I go to mycommunity's control panel |
| 39 | 42 | And I follow "Community Info and settings" |
| ... | ... | @@ -41,7 +44,8 @@ Feature: check all manage fields |
| 41 | 44 | |
| 42 | 45 | @selenium |
| 43 | 46 | Scenario: uncheck Check/Uncheck All active person field |
| 44 | - Given I check "person_active" | |
| 47 | + Given I follow "Person's fields" | |
| 48 | + And I check "person_active" | |
| 45 | 49 | And I press "save_person_fields" |
| 46 | 50 | And I uncheck "person_active" |
| 47 | 51 | And I press "save_person_fields" |
| ... | ... | @@ -51,7 +55,8 @@ Feature: check all manage fields |
| 51 | 55 | |
| 52 | 56 | @selenium |
| 53 | 57 | Scenario: uncheck Check/Uncheck All active community field |
| 54 | - Given I check "community_active" | |
| 58 | + Given I follow "Community's fields" | |
| 59 | + And I check "community_active" | |
| 55 | 60 | And I press "save_community_fields" |
| 56 | 61 | And I uncheck "community_active" |
| 57 | 62 | And I press "save_community_fields" |
| ... | ... | @@ -61,7 +66,8 @@ Feature: check all manage fields |
| 61 | 66 | |
| 62 | 67 | @selenium |
| 63 | 68 | Scenario: uncheck Check/Uncheck All active enterprise field |
| 64 | - Given I check "enterprise_active" | |
| 69 | + Given I follow "Enterprise's fields" | |
| 70 | + And I check "enterprise_active" | |
| 65 | 71 | And I press "save_enterprise_fields" |
| 66 | 72 | And I uncheck "enterprise_active" |
| 67 | 73 | And I press "save_enterprise_fields" | ... | ... |