decidim 0.4.3 → 0.4.4

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of decidim might be problematic. Click here for more details.

Files changed (156) hide show
  1. checksums.yaml +4 -4
  2. data/.codeclimate.yml +11 -0
  3. data/CHANGELOG.md +16 -2
  4. data/Gemfile.lock +41 -42
  5. data/README.md +1 -1
  6. data/Rakefile +1 -1
  7. data/decidim-admin/app/commands/decidim/admin/publish_participatory_process.rb +1 -5
  8. data/decidim-admin/app/commands/decidim/admin/unpublish_participatory_process.rb +1 -5
  9. data/decidim-admin/app/controllers/decidim/admin/application_controller.rb +1 -1
  10. data/decidim-admin/app/controllers/decidim/admin/exports_controller.rb +2 -9
  11. data/decidim-admin/app/controllers/decidim/admin/feature_permissions_controller.rb +1 -1
  12. data/decidim-admin/app/controllers/decidim/admin/features/base_controller.rb +3 -2
  13. data/decidim-admin/app/controllers/decidim/admin/features_controller.rb +2 -2
  14. data/decidim-admin/app/controllers/decidim/admin/participatory_process_groups_controller.rb +2 -1
  15. data/decidim-admin/app/controllers/decidim/admin/participatory_processes_controller.rb +6 -2
  16. data/decidim-admin/app/forms/decidim/admin/participatory_process_copy_form.rb +1 -1
  17. data/decidim-admin/app/forms/decidim/admin/participatory_process_form.rb +1 -1
  18. data/decidim-admin/app/helpers/decidim/admin/process_groups_for_select_helper.rb +1 -1
  19. data/decidim-admin/app/helpers/decidim/admin/processes_for_select_helper.rb +1 -1
  20. data/decidim-admin/app/helpers/decidim/admin/{feature_settings_helper.rb → settings_helper.rb} +2 -2
  21. data/decidim-admin/app/models/decidim/admin/abilities/participatory_process_admin_ability.rb +2 -2
  22. data/decidim-admin/app/views/decidim/admin/attachments/index.html.erb +1 -1
  23. data/decidim-admin/app/views/decidim/admin/categories/index.html.erb +1 -1
  24. data/decidim-admin/app/views/decidim/admin/exports/_dropdown.html.erb +1 -1
  25. data/decidim-admin/app/views/decidim/admin/features/_feature.html.erb +2 -2
  26. data/decidim-admin/app/views/decidim/admin/features/edit.html.erb +1 -1
  27. data/decidim-admin/app/views/decidim/admin/features/index.html.erb +1 -1
  28. data/decidim-admin/app/views/decidim/admin/features/new.html.erb +1 -1
  29. data/decidim-admin/app/views/decidim/admin/participatory_process_groups/show.html.erb +1 -1
  30. data/decidim-admin/app/views/decidim/admin/participatory_process_steps/index.html.erb +2 -2
  31. data/decidim-admin/app/views/decidim/admin/participatory_process_steps/new.html.erb +0 -1
  32. data/decidim-admin/app/views/decidim/admin/participatory_process_user_roles/index.html.erb +1 -1
  33. data/decidim-admin/app/views/decidim/admin/participatory_process_user_roles/new.html.erb +6 -6
  34. data/decidim-admin/app/views/decidim/admin/participatory_processes/new.html.erb +0 -1
  35. data/decidim-admin/app/views/layouts/decidim/admin/participatory_process.html.erb +2 -2
  36. data/decidim-admin/config/locales/ca.yml +7 -14
  37. data/decidim-admin/config/locales/en.yml +7 -14
  38. data/decidim-admin/config/locales/es.yml +7 -14
  39. data/decidim-admin/config/locales/eu.yml +9 -15
  40. data/decidim-admin/config/locales/fi.yml +7 -12
  41. data/decidim-admin/config/locales/fr.yml +9 -15
  42. data/decidim-admin/config/locales/it.yml +9 -15
  43. data/decidim-admin/config/routes.rb +9 -7
  44. data/decidim-admin/spec/commands/copy_participatory_process_spec.rb +4 -4
  45. data/decidim-admin/spec/controllers/exports_controller_spec.rb +2 -0
  46. data/decidim-admin/spec/controllers/participatory_processes_controller_spec.rb +2 -0
  47. data/decidim-admin/spec/controllers/static_pages_controller_spec.rb +2 -0
  48. data/decidim-admin/spec/features/admin_copy_participatory_process_spec.rb +3 -2
  49. data/decidim-admin/spec/features/admin_manages_feature_permissions_spec.rb +1 -1
  50. data/decidim-admin/spec/features/admin_manages_features_spec.rb +4 -4
  51. data/decidim-admin/spec/features/admin_manages_participatory_process_admins_spec.rb +2 -1
  52. data/decidim-admin/spec/features/admin_manages_participatory_process_attachments_spec.rb +2 -1
  53. data/decidim-admin/spec/features/admin_manages_participatory_process_categories_spec.rb +1 -1
  54. data/decidim-admin/spec/features/admin_manages_participatory_process_groups_spec.rb +2 -2
  55. data/decidim-admin/spec/features/admin_manages_participatory_process_steps_spec.rb +2 -1
  56. data/decidim-admin/spec/features/admin_manages_participatory_processes_spec.rb +3 -3
  57. data/decidim-admin/spec/features/admin_manages_user_groups_spec.rb +3 -2
  58. data/decidim-admin/spec/features/participatory_process_admin_manages_participatory_process_admins_spec.rb +1 -2
  59. data/decidim-admin/spec/features/participatory_process_admin_manages_participatory_process_attachments_spec.rb +1 -3
  60. data/decidim-admin/spec/features/{process_admin_manages_participatory_process_categories_spec.rb → participatory_process_admin_manages_participatory_process_categories_spec.rb} +2 -4
  61. data/decidim-admin/spec/features/participatory_process_admin_manages_participatory_process_steps_spec.rb +1 -2
  62. data/decidim-admin/spec/features/participatory_process_admin_manages_participatory_processes_spec.rb +2 -2
  63. data/decidim-admin/spec/helpers/{feature_settings_helper_spec.rb → settings_helper_spec.rb} +1 -1
  64. data/decidim-admin/spec/shared/manage_process_admins_examples.rb +9 -1
  65. data/decidim-admin/spec/shared/participatory_process_administration_by_admin_shared_context.rb +9 -0
  66. data/decidim-admin/spec/shared/participatory_process_administration_by_process_admin_shared_context.rb +13 -0
  67. data/decidim-admin/spec/shared/{participatory_admin_shared_context.rb → participatory_process_administration_shared_context.rb} +2 -4
  68. data/decidim-api/decidim-api.gemspec +2 -0
  69. data/decidim-api/lib/decidim/api/schema.rb +1 -1
  70. data/decidim-api/lib/decidim/api/test/type_context.rb +1 -1
  71. data/decidim-api/spec/controllers/queries_controller_spec.rb +2 -0
  72. data/decidim-budgets/app/forms/decidim/budgets/admin/project_form.rb +4 -0
  73. data/decidim-budgets/app/views/decidim/budgets/admin/projects/index.html.erb +1 -1
  74. data/decidim-budgets/app/views/decidim/budgets/projects/_tags.html.erb +2 -2
  75. data/decidim-budgets/decidim-budgets.gemspec +1 -1
  76. data/decidim-budgets/lib/decidim/budgets/feature.rb +30 -34
  77. data/decidim-budgets/spec/commands/remove_line_item_spec.rb +2 -0
  78. data/decidim-budgets/spec/features/comments_spec.rb +1 -1
  79. data/decidim-budgets/spec/features/orders_spec.rb +1 -5
  80. data/decidim-budgets/spec/forms/project_form_spec.rb +6 -0
  81. data/decidim-budgets/spec/shared/manage_projects_examples.rb +1 -1
  82. data/decidim-comments/app/assets/javascripts/decidim/comments/bundle.js +0 -0
  83. data/decidim-comments/app/frontend/comments/add_comment_form.component.tsx +3 -3
  84. data/decidim-comments/app/frontend/support/schema.ts +1379 -94
  85. data/decidim-comments/app/types/decidim/comments/commentable_interface.rb +1 -1
  86. data/decidim-comments/decidim-comments.gemspec +1 -0
  87. data/decidim-comments/lib/decidim/comments/api/comment_mutation_type.rb +2 -2
  88. data/decidim-comments/spec/features/comments_spec.rb +1 -1
  89. data/decidim-comments/spec/features/notifications_spec.rb +1 -1
  90. data/decidim-comments/spec/features/report_comment_spec.rb +1 -1
  91. data/decidim-comments/spec/models/comment_spec.rb +1 -1
  92. data/decidim-dev/lib/decidim/dev/test/base_spec_helper.rb +2 -1
  93. data/decidim-dev/lib/decidim/dev/test/rspec_support/feature_context.rb +1 -3
  94. data/decidim-dev/lib/decidim/dev/test/rspec_support/i18n.rb +0 -7
  95. data/decidim-dev/lib/decidim/dev/test/rspec_support/phantomjs_polyfills/promise.js +2 -2
  96. data/decidim-dev/lib/decidim/dev/test/rspec_support/route_helpers.rb +6 -0
  97. data/decidim-dev/lib/generators/decidim/dummy_generator.rb +0 -2
  98. data/decidim-meetings/app/forms/decidim/meetings/admin/meeting_form.rb +6 -0
  99. data/decidim-meetings/app/helpers/decidim/meetings/meetings_helper.rb +2 -1
  100. data/decidim-meetings/app/services/decidim/meetings/meeting_search.rb +2 -2
  101. data/decidim-meetings/app/views/decidim/meetings/admin/meeting_closes/_form.html.erb +2 -2
  102. data/decidim-meetings/app/views/decidim/meetings/admin/meetings/index.html.erb +1 -1
  103. data/decidim-meetings/app/views/decidim/meetings/meetings/_tags.html.erb +2 -2
  104. data/decidim-meetings/decidim-meetings.gemspec +1 -1
  105. data/decidim-meetings/lib/decidim/meetings/feature.rb +35 -39
  106. data/decidim-meetings/spec/features/explore_meetings_spec.rb +1 -1
  107. data/decidim-meetings/spec/forms/meeting_form_spec.rb +6 -0
  108. data/decidim-meetings/spec/shared/manage_meetings_examples.rb +1 -1
  109. data/decidim-pages/lib/decidim/pages/feature.rb +14 -18
  110. data/decidim-pages/spec/features/comments_spec.rb +1 -1
  111. data/decidim-proposals/app/forms/decidim/proposals/admin/proposal_form.rb +6 -0
  112. data/decidim-proposals/app/forms/decidim/proposals/proposal_form.rb +6 -0
  113. data/decidim-proposals/app/models/decidim/proposals/proposal.rb +9 -1
  114. data/decidim-proposals/app/views/decidim/proposals/admin/proposals/index.html.erb +1 -1
  115. data/decidim-proposals/app/views/decidim/proposals/proposals/_tags.html.erb +2 -2
  116. data/decidim-proposals/decidim-proposals.gemspec +1 -0
  117. data/decidim-proposals/lib/decidim/proposals/feature.rb +59 -65
  118. data/decidim-proposals/lib/decidim/proposals/proposal_serializer.rb +1 -15
  119. data/decidim-proposals/spec/controllers/decidim/admin/proposal_answers_controller_spec.rb +2 -4
  120. data/decidim-proposals/spec/controllers/decidim/proposal_votes_controller_spec.rb +2 -4
  121. data/decidim-proposals/spec/controllers/decidim/proposals_controller_spec.rb +2 -4
  122. data/decidim-proposals/spec/features/comments_spec.rb +1 -1
  123. data/decidim-proposals/spec/features/report_proposal_spec.rb +1 -1
  124. data/decidim-proposals/spec/models/decidim/proposals/proposal_spec.rb +18 -0
  125. data/decidim-proposals/spec/shared/manage_proposals_examples.rb +1 -1
  126. data/decidim-proposals/spec/shared/proposal_form_examples.rb +6 -0
  127. data/decidim-results/app/controllers/decidim/results/result_widgets_controller.rb +0 -2
  128. data/decidim-results/app/forms/decidim/results/admin/result_form.rb +4 -0
  129. data/decidim-results/app/views/decidim/results/admin/results/index.html.erb +1 -1
  130. data/decidim-results/app/views/decidim/results/results/_tags.html.erb +2 -2
  131. data/decidim-results/decidim-results.gemspec +2 -1
  132. data/decidim-results/lib/decidim/results/feature.rb +18 -22
  133. data/decidim-results/spec/controllers/results_controller_spec.rb +2 -0
  134. data/decidim-results/spec/features/comments_spec.rb +1 -1
  135. data/decidim-results/spec/features/explore_results_spec.rb +1 -1
  136. data/decidim-results/spec/forms/result_form_spec.rb +6 -0
  137. data/decidim-results/spec/shared/manage_results_examples.rb +1 -1
  138. data/decidim-surveys/decidim-surveys.gemspec +1 -0
  139. data/decidim-surveys/lib/decidim/surveys/feature.rb +23 -27
  140. data/decidim-system/db/seeds.rb +1 -2
  141. data/decidim-system/spec/commands/decidim/system/create_default_pages_spec.rb +1 -1
  142. data/docs/features_and_components.md +6 -6
  143. data/docs/getting_started.md +1 -1
  144. data/docs/how_to_create_a_plugin.md +2 -2
  145. data/docs/social_providers.md +2 -2
  146. data/lib/generators/decidim/app_generator.rb +0 -6
  147. data/lib/generators/decidim/docker_generator.rb +1 -1
  148. data/lib/generators/decidim/install_generator.rb +5 -5
  149. data/lib/generators/decidim/templates/README.md.erb +1 -1
  150. data/lib/generators/decidim/templates/database.yml.erb +1 -1
  151. data/lib/generators/decidim/templates/initializer.rb +4 -1
  152. data/package-lock.json +46 -134
  153. data/package.json +9 -9
  154. metadata +31 -30
  155. data/decidim-dev/lib/decidim/dev/test/rspec_support/engine_routes.rb +0 -35
  156. data/decidim-dev/lib/generators/decidim/templates/decidim_dev.rb +0 -3
