Commit dcc51f8b663f54b9e2298b2570631289b1d3fe66

Authored by Victor Costa
2 parents a1b696f2 55f43549

Merge branch 'master' into staging

@@ -11,6 +11,7 @@ Developers @@ -11,6 +11,7 @@ Developers
11 Ábner Silva de Oliveira <abner.oliveira@serpro.gov.br> 11 Ábner Silva de Oliveira <abner.oliveira@serpro.gov.br>
12 Alan Freihof Tygel <alantygel@gmail.com> 12 Alan Freihof Tygel <alantygel@gmail.com>
13 Alessandro Palmeira <alessandro.palmeira@gmail.com> 13 Alessandro Palmeira <alessandro.palmeira@gmail.com>
  14 +Alexandre Barbosa <alexandreab@live.com>
14 Alexandre Torres <alexandrekry@gmail.com> 15 Alexandre Torres <alexandrekry@gmail.com>
15 Alex Campelo <campelo.al1@gmail.com> 16 Alex Campelo <campelo.al1@gmail.com>
16 Álvaro Fernando <alvarofernandoms@gmail.com> 17 Álvaro Fernando <alvarofernandoms@gmail.com>
@@ -120,6 +121,7 @@ Raquel &lt;rcordioli@gmail.com&gt; @@ -120,6 +121,7 @@ Raquel &lt;rcordioli@gmail.com&gt;
120 Renan Costa <renan2727@hotmail.com> 121 Renan Costa <renan2727@hotmail.com>
121 Renan Teruo <renanteruoc@gmail.com> 122 Renan Teruo <renanteruoc@gmail.com>
122 Rodrigo Medeiros <rodrigo.mss01@gmail.com> 123 Rodrigo Medeiros <rodrigo.mss01@gmail.com>
  124 +Rodrigo Siqueira <siqueira@kuniri.org>
123 Rodrigo Souto <rodrigo@colivre.coop.br> 125 Rodrigo Souto <rodrigo@colivre.coop.br>
124 Ronnie Simon <ronniesimonf@gmail.com> 126 Ronnie Simon <ronniesimonf@gmail.com>
125 Ronny Kursawe <kursawe.ronny@googlemail.com> 127 Ronny Kursawe <kursawe.ronny@googlemail.com>
debian/changelog
  1 +noosfero (1.4~rc2) jessie-test; urgency=medium
  2 +
  3 + * Noosfero 1.4 RC2
  4 +
  5 + -- Antonio Terceiro <terceiro@colivre.coop.br> Tue, 26 Jan 2016 17:03:34 -0200
  6 +
1 noosfero (1.4~rc1) jessie-test; urgency=low 7 noosfero (1.4~rc1) jessie-test; urgency=low
2 8
3 * Noosfero 1.4 RC 0 9 * Noosfero 1.4 RC 0
features/manage_users.feature
@@ -8,40 +8,40 @@ Background: @@ -8,40 +8,40 @@ Background:
8 | login | name | 8 | login | name |
9 | joaosilva | Joao Silva | 9 | joaosilva | Joao Silva |
10 | paulosantos | Paulo Santos | 10 | paulosantos | Paulo Santos |
11 - Given I am logged in as admin  
12 - Given I go to /admin/users 11 + And I am logged in as admin
  12 + And I go to /admin/users
13 13
14 @selenium 14 @selenium
15 Scenario: deactive user 15 Scenario: deactive user
16 - When I follow "Deactivate user" within "tr[title='Joao Silva']"  
17 - And I confirm the "Do you want to deactivate this user?" dialog 16 + Given I follow "Deactivate user" within "tr[title='Joao Silva']"
  17 + When I confirm the browser dialog
