Commit f698392e565f0fe48847c1ed01b8aeb13a00b4b3
Committed by
Luciano Prestes
1 parent
25c5f7ea
Exists in
spb_to_rails4
Fixes Gov User selenium tests
Signed-off-by: Gabriel Silva <gabriel93.silva@gmail.com> Signed-off-by: Luciano Prestes <lucianopcbr@gmail.com>
Showing
4 changed files
with
9 additions
and
24 deletions
Show diff stats
src/noosfero-spb/gov_user/controllers/gov_user_plugin_controller.rb
@@ -5,7 +5,7 @@ class GovUserPluginController < ApplicationController | @@ -5,7 +5,7 @@ class GovUserPluginController < ApplicationController | ||
5 | :governmental_sphere, :governmental_power, :juridical_nature, :sisp | 5 | :governmental_sphere, :governmental_power, :juridical_nature, :sisp |
6 | ] | 6 | ] |
7 | 7 | ||
8 | - protect "create_institution_admin", :environment | 8 | + protect 'create_institution_admin', :environment, :only => [:create_institution_admin] |
9 | 9 | ||
10 | def hide_registration_incomplete_percentage | 10 | def hide_registration_incomplete_percentage |
11 | response = false | 11 | response = false |
src/noosfero-spb/gov_user/features/institution_registration.feature
@@ -16,7 +16,8 @@ Feature: Institution Field | @@ -16,7 +16,8 @@ Feature: Institution Field | ||
16 | 16 | ||
17 | @selenium | 17 | @selenium |
18 | Scenario: Show new institution fields when clicked in create new institution | 18 | Scenario: Show new institution fields when clicked in create new institution |
19 | - Given I follow "Edit Profile" | 19 | + Given I follow "Control panel" |
20 | + And I follow "Edit Profile" | ||
20 | When I follow "Create new institution" | 21 | When I follow "Create new institution" |
21 | And I should see "New Institution" | 22 | And I should see "New Institution" |
22 | And I should see "Public Institution" | 23 | And I should see "Public Institution" |
@@ -35,7 +36,8 @@ Feature: Institution Field | @@ -35,7 +36,8 @@ Feature: Institution Field | ||
35 | 36 | ||
36 | @selenium | 37 | @selenium |
37 | Scenario: Clean state and city values when country is diferent of Brazil | 38 | Scenario: Clean state and city values when country is diferent of Brazil |
38 | - Given I follow "Edit Profile" | 39 | + Given I follow "Control panel" |
40 | + And I follow "Edit Profile" | ||
39 | When I follow "Create new institution" | 41 | When I follow "Create new institution" |
40 | And I select "Brazil" from "community_country" | 42 | And I select "Brazil" from "community_country" |
41 | And I select "Distrito Federal" from "community_state" | 43 | And I select "Distrito Federal" from "community_state" |
src/noosfero-spb/gov_user/features/rating_institution_registration.feature
@@ -25,9 +25,9 @@ Feature: Create institution on user report | @@ -25,9 +25,9 @@ Feature: Create institution on user report | ||
25 | And I should not see "Saved resources" | 25 | And I should not see "Saved resources" |
26 | And I should not see "Organization name or Enterprise name" | 26 | And I should not see "Organization name or Enterprise name" |
27 | When I click on anything with selector "comments-additional-information" | 27 | When I click on anything with selector "comments-additional-information" |
28 | - Then I should see "Número de beneficiados" | ||
29 | - And I should see "Nome do órgão ou empresa" | ||
30 | - And I should see "Recursos economizados" | 28 | + Then I should see "Number of Beneficiaries" |
29 | + And I should see "Organization Name or Enterprise Name" | ||
30 | + And I should see "Saved Resources" | ||
31 | 31 | ||
32 | @selenium | 32 | @selenium |
33 | Scenario: Show new institution fields when clicked in add new institution | 33 | Scenario: Show new institution fields when clicked in add new institution |
@@ -61,7 +61,7 @@ Feature: Create institution on user report | @@ -61,7 +61,7 @@ Feature: Create institution on user report | ||
61 | When I click on anything with selector "create_institution_link" | 61 | When I click on anything with selector "create_institution_link" |
62 | And I fill in "community_name" with "Noosfero Institution" | 62 | And I fill in "community_name" with "Noosfero Institution" |
63 | And I select "United States" from "Country" | 63 | And I select "United States" from "Country" |
64 | - And I sleep for 1 seconds | 64 | + And I sleep for 2 seconds |
65 | And I follow "Save" | 65 | And I follow "Save" |
66 | Then I should see "Noosfero Institution" | 66 | Then I should see "Noosfero Institution" |
67 | 67 |
src/noosfero-spb/noosfero-spb-theme/theme.js
@@ -224,22 +224,6 @@ $('#link-buscar').click(function(e) { | @@ -224,22 +224,6 @@ $('#link-buscar').click(function(e) { | ||
224 | $("#institution_modal").css({'display':'none'}); | 224 | $("#institution_modal").css({'display':'none'}); |
225 | } | 225 | } |
226 | 226 | ||
227 | - | ||
228 | - function set_use_report_content() { | ||
229 | - $('.profile-homepage .organization-average-rating-container .rate-this-organization a').html('Avalie este software'); | ||
230 | - $('.make-report-block .make-report-container .button-bar a span').html('Avalie este software'); | ||
231 | - $('.star-rate-data .star-rate-form.rating-cooldown .button-bar a span').html('Avalie este software'); | ||
232 | - $('.make-report-block .make-report-container .make-report-message').html('Relate sua experiência ou do órgão/empresa com relação ao software.'); | ||
233 | - $('.ratings-list .see-more a.icon-arrow-right-p').html('veja todos os relatos'); | ||
234 | - $('.main-content .star-rate-data .star-rate-form .star-comment-container .button-bar input').attr('value', 'Enviar'); | ||
235 | - $('.main-content .star-rate-data .star-rate-form .star-rate-text').html('Avalie este software'); | ||
236 | - $('.main-content .star-rate-data .star-rate-form .star-comment-container .formlabel').html('Depoimento sobre o software'); | ||
237 | - $('.star-rate-form .star-comment-container .comments-display-fields span#comments-additional-information').html('Dados adicionais (órgãos e empresas)'); | ||
238 | - $('.star-rate-form .star-comment-container .comments-software-extra-fields #input_institution_comments label').html('Nome do órgão ou empresa'); | ||
239 | - $('.star-rate-form .star-comment-container .comments-software-extra-fields .comments-software-people-benefited label').html('Número de beneficiados'); | ||
240 | - $('.star-rate-form .star-comment-container .comments-software-extra-fields .comments-software-saved-values label').html('Recursos economizados'); | ||
241 | - } | ||
242 | - | ||
243 | function add_tooltips(){ | 227 | function add_tooltips(){ |
244 | $('#content span[title]').attr("data-toggle","tooltip"); | 228 | $('#content span[title]').attr("data-toggle","tooltip"); |
245 | 229 | ||
@@ -295,7 +279,6 @@ $('#link-buscar').click(function(e) { | @@ -295,7 +279,6 @@ $('#link-buscar').click(function(e) { | ||
295 | set_uploaded_files_names(); | 279 | set_uploaded_files_names(); |
296 | set_tooltip_content(); | 280 | set_tooltip_content(); |
297 | set_arrow_direction(); | 281 | set_arrow_direction(); |
298 | - set_use_report_content(); | ||
299 | setEvents(); | 282 | setEvents(); |
300 | remove_suspension_points_in_buttons(); | 283 | remove_suspension_points_in_buttons(); |
301 | replace_send_email_button_text(); | 284 | replace_send_email_button_text(); |