@@ -133,6 +133,8 @@ fr:
133
133
  edit:
134
134
  title: Modifier le document lié
135
135
  update: Mettre à jour
136
+ index:
137
+ attachments_title: Pièces jointes
136
138
  new:
137
139
  create: Lier un document
138
140
  title: Nouveau document lié
@@ -149,6 +151,8 @@ fr:
149
151
  edit:
150
152
  title: Modifier la catégorie
151
153
  update: Mettre à jour
154
+ index:
155
+ categories_title: Catégories
152
156
  new:
153
157
  create: Créer une catégorie
154
158
  title: Nouvelle catégorie
@@ -158,20 +162,6 @@ fr:
158
162
  dashboard:
159
163
  show:
160
164
  welcome: Bienvenue dans le nouveau panneau d’administration Decidim.
161
- decidim:
162
- admin:
163
- attachments:
164
- index:
165
- attachments_title: Pièces jointes
166
- categories:
167
- index:
168
- categories_title: Catégories
169
- participatory_process_steps:
170
- index:
171
- steps_title: Etapes
172
- participatory_process_user_roles:
173
- index:
174
- process_admins_title: Administrateurs du processus participatifs
175
165
  feature_permissions:
176
166
  edit:
177
167
  everyone: Tout le monde
@@ -377,6 +367,8 @@ fr:
377
367
  edit:
378
368
  title: Modifier l'étape du processus participatif
379
369
  update: Mettre à jour
370
+ index:
371
+ steps_title: Etapes
380
372
  new:
381
373
  create: Créer
382
374
  title: Nouvelle étape du processus participatif
@@ -394,6 +386,8 @@ fr:
394
386
  edit:
395
387
  title: Mettre à jour l'utilisateur du processus participatif.
396
388
  update: Mettre à jour
389
+ index:
390
+ process_admins_title: Administrateurs du processus participatifs
397
391
  new:
398
392
  create: Créer
399
393
  title: Nouvel utilisateur de processus participatif.
@@ -516,4 +510,4 @@ fr:
516
510
  time:
517
511
  formats:
518
512
  datepicker: "%m / %j / %A"
519
- timepicker: "%d/%m/%Y %H:%M"
513
+ timepicker: "%d/%m/%Y %H:%M"
@@ -111,6 +111,8 @@ it:
111
111
  edit:
112
112
  title: Modifica allegato
113
113
  update: Aggiorna
114
+ index:
115
+ attachments_title: Allegati
114
116
  new:
115
117
  create: Crea allegato
116
118
  title: Nuovo allegato
@@ -127,6 +129,8 @@ it:
127
129
  edit:
128
130
  title: Modifica categoria