18 Then the "tr[title='Joao Silva'] td.actions a.icon-activate-user" button should be enabled 18 Then the "tr[title='Joao Silva'] td.actions a.icon-activate-user" button should be enabled
19 19
20 @selenium 20 @selenium
21 Scenario: activate user 21 Scenario: activate user
22 Given I follow "Deactivate user" within "tr[title='Paulo Santos']" 22 Given I follow "Deactivate user" within "tr[title='Paulo Santos']"
23 - Given I confirm the "Do you want to deactivate this user?" dialog  
24 - When I follow "Activate user" within "tr[title='Paulo Santos']"  
25 - And I confirm the "Do you want to activate this user?" dialog 23 + And I confirm the browser dialog
  24 + And I follow "Activate user" within "tr[title='Paulo Santos']"
  25 + When I confirm the browser dialog
26 Then the "tr[title='Paulo Santos'] td.actions a.icon-deactivate-user" button should be enabled 26 Then the "tr[title='Paulo Santos'] td.actions a.icon-deactivate-user" button should be enabled
27 27
28 @selenium 28 @selenium
29 Scenario: remove user 29 Scenario: remove user
30 - When I follow "Remove" within "tr[title='Joao Silva']"  
31 - And I confirm the "Do you want to remove this user?" dialog 30 + Given I follow "Remove" within "tr[title='Joao Silva']"
  31 + And I confirm the browser dialog
32 And I go to /admin/users 32 And I go to /admin/users
33 Then I should not see "Joao Silva" 33 Then I should not see "Joao Silva"
34 34
35 @selenium 35 @selenium
36 Scenario: admin user 36 Scenario: admin user
37 - When I follow "Set admin role" within "tr[title='Joao Silva']"  
38 - And I confirm the "Do you want to set this user as administrator?" dialog 37 + Given I follow "Set admin role" within "tr[title='Joao Silva']"
  38 + When I confirm the browser dialog
39 Then the "tr[title='Joao Silva'] td.actions a.icon-reset-admin-role" button should be enabled 39 Then the "tr[title='Joao Silva'] td.actions a.icon-reset-admin-role" button should be enabled
40 40
41 @selenium 41 @selenium
42 Scenario: unadmin user 42 Scenario: unadmin user
43 Given I follow "Set admin role" within "tr[title='Paulo Santos']" 43 Given I follow "Set admin role" within "tr[title='Paulo Santos']"
44 - And I confirm the "Do you want to set this user as administrator?" dialog  
45 - When I follow "Reset admin role" within "tr[title='Paulo Santos']"  
46 - And I confirm the "Do you want to reset this user as administrator?" dialog 44 + And I confirm the browser dialog
  45 + And I follow "Reset admin role" within "tr[title='Paulo Santos']"
  46 + When I confirm the browser dialog
47 Then the "tr[title='Paulo Santos'] td.actions a.icon-set-admin-role" button should be enabled 47 Then the "tr[title='Paulo Santos'] td.actions a.icon-set-admin-role" button should be enabled
features/step_definitions/custom_web_steps.rb
@@ -43,6 +43,7 @@ end @@ -43,6 +43,7 @@ end
43 43
44 When /^I confirm the browser dialog$/ do 44 When /^I confirm the browser dialog$/ do
45 page.driver.browser.switch_to.alert.accept 45 page.driver.browser.switch_to.alert.accept
  46 + sleep 1 # FIXME Don't know why, but this is necessary... :/
