Commit 82c31f33ec7f2950259349f8239d3804e2712790

Authored by Victor Costa
2 parents b55ea6ae 7b118e80

Merge branch 'master' into rails3

app/controllers/my_profile/cms_controller.rb
@@ -232,7 +232,7 @@ class CmsController < MyProfileController @@ -232,7 +232,7 @@ class CmsController < MyProfileController
232 @current_category = Category.find(params[:category_id]) 232 @current_category = Category.find(params[:category_id])
233 @categories = @current_category.children 233 @categories = @current_category.children
234 end 234 end
235 - render :template => 'shared/update_categories', :locals => { :category => @current_category } 235 + render :template => 'shared/update_categories', :locals => { :category => @current_category, :object_name => 'article' }
236 end 236 end
237 237
238 def publish 238 def publish
app/controllers/my_profile/profile_editor_controller.rb
@@ -54,7 +54,7 @@ class ProfileEditorController < MyProfileController @@ -54,7 +54,7 @@ class ProfileEditorController < MyProfileController
54 @current_category = Category.find(params[:category_id]) 54 @current_category = Category.find(params[:category_id])
55 @categories = @current_category.children 55 @categories = @current_category.children
56 end 56 end
57 - render :template => 'shared/update_categories', :locals => { :category => @current_category } 57 + render :template => 'shared/update_categories', :locals => { :category => @current_category, :object_name => 'profile_data' }
58 end 58 end
59 59
60 def header_footer 60 def header_footer
app/views/shared/update_categories.js.erb
1 <% 1 <%
2 content = render :partial => 'shared/select_categories', 2 content = render :partial => 'shared/select_categories',
3 - :locals => {:object_name => 'article', :multiple => true}, :layout => false 3 + :locals => {:object_name => object_name, :multiple => true}, :layout => false
4 %> 4 %>
5 jQuery('#select-categories').html('<%= j(content) %>'); 5 jQuery('#select-categories').html('<%= j(content) %>');
features/delete_profile.feature
@@ -13,7 +13,6 @@ Feature: delete profile @@ -13,7 +13,6 @@ Feature: delete profile
13 | sample-community | Sample Community | 13 | sample-community | Sample Community |
14 And "Maria Silva" is a member of "Sample Community" 14 And "Maria Silva" is a member of "Sample Community"
15 15
16 - @selenium  
17 Scenario: deleting profile 16 Scenario: deleting profile
18 Given I am logged in as "joaosilva" 17 Given I am logged in as "joaosilva"
19 And I am on joaosilva's control panel 18 And I am on joaosilva's control panel
@@ -46,7 +45,6 @@ Feature: delete profile @@ -46,7 +45,6 @@ Feature: delete profile
46 When I follow "Community Info and settings" 45 When I follow "Community Info and settings"
47 Then I should see "Delete profile" 46 Then I should see "Delete profile"
48 47
49 - @selenium  
50 Scenario: community admin deletes the community 48 Scenario: community admin deletes the community
51 Given "Joao Silva" is admin of "Sample Community" 49 Given "Joao Silva" is admin of "Sample Community"
52 And I am logged in as "joaosilva" 50 And I am logged in as "joaosilva"
@@ -75,7 +73,6 @@ Feature: delete profile @@ -75,7 +73,6 @@ Feature: delete profile
75 When I follow "Enterprise Info and settings" 73 When I follow "Enterprise Info and settings"
76 Then I should see "Delete profile" 74 Then I should see "Delete profile"
77 75
78 - @selenium  
79 Scenario: enterprise admin deletes the enterprise 76 Scenario: enterprise admin deletes the enterprise
80 Given the following enterprise 77 Given the following enterprise
81 | identifier | name | 78 | identifier | name |
@@ -101,7 +98,6 @@ Feature: delete profile @@ -101,7 +98,6 @@ Feature: delete profile
101 And I go to /myprofile/sample-enterprise/profile_editor/destroy_profile 98 And I go to /myprofile/sample-enterprise/profile_editor/destroy_profile
102 Then I should see "Access denied" 99 Then I should see "Access denied"
103 100
104 - @selenium  
105 Scenario: environment admin deletes profile 101 Scenario: environment admin deletes profile
106 Given I am logged in as admin 102 Given I am logged in as admin
107 And I am on joaosilva's control panel 103 And I am on joaosilva's control panel
features/upload_files.feature
@@ -8,7 +8,6 @@ Feature: upload files @@ -8,7 +8,6 @@ Feature: upload files
8 | joaosilva | Joao Silva | 8 | joaosilva | Joao Silva |
9 And I am logged in as "joaosilva" 9 And I am logged in as "joaosilva"
10 10
11 - @selenium  
12 Scenario: provile links to upload files to community's gallery 11 Scenario: provile links to upload files to community's gallery
13 Given the following communities 12 Given the following communities
14 | identifier | name | owner | 13 | identifier | name | owner |
@@ -16,12 +15,9 @@ Feature: upload files @@ -16,12 +15,9 @@ Feature: upload files
16 And the following galleries 15 And the following galleries
17 | owner | name | 16 | owner | name |
18 | sample-community | Gallery test | 17 | sample-community | Gallery test |
19 - And I go to sample-community's profile  
20 - And I follow "Profile"  
21 - And I follow "0 pictures"  
22 - And I should see "Upload files" 18 + And I go to article "Gallery test"
  19 + Then I should see "Upload files"
23 20
24 - @selenium  
25 Scenario: provile links to upload files to enterprise's gallery 21 Scenario: provile links to upload files to enterprise's gallery
26 Given the following enterprises 22 Given the following enterprises
27 | identifier | name | owner | 23 | identifier | name | owner |
@@ -29,10 +25,8 @@ Feature: upload files @@ -29,10 +25,8 @@ Feature: upload files
29 And the following galleries 25 And the following galleries
30 | owner | name | 26 | owner | name |
31 | sample-enterprise | Gallery test | 27 | sample-enterprise | Gallery test |
32 - And I go to sample-enterprise's profile  
33 - And I follow "Profile"  
34 - And I follow "0 pictures"  
35 - And I should see "Upload files" 28 + And I go to article "Gallery test"
  29 + Then I should see "Upload files"
36 30
37 Scenario: not provile links to upload files on blogs 31 Scenario: not provile links to upload files on blogs
38 Given the following communities 32 Given the following communities