129
131
  update: Aggiorna
132
+ index:
133
+ categories_title: Categorie
130
134
  new:
131
135
  create: Crea nuova categoria
132
136
  title: Nuova categoria
@@ -136,20 +140,6 @@ it:
136
140
  dashboard:
137
141
  show:
138
142
  welcome: Benvenuto nel nuovo pannello di amministarzione.
139
- decidim:
140
- admin:
141
- attachments:
142
- index:
143
- attachments_title: Allegati
144
- categories:
145
- index:
146
- categories_title: Categorie
147
- participatory_process_steps:
148
- index:
149
- steps_title: Fasi
150
- participatory_process_user_roles:
151
- index:
152
- process_admins_title: Utenti del processo partecipativo.
153
143
  exports:
154
144
  export_as: "%{name} esporta come %{export_format}"
155
145
  notice: Export in fase di elaborazione. Riceverai un'email quando l'export sarà terminato.
@@ -347,6 +337,8 @@ it:
347
337
  edit:
348
338
  title: Modifica una fase del processo partecipativo.
349
339
  update: Aggiorna
340
+ index:
341
+ steps_title: Fasi
350
342
  new:
351
343
  create: Crea
352
344
  title: Nuova fase del processo partecipativo.
@@ -364,6 +356,8 @@ it:
364
356
  edit:
365
357
  title: Aggiornamento utente di un processo partecipativo.
366
358
  update: Aggiorna
359
+ index:
360
+ process_admins_title: Utenti del processo partecipativo.
367
361
  new:
368
362
  create: Crea
369
363
  title: Nuovo utente per un processo partecipativo.
@@ -482,4 +476,4 @@ it:
482
476
  settings:
483
477
  title: Impostazioni
484
478
  users:
485
- title: Utenti
479
+ title: Utenti
@@ -23,6 +23,15 @@ Decidim::Admin::Engine.routes.draw do
23
23
  end
24
24
  resources :attachments, controller: "participatory_process_attachments"
25
25
 
26
+ resources :moderations do
27
+ member do
28
+ put :unreport
29
+ put :hide
30
+ end
31
+ end
32
+ end
33
+
34
+ scope "/participatory_processes/:participatory_process_id" do
26
35
  resources :features do
27
36
  resource :permissions, controller: "feature_permissions"
28
37
  member do
@@ -31,13 +40,6 @@ Decidim::Admin::Engine.routes.draw do
31
40
  end
32
41
  resources :exports, only: :create
33
42
  end
34
-
35
- resources :moderations do
36
- member do
37
- put :unreport
38
- put :hide
39
- end
40
- end
41
43
  end