46 end 47 end
47 48
48 When /^I type in "([^\"]*)" into autocomplete list "([^\"]*)" and I choose "([^\"]*)"$/ do |term, input, result| 49 When /^I type in "([^\"]*)" into autocomplete list "([^\"]*)" and I choose "([^\"]*)"$/ do |term, input, result|
features/step_definitions/noosfero_steps.rb
@@ -754,13 +754,6 @@ Given /^there are no pending jobs$/ do @@ -754,13 +754,6 @@ Given /^there are no pending jobs$/ do
754 end 754 end
755 end 755 end
756 756
757 -When /^I confirm the "(.*)" dialog$/ do |confirmation|  
758 - a = page.driver.browser.switch_to.alert  
759 - a.accept  
760 - # FIXME: a.text is returning nil  
761 - #assert_equal confirmation, a.text  
762 -end  
763 -  
764 Given /^the field (.*) is public for all users$/ do |field| 757 Given /^the field (.*) is public for all users$/ do |field|
765 Person.all.each do |person| 758 Person.all.each do |person|
766 person.fields_privacy = Hash.new if person.fields_privacy.nil? 759 person.fields_privacy = Hash.new if person.fields_privacy.nil?
lib/noosfero/version.rb
1 module Noosfero 1 module Noosfero
2 PROJECT = 'noosfero' 2 PROJECT = 'noosfero'
3 - VERSION = '1.4~rc1' 3 + VERSION = '1.4~rc2'
4 end 4 end
5 5
6 root = File.expand_path(File.dirname(__FILE__) + '/../..') 6 root = File.expand_path(File.dirname(__FILE__) + '/../..')
lib/tasks/ci.rake
@@ -57,7 +57,7 @@ namespace :ci do @@ -57,7 +57,7 @@ namespace :ci do
57 57
58 sh 'ruby', '-Itest', *tests unless tests.empty? 58 sh 'ruby', '-Itest', *tests unless tests.empty?
59 sh 'cucumber', *features unless features.empty? 59 sh 'cucumber', *features unless features.empty?
60 - sh 'xvfb-run', 'cucumber', '-p', 'selenium', *features unless features.empty? 60 + sh 'xvfb-run', '-a', 'cucumber', '-p', 'selenium', *features unless features.empty?
61 61
62 changed_plugins.each do |plugin| 62 changed_plugins.each do |plugin|
63 if $broken_plugins.include?(plugin) 63 if $broken_plugins.include?(plugin)
lib/tasks/plugins_tests.rake
@@ -116,7 +116,7 @@ def run_minitest files @@ -116,7 +116,7 @@ def run_minitest files
116 end 116 end
117 117
118 def run_cucumber(profile, files) 118 def run_cucumber(profile, files)
119 - sh 'xvfb-run', 'ruby', '-S', 'cucumber', '--profile', profile.to_s, '--format', ENV['CUCUMBER_FORMAT'] || 'progress' , *files 119 + sh 'xvfb-run', '-a', 'ruby', '-S', 'cucumber', '--profile', profile.to_s, '--format', ENV['CUCUMBER_FORMAT'] || 'progress' , *files
120 end 120 end
121 121
122 def custom_run(name, files, run=:all) 122 def custom_run(name, files, run=:all)
lib/tasks/release.rake
@@ -184,6 +184,7 @@ EOF @@ -184,6 +184,7 @@ EOF
184 { 184 {
185 dput: :dput, 185 dput: :dput,
186 dch: :devscripts, 186 dch: :devscripts,
  187 + git: :git,
187 }.each do |program, package| 188 }.each do |program, package|
188 if ! system("which #{program} >/dev/null 2>&1") 189 if ! system("which #{program} >/dev/null 2>&1")
189 puts "Program #{program} missing, install the package #{package}" 190 puts "Program #{program} missing, install the package #{package}"
plugins/sub_organizations/features/sub_organizations_block.feature
@@ -20,29 +20,24 @@ Feature: related_organizations_block @@ -20,29 +20,24 @@ Feature: related_organizations_block
20 And I am logged in as "homer" 20 And I am logged in as "homer"
21 And I go to springfield's control panel 21 And I go to springfield's control panel
22 22
23 - Scenario: display sub organizations block add option  
24 - When I follow "Edit sideboxes"  
25 - And I follow "Add a block"  
26 - Then I should see "Related Organizations"  
27 -  
28 Scenario: display both sub types on block 23 Scenario: display both sub types on block
  24 + Given the following blocks
  25 + | owner | type |
  26 + | springfield | RelatedOrganizationsBlock |
29 When I follow "Edit sideboxes" 27 When I follow "Edit sideboxes"
30 - And I follow "Add a block"  
31 - And I choose "Related Organizations"  
32 - And I press "Add"  
33 - Then I should see "Moe" within ".related-organizations-block"  
34 - And I should see "Duff" within ".related-organizations-block" 28 + Then I should see "Moe" within ".block.related-organizations-block"
  29 + And I should see "Duff" within ".block.related-organizations-block"
35 30
36 Scenario: display only sub-communities 31 Scenario: display only sub-communities
37 Given the following blocks 32 Given the following blocks
38 | owner | type | 33 | owner | type |
39 | springfield | RelatedOrganizationsBlock | 34 | springfield | RelatedOrganizationsBlock |
40 When I follow "Edit sideboxes" 35 When I follow "Edit sideboxes"
41 - And I follow "Edit" within ".related-organizations-block" 36 + And I follow "Edit" within ".block.related-organizations-block"
42 And I select "Community" from "block_organization_type" 37 And I select "Community" from "block_organization_type"
43 And I press "Save" 38 And I press "Save"
44 - Then I should see "Moe" within ".related-organizations-block"  
45 - And I should not see "Duff" within ".related-organizations-block" 39 + Then I should see "Moe" within ".block.related-organizations-block"
  40 + And I should not see "Duff" within ".block.related-organizations-block"
46 41
47 Scenario: display both sub types on sub-organizations page 42 Scenario: display both sub types on sub-organizations page
48 When I go to springfield's "children" page from "SubOrganizationsPluginProfileController" of "SubOrganizations" plugin 43 When I go to springfield's "children" page from "SubOrganizationsPluginProfileController" of "SubOrganizations" plugin
@@ -54,9 +49,9 @@ Feature: related_organizations_block @@ -54,9 +49,9 @@ Feature: related_organizations_block
54 | owner | type | 49 | owner | type |
55 | springfield | RelatedOrganizationsBlock | 50 | springfield | RelatedOrganizationsBlock |
56 When I follow "Edit sideboxes" 51 When I follow "Edit sideboxes"
57 - And I follow "Edit" within ".related-organizations-block" 52 + And I follow "Edit" within ".block.related-organizations-block"
58 And I select "Community" from "block_organization_type" 53 And I select "Community" from "block_organization_type"
59 And I press "Save" 54 And I press "Save"
60 - And I follow "View all" within ".related-organizations-block" 55 + And I follow "View all" within ".block.related-organizations-block"
61 Then I should see "Moe" within ".profile-list" 56 Then I should see "Moe" within ".profile-list"
62 And I should not see "Duff" within ".profile-list" 57 And I should not see "Duff" within ".profile-list"
plugins/sub_organizations/features/sub_organizations_display.feature
@@ -16,12 +16,12 @@ Feature: sub_organizations_display @@ -16,12 +16,12 @@ Feature: sub_organizations_display
16 And the following enterprise 16 And the following enterprise
17 | identifier | name | owner | description | city | state | 17 | identifier | name | owner | description | city | state |
18 | school | School | nelson | School description | Terra do Nunca | Billy Jean | 18 | school | School | nelson | School description | Terra do Nunca | Billy Jean |
  19 + And the following blocks
  20 + | owner | type |
  21 + | springfield | RelatedOrganizationsBlock |