42
44
 
43
45
  scope "/participatory_processes/:participatory_process_id/features/:feature_id/manage" do
@@ -89,10 +89,10 @@ describe Decidim::Admin::CopyParticipatoryProcess do
89
89
  end
90
90
  end
91
91
 
92
- context "when copy_steps exists" do
92
+ context "when copy_categories exists" do
93
93
  let(:copy_categories) { true }
94
94
 
95
- it "duplicates a participatory process and the steps" do
95
+ it "duplicates a participatory process and the categories" do
96
96
  expect { subject.call }.to change { Decidim::Category.count }.by(1)
97
97
  expect(Decidim::Category.pluck(:decidim_participatory_process_id).uniq.count).to eq 2
98
98
 
@@ -105,10 +105,10 @@ describe Decidim::Admin::CopyParticipatoryProcess do
105
105
  end
106
106
  end
107
107
 
108
- context "when copy_steps exists" do
108
+ context "when copy_features exists" do
109
109
  let(:copy_features) { true }
110
110
 
111
- it "duplicates a participatory process and the steps" do
111
+ it "duplicates a participatory process and the features" do
112
112
  dummy_hook = proc {}
113
113
  feature.manifest.on :copy, &dummy_hook
114
114
  expect(dummy_hook).to receive(:call).with(new_feature: an_instance_of(Decidim::Feature), old_feature: feature)
@@ -5,6 +5,8 @@ require "spec_helper"
5
5
  module Decidim
6
6
  module Admin
7
7
  describe ExportsController, type: :controller do
8
+ routes { Decidim::Admin::Engine.routes }
9
+
8
10
  let!(:organization) { create(:organization) }
9
11
  let!(:participatory_process) { create :participatory_process, organization: organization }
10
12
  let!(:user) { create(:user, :admin, :confirmed, organization: organization) }
@@ -5,6 +5,8 @@ require "spec_helper"
5
5
  module Decidim
6
6
  module Admin
7
7
  describe ParticipatoryProcessesController, type: :controller do
8
+ routes { Decidim::Admin::Engine.routes }
9
+
8
10
  let(:organization) { create(:organization) }
9
11
  let(:user) { create(:user, :admin, :confirmed, organization: organization) }
10
12
 
@@ -5,6 +5,8 @@ require "spec_helper"
5
5
  module Decidim
6
6
  module Admin
7
7
  describe StaticPagesController, type: :controller do
8
+ routes { Decidim::Admin::Engine.routes }
9
+
8
10
  let(:organization) { create :organization }
9
11
  let(:user) { create(:user, :admin, :confirmed, organization: organization) }
10
12
 
@@ -2,8 +2,9 @@
2
2
 
3
3
  require "spec_helper"
4
4
 
5
- describe "Admin copy participatory process", type: :feature do
6
- include_context "participatory process admin"
5
+ describe "Admin copies participatory process", type: :feature do
6
+ include_context "participatory process administration by admin"
7
+
7
8
  let!(:participatory_process) { create(:participatory_process, :with_steps, organization: organization) }
8
9
  let!(:feature) { create :feature, manifest_name: :dummy, participatory_process: participatory_process }
9
10
  let!(:category) do
@@ -17,7 +17,7 @@ describe "manage a feature's permissions", type: :feature do
17
17
  before do
18
18
  switch_to_host(organization.host)
19
19
  login_as user, scope: :user