19 And I am logged in as "nelson" 22 And I am logged in as "nelson"
20 And I go to springfield's control panel 23 And I go to springfield's control panel
21 When I follow "Edit sideboxes" 24 When I follow "Edit sideboxes"
22 - And I follow "Add a block"  
23 - And I choose "Related Organizations"  
24 - And I press "Add"  
25 25
26 @selenium 26 @selenium
27 Scenario: Display the sub organization block when there is a sub enterprise and communitys 27 Scenario: Display the sub organization block when there is a sub enterprise and communitys
@@ -76,6 +76,6 @@ Feature: sub_organizations_display @@ -76,6 +76,6 @@ Feature: sub_organizations_display
76 And I should see "Terra do Nunca, Billy Jean" within ".related-organizations-region-name" 76 And I should see "Terra do Nunca, Billy Jean" within ".related-organizations-region-name"
77 77
78 Scenario: Display message when display full block are empty 78 Scenario: Display message when display full block are empty
79 - Given I follow "View all" within ".related-organizations-block" 79 + Given I follow "View all" within ".block.related-organizations-block"
80 Then I should see "There are no sub-communities yet." 80 Then I should see "There are no sub-communities yet."
81 And I should see "There are no sub-enterprises yet." 81 And I should see "There are no sub-enterprises yet."
public/javascripts/application.js
@@ -583,7 +583,7 @@ jQuery(function($) { @@ -583,7 +583,7 @@ jQuery(function($) {
583 $.ajaxSetup({ 583 $.ajaxSetup({
584 cache: false, 584 cache: false,
585 headers: { 585 headers: {
586 - 'X-CSRF-Token': $.cookie("_noosfero_.XSRF-TOKEN") 586 + 'X-XSRF-TOKEN': $.cookie("_noosfero_.XSRF-TOKEN")
587 } 587 }
588 }); 588 });
589 589
script/authors.sed
@@ -168,6 +168,7 @@ s/macartur.sc@gmail.com$/macartur.sc@gmail.com&gt;/ @@ -168,6 +168,7 @@ s/macartur.sc@gmail.com$/macartur.sc@gmail.com&gt;/
168 168
169 s/Marcos da Silva Ramos <ms.ramos@outlook.com>/Marcos Ramos <ms.ramos@outlook.com>/ 169 s/Marcos da Silva Ramos <ms.ramos@outlook.com>/Marcos Ramos <ms.ramos@outlook.com>/
170 s/Marcos Ramos <ms.ramos@outlook.com$/Marcos Ramos <ms.ramos@outlook.com>/ 170 s/Marcos Ramos <ms.ramos@outlook.com$/Marcos Ramos <ms.ramos@outlook.com>/
  171 +s/msramos@outlook.com/ms.ramos@outlook.com/
171 s/Marcos <marcos.rpj2@gmail.com>/Marcos Ronaldo <marcos.rpj2@gmail.com>/ 172 s/Marcos <marcos.rpj2@gmail.com>/Marcos Ronaldo <marcos.rpj2@gmail.com>/
172 173
173 s/melissa@colivre.coop.br/melissa.srw@gmail.com/ 174 s/melissa@colivre.coop.br/melissa.srw@gmail.com/
script/install-dependencies/debian-jessie.sh
@@ -61,12 +61,26 @@ else @@ -61,12 +61,26 @@ else
61 sudo rm -f /etc/apt/sources.list.d/local.list 61 sudo rm -f /etc/apt/sources.list.d/local.list
62 fi 62 fi
63 63
  64 +retry() {
  65 + local times="$1"
  66 + shift
  67 + local i=0
  68 + local rc=0
  69 + while [ $i -lt "$times" ]; do
  70 + echo '$' "$@"
  71 + "$@" && rc=0 || rc=$?
  72 + i=$(($i + 1))
  73 + if [ $rc -eq 0 ]; then return 0; fi
  74 + done
  75 + return $rc
  76 +}
  77 +
64 # update system, at most every 6h (internal between Debian mirror pushes) 78 # update system, at most every 6h (internal between Debian mirror pushes)
65 timestamp=/tmp/.noosfero.apt-get.update 79 timestamp=/tmp/.noosfero.apt-get.update
66 now=$(date +%s) 80 now=$(date +%s)
67 if [ ! -f $timestamp ] || [ $(($now - $(stat --format=%Y $timestamp))) -gt 21600 ]; then 81 if [ ! -f $timestamp ] || [ $(($now - $(stat --format=%Y $timestamp))) -gt 21600 ]; then
68 - run sudo apt-get update  
69 - run sudo apt-get -qy dist-upgrade 82 + run retry 3 sudo apt-get update
  83 + run retry 3 sudo apt-get -qy dist-upgrade
70 touch $timestamp 84 touch $timestamp
71 fi 85 fi
72 86