20
- visit decidim_admin.participatory_process_features_path(participatory_process)
20
+ visit decidim_admin.features_path(participatory_process)
21
21
 
22
22
  within ".feature-#{feature.id}" do
23
23
  page.find(".action-icon--permissions").click
@@ -17,7 +17,7 @@ describe "Admin manages features", type: :feature do
17
17
 
18
18
  describe "add a feature" do
19
19
  before do
20
- visit decidim_admin.participatory_process_features_path(participatory_process)
20
+ visit decidim_admin.features_path(participatory_process)
21
21
  end
22
22
 
23
23
  it "adds a feature" do
@@ -81,7 +81,7 @@ describe "Admin manages features", type: :feature do
81
81
  end
82
82
 
83
83
  before do
84
- visit decidim_admin.participatory_process_features_path(participatory_process)
84
+ visit decidim_admin.features_path(participatory_process)
85
85
  end
86
86
 
87
87
  it "updates the feature" do
@@ -175,7 +175,7 @@ describe "Admin manages features", type: :feature do
175
175
  end
176
176
 
177
177
  before do
178
- visit decidim_admin.participatory_process_features_path(participatory_process)
178
+ visit decidim_admin.features_path(participatory_process)
179
179
  end
180
180
 
181
181
  it "removes the feature" do
@@ -195,7 +195,7 @@ describe "Admin manages features", type: :feature do
195
195
  let(:published_at) { nil }
196
196
 
197
197
  before do
198
- visit decidim_admin.participatory_process_features_path(participatory_process)
198
+ visit decidim_admin.features_path(participatory_process)
199
199
  end
200
200
 
201
201
  context "when the feature is unpublished" do
@@ -3,6 +3,7 @@
3
3
  require "spec_helper"
4
4
 
5
5
  describe "Admin manages participatory process admins", type: :feature do
6
- include_context "participatory process admin"
6
+ include_context "participatory process administration by admin"
7
+
7
8
  it_behaves_like "manage process admins examples"
8
9
  end
@@ -3,6 +3,7 @@
3
3
  require "spec_helper"
4
4
 
5
5
  describe "Admin manages participatory process attachments", type: :feature do
6
- include_context "participatory process admin"
6
+ include_context "participatory process administration by admin"
7
+
7
8
  it_behaves_like "manage process attachments examples"
8
9
  end
@@ -3,7 +3,7 @@
3
3
  require "spec_helper"
4
4
 
5
5
  describe "Admin manages participatory process categories", type: :feature do
6
- include_context "participatory process admin"
6
+ include_context "participatory process administration by admin"
7
7
 
8
8
  let!(:category) do
9
9
  create(
@@ -3,8 +3,8 @@
3
3
 
4
4
  require "spec_helper"
5
5
 
6
- describe "Admin manage participatory process groups", type: :feature do
7
- include_context "participatory process admin"
6
+ describe "Admin manages participatory process groups", type: :feature do
7
+ include_context "participatory process administration by admin"
8
8
 
9
9
  before do
10
10
  switch_to_host(organization.host)
@@ -3,6 +3,7 @@
3
3
  require "spec_helper"
4
4
 
5
5
  describe "Admin manages participatory process steps", type: :feature do
6
- include_context "participatory process admin"
6
+ include_context "participatory process administration by admin"
7
+
7
8
  it_behaves_like "manage process steps examples"
8
9
  end
@@ -3,8 +3,8 @@
3
3
 
4
4
  require "spec_helper"
5
5
 
6
- describe "Admin manage participatory processes", type: :feature do
7
- include_context "participatory process admin"
6
+ describe "Admin manages participatory processes", type: :feature do
7
+ include_context "participatory process administration by admin"
8
8
  it_behaves_like "manage processes examples"
9
9
 
10
10
  before do
@@ -14,7 +14,7 @@ describe "Admin manage participatory processes", type: :feature do
14
14
  visit decidim_admin.participatory_processes_path
15
15
  end
16
16
 
17
- it "creates a new participatory_process" do
17
+ it "creates a new participatory process" do
18
18
  within ".secondary-nav__actions" do
19
19
  page.find("a.button").click
20
20
  end
@@ -3,8 +3,9 @@
3
3
 
4
4
  require "spec_helper"
5
5
 
6
- describe "Admin manage user groups", type: :feature do
7
- include_context "participatory process admin"
6
+ describe "Admin manages user groups", type: :feature do
7
+ include_context "participatory process administration by admin"
8
+
8
9
  let!(:user_groups) { create_list(:user_group, 10, users: [create(:user, organization: organization)]) }
9
10
 
10
11
  before do
@@ -3,8 +3,7 @@
3
3
  require "spec_helper"
4
4
 
5
5
  describe "Participatory process admin manages participatory process admins", type: :feature do
6
- include_context "participatory process admin"
7
- let(:user) { process_admin }
6
+ include_context "participatory process administration by process admin"
8
7
 
9
8
  it_behaves_like "manage process admins examples"
10
9
 
@@ -3,9 +3,7 @@
3
3
  require "spec_helper"
4
4
 
5
5
  describe "Participatory process admin manages participatory process attachments", type: :feature do
6
- include_context "participatory process admin"
7
-
8
- let(:user) { process_admin }
6
+ include_context "participatory process administration by process admin"
9
7
 
10
8
  it_behaves_like "manage process attachments examples"
11
9
  end
@@ -2,10 +2,8 @@
2
2
 
3
3
  require "spec_helper"
4
4
 
5
- describe "Admin manages participatory process categories", type: :feature do
6
- include_context "participatory process admin"
7
-
8
- let(:user) { process_admin }
5
+ describe "Participatory process admin manages participatory process categories", type: :feature do
6
+ include_context "participatory process administration by process admin"
9
7
 
10
8
  let!(:category) do
11
9
  create(
@@ -3,8 +3,7 @@
3
3
  require "spec_helper"
4
4
 
5
5
  describe "Participatory process admin manages participatory process steps", type: :feature do
6
- include_context "participatory process admin"
6
+ include_context "participatory process administration by process admin"
7
7
 
8
- let(:user) { process_admin }
9
8
  it_behaves_like "manage process steps examples"
10
9
  end
@@ -3,8 +3,8 @@
3
3
  require "spec_helper"
4
4
 
5
5
  describe "Participatory process admin manages participatory processes", type: :feature do
6
- include_context "participatory process admin"
7
- let(:user) { process_admin }
6
+ include_context "participatory process administration by process admin"
7
+
8
8
  it_behaves_like "manage processes examples"
9
9
 
10
10
  before do
@@ -4,7 +4,7 @@ require "spec_helper"
4
4
 
5
5
  module Decidim
6
6
  module Admin
7
- describe FeatureSettingsHelper do
7
+ describe SettingsHelper do
8
8
  let(:options) { double }
9
9
  let(:attribute) { double(type: type) }
10
10
  let(:type) { :boolean }
@@ -3,6 +3,14 @@
3
3
  RSpec.shared_examples "manage process admins examples" do
4
4
  let(:other_user) { create :user, organization: organization, email: "my_email@example.org" }
5
5
 
6
+ let!(:process_admin) do
7
+ create :user,
8
+ :process_admin,
9
+ :confirmed,
10
+ organization: organization,
11
+ participatory_process: participatory_process
12
+ end
13
+
6
14
  before do
7
15
  switch_to_host(organization.host)
8
16
  login_as user, scope: :user
@@ -10,7 +18,7 @@ RSpec.shared_examples "manage process admins examples" do
10
18
  click_link "Process users"
11
19
  end
12
20
 
13
- it "process admins" do
21
+ it "shows process admin list" do
14
22
  within "#process_admins table" do
15
23
  expect(page).to have_content(process_admin.email)
16
24
  end