decidim-decidim_awesome 0.11.4 → 0.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +14 -6
  3. data/README.md +9 -25
  4. data/app/cells/decidim/decidim_awesome/voting/voting_cards_proposal/show.erb +1 -1
  5. data/app/cells/decidim/decidim_awesome/voting/voting_cards_proposal_cell.rb +3 -5
  6. data/app/commands/concerns/decidim/decidim_awesome/system/{register_organization_override.rb → create_organization_override.rb} +1 -1
  7. data/app/commands/concerns/decidim/decidim_awesome/update_account_override.rb +4 -4
  8. data/app/commands/decidim/decidim_awesome/admin/create_constraint.rb +1 -1
  9. data/app/commands/decidim/decidim_awesome/create_editor_image.rb +2 -2
  10. data/app/controllers/decidim/decidim_awesome/admin/checks_controller.rb +0 -6
  11. data/app/forms/concerns/decidim/decidim_awesome/proposals/{proposal_wizard_create_step_form_override.rb → proposal_form_customizations.rb} +1 -1
  12. data/app/forms/concerns/decidim/decidim_awesome/system/organization_form_override.rb +2 -2
  13. data/app/packs/entrypoints/decidim_admin_decidim_awesome_search_form.scss +1 -0
  14. data/app/packs/stylesheets/decidim/decidim_awesome/admin/admin_accountability.scss +67 -0
  15. data/app/permissions/decidim/decidim_awesome/permissions.rb +3 -2
  16. data/app/uploaders/decidim/decidim_awesome/image_uploader.rb +12 -0
  17. data/app/views/decidim/decidim_awesome/admin/admin_accountability/index.html.erb +1 -0
  18. data/app/views/decidim/decidim_awesome/admin/shared/_filters_with_date.html.erb +41 -32
  19. data/app/views/decidim/decidim_awesome/map_component/map/_map_template.html.erb +1 -1
  20. data/config/assets.rb +2 -1
  21. data/lib/decidim/decidim_awesome/awesome.rb +20 -20
  22. data/lib/decidim/decidim_awesome/checksums.yml +32 -2
  23. data/lib/decidim/decidim_awesome/context_analyzers/request_analyzer.rb +2 -2
  24. data/lib/decidim/decidim_awesome/engine.rb +5 -4
  25. data/lib/decidim/decidim_awesome/test/shared_examples/box_label_editor_examples.rb +14 -14
  26. data/lib/decidim/decidim_awesome/test/shared_examples/config_examples.rb +1 -1
  27. data/lib/decidim/decidim_awesome/test/shared_examples/custom_fields_examples.rb +8 -8
  28. data/lib/decidim/decidim_awesome/test/shared_examples/custom_styles_examples.rb +6 -6
  29. data/lib/decidim/decidim_awesome/test/shared_examples/editor_examples.rb +3 -3
  30. data/lib/decidim/decidim_awesome/test/shared_examples/scoped_admins_examples.rb +5 -5
  31. data/lib/decidim/decidim_awesome/test/shared_examples/summary_examples.rb +8 -8
  32. data/lib/decidim/decidim_awesome/version.rb +2 -2
  33. data/lib/decidim/decidim_awesome.rb +0 -1
  34. data/lib/tasks/decidim_awesome_upgrade_tasks.rake +0 -4
  35. data/package.json +8 -16
  36. metadata +15 -17
  37. data/app/jobs/decidim/decidim_awesome/migrate_legacy_images_job.rb +0 -107
  38. data/app/uploaders/decidim/cw/decidim_awesome/image_uploader.rb +0 -26
  39. data/lib/decidim/decidim_awesome/content_parsers/editor_images_parser.rb +0 -39
  40. data/lib/tasks/decidim_awesome_active_storage_migrations_tasks.rake +0 -35
  41. /data/{app/middleware/decidim/decidim_awesome → lib/decidim/decidim_awesome/middleware}/current_config.rb +0 -0
@@ -132,7 +132,7 @@ module Decidim
132
132
  # allows admins to created specific CSS snippets affecting only some public frontend specific parts
133
133
  # Valid values differ a little from the previous convention:
134
134
  # :disabled => false and non available, hidden from admins
135
- # Hash => hash of different css text, each key will be used for the contraints
135
+ # Hash => hash of different css text, each key will be used for the constraints
136
136
  # Admins create this hash dynamically but some pre-defined css boxes can be created here as:
137
137
  # {
138
138
  # some_identifier: ".wrapper { background: red; }"
@@ -144,7 +144,7 @@ module Decidim
144
144
  # allows admins to created specific CSS snippets affecting only some admin specific parts
145
145
  # Valid values differ a little from the previous convention:
146
146
  # :disabled => false and non available, hidden from admins
147
- # Hash => hash of different css text, each key will be used for the contraints
147
+ # Hash => hash of different css text, each key will be used for the constraints
148
148
  # Admins create this hash dynamically but some pre-defined css boxes can be created here as:
149
149
  # {
150
150
  # some_identifier: ".wrapper { background: red; }"
@@ -157,7 +157,7 @@ module Decidim
157
157
  # https://github.com/jsonform/jsonform/wiki
158
158
  # Valid values uses the same structure as :scoped_styles
159
159
  # :disabled => false and non available, hidden from admins
160
- # Hash => hash of different JSON texts, each key will be used for the contraints
160
+ # Hash => hash of different JSON texts, each key will be used for the constraints
161
161
  # Admins can create this hash dynamically but some pre-defined css boxes can be created here as:
162
162
  # {
163
163
  # some_identifier: "{ ... some definition... }"
@@ -173,14 +173,14 @@ module Decidim
173
173
 
174
174
  # whether to add a select to user's profile to allow them to select their preferred time zone
175
175
  # if set to false, the select won't be shown but it can still be configured by the admins
176
- # if set to :disabled the feature will be completly removed
176
+ # if set to :disabled the feature will be completely removed
177
177
  config_accessor :user_timezone do
178
178
  false
179
179
  end
180
180
 
181
181
  # Forces the user to authorize using some registered verification flow in order to access the platform
182
182
  # if set to an empty array, the user will be able to access the platform without any verification but admins can still enforce it
183
- # if set to :disabled the feature will be completly removed
183
+ # if set to :disabled the feature will be completely removed
184
184
  # You can initialize some default verification workflow manifests
185
185
  config_accessor :force_authorization_after_login do
186
186
  []
@@ -199,7 +199,7 @@ module Decidim
199
199
 
200
200
  # Allows admins to manually authorize users with the specified methods
201
201
  # if set to an empty array, the admins will not be able to authorize users but the system admin can still configure it
202
- # if set to :disabled the feature will be completly removed
202
+ # if set to :disabled the feature will be completely removed
203
203
  config_accessor :admins_available_authorizations do
204
204
  []
205
205
  end
@@ -221,7 +221,7 @@ module Decidim
221
221
  end
222
222
 
223
223
  # allows to keep modifications for the main menu
224
- # can return :disabled to completly remove this feature
224
+ # can return :disabled to completely remove this feature
225
225
  # otherwise it should be an array (some overrides can be specified by default):
226
226
  # [
227
227
  # {
@@ -238,16 +238,16 @@ module Decidim
238
238
  []
239
239
  end
240
240
 
241
- # Allows admins to assignate "fake" admins scoped to some admin zones using the
241
+ # Allows admins to assign "fake" admins scoped to some admin zones using the
242
242
  # same scope editor as :scoped_styles, valid values uses the same convention:
243
243
  # :disabled => false and non available, hidden from admins
244
- # Hash => hash of different admin ids, each key will be used for the contraints
244
+ # Hash => hash of different admin ids, each key will be used for the constraints
245
245
  # Admins create this hash dynamically but some pre-defined admin boxes can be created here as:
246
246
  # {
247
247
  # some_identifier: [1234, 5678, 90123]
248
248
  # }
249
249
  #
250
- # To test this feature in development, ensure that config/environmnets/development.rb is configured as:
250
+ # To test this feature in development, ensure that config/environments/development.rb is configured as:
251
251
  # config.action_dispatch.show_exceptions = true
252
252
  # config.action_dispatch.show_detailed_exceptions = false
253
253
  # config.consider_all_requests_local = false
@@ -256,13 +256,13 @@ module Decidim
256
256
  end
257
257
 
258
258
  # Allow to configure custom redirections
259
- # can return :disabled to completly remove this feature
259
+ # can return :disabled to completely remove this feature
260
260
  # You can initialize some default redirection if desired as follows:
261
261
  # {
262
262
  # "/decidim-docs" => { destination: "http://docs.decidim.org", active: true }
263
263
  # }
264
264
  #
265
- # To test this feature in development, ensure that config/environmnets/development.rb is configured as:
265
+ # To test this feature in development, ensure that config/environments/development.rb is configured as:
266
266
  # config.action_dispatch.show_exceptions = true
267
267
  # config.action_dispatch.show_detailed_exceptions = false
268
268
  # config.consider_all_requests_local = false
@@ -308,20 +308,20 @@ module Decidim
308
308
  # additional correspondences between participatory spaces manifests and routes
309
309
  # ie: /admin/assemblies and /admin/assemblies_types are both treated as a "assembly" participatory space in terms of permission scoping
310
310
  # This can be tuned in a initialized if some other hacks over routes are applied
311
- # if a registered participatory space is not listed here then the name manifest will be used as a default route /manifest_name /admin/manifes_name
311
+ # if a registered participatory space is not listed here then the name manifest will be used as a default route /manifest_name /admin/manifest_name
312
312
  config_accessor :participatory_spaces_routes_context do
313
313
  {
314
- # route in admin is diferent than in the frontend: /processes, /admin/participatory_processes
314
+ # route in admin is different than in the frontend: /processes, /admin/participatory_processes
315
315
  participatory_processes: [:participatory_processes, :processes],
316
316
  # both /admin/assemblies and /admin/assemblies_types are considered assemblies
317
317
  assemblies: [:assemblies, :assemblies_types],
318
- # route in admin is diferent than in the frontend: /process_groups, /admin/participatory_process_groups
318
+ # route in admin is different than in the frontend: /process_groups, /admin/participatory_process_groups
319
319
  process_groups: [:processes_groups, :participatory_process_groups]
320
320
  }
321
321
  end
322
322
 
323
323
  # If true, enables a new section in "Participants" where to audit all the admin roles that have been enabled/disabled historically in Decidim
324
- # Set to :disabled to completly remove this feature
324
+ # Set to :disabled to completely remove this feature
325
325
  config_accessor :admin_accountability do
326
326
  [:participatory_space_roles, :admin_roles]
327
327
  end
@@ -337,7 +337,7 @@ module Decidim
337
337
 
338
338
  # Which components will be tampered to add the voting registry override
339
339
  config_accessor :voting_components do
340
- [:proposals, :reporting_propposals]
340
+ [:proposals, :reporting_proposals]
341
341
  end
342
342
 
343
343
  # A URL where to obtain the translations for the FormBuilder component
@@ -378,7 +378,7 @@ module Decidim
378
378
 
379
379
  # prepends to a hash a new value in a specified position so that the hash becomes:
380
380
  # { a: 1, b: 2, c: 3 } => prepend_hash(hash, :b, :d, 4) => { a: 1, d: 4, b: 2, c: 3 }
381
- # if key is not found then it will be inserted at the beggining
381
+ # if key is not found then it will be inserted at the beginning
382
382
  def self.hash_prepend!(hash, before_key, key, value)
383
383
  insert_at = hash.to_a.index(hash.assoc(before_key))
384
384
  insert_at = 0 if insert_at.nil?
@@ -412,9 +412,9 @@ module Decidim
412
412
  registered_components << [manifest, block]
413
413
  end
414
414
 
415
- # version 0.11 is compatible only with decidim 0.28
415
+ # version 0.12 is compatible only with decidim 0.29
416
416
  def self.legacy_version?
417
- # Decidim.version[0..3] == "0.28"
417
+ # Decidim.version[0..3] == "0.29"
418
418
  false
419
419
  end
420
420
  end
@@ -3,73 +3,103 @@ decidim-admin:
3
3
  decidim-0.28: 25bf272ac5a70eb8a975f4889fa46095
4
4
  decidim-0.28.c4d3889: 6391da1f357f9b260622ddd404a47987
5
5
  decidim-0.28.1: b2ae319d5bcf43954bbe0edb9a4e3ffb
6
+ decidim-0.29.1: b2ae319d5bcf43954bbe0edb9a4e3ffb
6
7
  decidim-core:
7
8
  /app/packs/entrypoints/decidim_editor.js:
8
9
  decidim-0.28: beddd77e3893fd0b7cd2679a7ee6e536
10
+ decidim-0.29.1: beddd77e3893fd0b7cd2679a7ee6e536
9
11
  /app/packs/src/decidim/editor/index.js:
10
12
  decidim-0.28: 90dfac3acae97202dec083955e2249e4
13
+ decidim-0.29.1: 90dfac3acae97202dec083955e2249e4
11
14
  /app/validators/etiquette_validator.rb:
12
15
  decidim-0.28: e9ad91d824ad48ac2075a088a0d21349
16
+ decidim-0.29.1: e9ad91d824ad48ac2075a088a0d21349
13
17
  /app/views/layouts/decidim/_head.html.erb:
14
18
  decidim-0.28: e51e400a98821f4ca0fff26ebd4d0741
15
19
  decidim-0.28.1: 8ac1af4e223d9a7a98136760b6194a75
16
20
  decidim-0.28.4: 59abccd8b1c5315d5c0b772be0c26d45
21
+ decidim-0.29.1: 8ac1af4e223d9a7a98136760b6194a75
17
22
  /app/views/layouts/decidim/_decidim_javascript.html.erb:
18
23
  decidim-0.28: dc60ed8abf7649611f18804b67b1408d
24
+ decidim-0.29.1: 8d51790de859ee66f305d9111cdfb324
19
25
  /app/presenters/decidim/menu_presenter.rb:
20
26
  decidim-0.28: 220c8865a43bd8b7b12a7f926f7f4324
27
+ decidim-0.29.1: 220c8865a43bd8b7b12a7f926f7f4324
21
28
  /app/presenters/decidim/menu_item_presenter.rb:
22
29
  decidim-0.28: 4e4cd366a8a313079ac5fab466bd3679
23
30
  decidim-0.28.4: f04f0f5112499a86079119d5f9ae8487
31
+ decidim-0.29.1: f04f0f5112499a86079119d5f9ae8487
24
32
  /app/helpers/decidim/amendments_helper.rb:
25
33
  decidim-0.28: df28f9321d1bc07757746ed608274e3d
34
+ decidim-0.29.1: 36072334cba7a58841a6b2fb007d24a6
26
35
  /app/presenters/decidim/admin_log/component_presenter.rb:
27
36
  decidim-0.28: 77e80d527727acdf117a0c4517a69a7c
37
+ decidim-0.29.1: 77e80d527727acdf117a0c4517a69a7c
28
38
  /app/forms/decidim/account_form.rb:
29
39
  decidim-0.28: 11a022ae6ae18ad89da168bec4207935
40
+ decidim-0.29.1: 11a022ae6ae18ad89da168bec4207935
30
41
  /app/commands/decidim/update_account.rb:
31
42
  decidim-0.28: 363872116fb99372c046b7394d618333
43
+ decidim-0.29.1: d24090fdd9358c38e6e15c4607a78e18
32
44
  /app/views/decidim/account/show.html.erb:
33
45
  decidim-0.28: a0647f1740d696018f73ec8db8c7587a
46
+ decidim-0.29.1: f13218e2358a2d611996c2a197c0de25
34
47
  decidim-proposals:
35
48
  /lib/decidim/proposals/proposal_serializer.rb:
36
49
  decidim-0.28: bbd33bdc60defb734b3fb814666bb622
37
50
  decidim-0.28.1: 7bd5cadb1127a4e81bd5f333670351bd
38
51
  decidim-0.28.2: ab146c54850a4486d96cf50211679671
52
+ decidim-0.29.1: 58915ff3a7528463587d3762a93ff51b
39
53
  /lib/decidim/api/proposal_type.rb:
40
54
  decidim-0.26: e38e4875e408ec4f658e28725c5a94d4
41
- /app/forms/decidim/proposals/proposal_wizard_create_step_form.rb:
42
- decidim-0.27: b495d37088ecebcbe4ac9563bb3498d5
55
+ decidim-0.29.1: 25d61a67a4b969ac8c472237d3f64b66
56
+ /app/forms/decidim/proposals/proposal_form.rb:
57
+ decidim-0.29.1: 0b19bfeb4f7bd15cd378a69c3935de6b
43
58
  /app/forms/decidim/proposals/admin/proposal_form.rb:
44
59
  decidim-0.28: 422632395194b19beed4c7c65f127ff5
60
+ decidim-0.29.1: 422632395194b19beed4c7c65f127ff5
45
61
  /app/helpers/decidim/proposals/application_helper.rb:
46
62
  decidim-0.28: 89df14045349cc2eaaec78f79f6140b1
47
63
  decidim-0.28.2: 317b0347528e697fa405a792bcfa3db8
64
+ decidim-0.29.1: 940488938f644b63a2ef6177f3757ca2
48
65
  /app/controllers/decidim/proposals/proposal_votes_controller.rb:
49
66
  decidim-0.28: f983e72c1ee8d31222d537533c762cd2
67
+ decidim-0.29.1: f983e72c1ee8d31222d537533c762cd2
50
68
  /app/views/decidim/proposals/admin/proposals/_form.html.erb:
51
69
  decidim-0.28: 824463b320562c15fdb530bfebbf2f0f
70
+ decidim-0.29.1: 667c2ef6ffbf3369f59bd1e8eb0ba421
52
71
  /app/views/decidim/proposals/proposals/_vote_button.html.erb:
53
72
  decidim-0.27: 3d087d807238f33b71e6b385db8ffc70
73
+ decidim-0.29.1: 06dd4c9bf7fc4953fc330b7ba081b2f6
54
74
  /app/views/decidim/proposals/proposals/_votes_count.html.erb:
55
75
  decidim-0.27: 6e663e5c82c27291b63f29f346df8737
76
+ decidim-0.29.1: 6e663e5c82c27291b63f29f346df8737
56
77
  /app/cells/decidim/proposals/proposal_l_cell.rb:
57
78
  decidim-0.27.4: 5e111ed30bca9475bed8247e5e056747
58
79
  decidim-0.28.3: 6d955d56d9d9f0cba46ba157fa923cfc
80
+ decidim-0.29.1: e38d1cd0ea6c7f14c8f8b56d3ceb0db5
59
81
  /app/cells/decidim/proposals/proposal_metadata_cell.rb:
60
82
  decidim-0.26: eedfd7f813aedbd819b519e03ae4a680
83
+ decidim-0.29.1: 6859b77805227c4cf71ae0a1351a4551
61
84
  /app/commands/decidim/proposals/create_proposal.rb:
62
85
  decidim-0.28: 95c7bba44dbe477abdfbf450b7eee258
86
+ decidim-0.29.1: 02a6f54a032457e68be580e6a539c47b
63
87
  /app/commands/decidim/proposals/create_collaborative_draft.rb:
64
88
  decidim-0.28: ab3f937f15c6ed945e776fef34b18abf
89
+ decidim-0.29.1: ab3f937f15c6ed945e776fef34b18abf
65
90
  /app/commands/decidim/proposals/admin/create_proposal.rb:
66
91
  decidim-0.28: aa0c093cb10b3ccfb046edd0018eae1d
67
92
  decidim-0.28.3: 8d73a8c852f473c118f978ddfab323b1
93
+ decidim-0.29.1: 837d86d2eb1f2d7579a0cef82d68caf7
68
94
  /app/commands/decidim/proposals/update_proposal.rb:
69
95
  decidim-0.28: 1cc15b946512f4d5a54d1cf5aea8450a
96
+ decidim-0.29.1: e81268a1f9b3770387944d44d7704291
70
97
  /app/commands/decidim/proposals/update_collaborative_draft.rb:
71
98
  decidim-0.28: 7df5266382bd57db72832da391fe7e11
99
+ decidim-0.29.1: 7df5266382bd57db72832da391fe7e11
72
100
  /app/commands/decidim/proposals/admin/update_proposal.rb:
73
101
  decidim-0.28: 67b691b6d1ce61cb198592ac25f76f74
102
+ decidim-0.29.1: 67b691b6d1ce61cb198592ac25f76f74
74
103
  /app/presenters/decidim/proposals/proposal_presenter.rb:
75
104
  decidim-0.28: 72910541010305f25baf297f4a58497b
105
+ decidim-0.29.1: bbc7cee02125c1f8cf909219e48af337
@@ -14,8 +14,8 @@ module Decidim
14
14
 
15
15
  # In the frontend there's no a 100% correspondence between url and manifest name
16
16
  def participatory_spaces_routes
17
- spaces = Decidim.participatory_space_manifests \
18
- .filter { |space| !DecidimAwesome.config.participatory_spaces_routes_context.has_key?(space.name) } \
17
+ spaces = Decidim.participatory_space_manifests
18
+ .filter { |space| !DecidimAwesome.config.participatory_spaces_routes_context.has_key?(space.name) }
19
19
  .to_h { |space| [space.name.to_s, space.name.to_s] }
20
20
  DecidimAwesome.config.participatory_spaces_routes_context.each do |manifest, routes|
21
21
  routes.each do |route|
@@ -5,6 +5,7 @@ require "deface"
5
5
  require "decidim/core"
6
6
  require "decidim/decidim_awesome/awesome_helpers"
7
7
  require "decidim/decidim_awesome/menu"
8
+ require "decidim/decidim_awesome/middleware/current_config"
8
9
 
9
10
  module Decidim
10
11
  module DecidimAwesome
@@ -47,11 +48,11 @@ module Decidim
47
48
  :validate_body_max_caps_percent,
48
49
  :validate_body_max_marks_together,
49
50
  :validate_body_start_with_caps)
50
- Decidim::Proposals::ProposalWizardCreateStepForm.include(Decidim::DecidimAwesome::Proposals::ProposalWizardCreateStepFormOverride)
51
+ Decidim::Proposals::ProposalForm.include(Decidim::DecidimAwesome::Proposals::ProposalFormCustomizations)
51
52
  end
52
53
 
53
54
  if DecidimAwesome.enabled?(:proposal_custom_fields, :proposal_private_custom_fields)
54
- Decidim::Proposals::ProposalWizardCreateStepForm.include(Decidim::DecidimAwesome::Proposals::ProposalFormOverride)
55
+ Decidim::Proposals::ProposalForm.include(Decidim::DecidimAwesome::Proposals::ProposalFormOverride)
55
56
  Decidim::Proposals::Admin::ProposalForm.include(Decidim::DecidimAwesome::Proposals::ProposalFormOverride)
56
57
  Decidim::Proposals::ProposalPresenter.include(Decidim::DecidimAwesome::Proposals::ProposalPresenterOverride)
57
58
  Decidim::Proposals::CreateProposal.include(Decidim::DecidimAwesome::Proposals::CreateProposalOverride)
@@ -67,7 +68,7 @@ module Decidim
67
68
  Decidim::System::RegisterOrganizationForm.include(Decidim::DecidimAwesome::System::OrganizationFormOverride)
68
69
  Decidim::System::UpdateOrganizationForm.include(Decidim::DecidimAwesome::System::OrganizationFormOverride)
69
70
  Decidim::System::UpdateOrganization.include(Decidim::DecidimAwesome::System::UpdateOrganizationOverride)
70
- Decidim::System::RegisterOrganization.include(Decidim::DecidimAwesome::System::RegisterOrganizationOverride)
71
+ Decidim::System::CreateOrganization.include(Decidim::DecidimAwesome::System::CreateOrganizationOverride)
71
72
  end
72
73
 
73
74
  if DecidimAwesome.enabled?(:proposal_custom_fields, :proposal_private_custom_fields, :weighted_proposal_voting)
@@ -229,7 +230,7 @@ module Decidim
229
230
  component.settings(:global) do |settings|
230
231
  DecidimAwesome.hash_append!(
231
232
  settings.attributes,
232
- :can_accumulate_supports_beyond_threshold,
233
+ :can_accumulate_votes_beyond_threshold,
233
234
  :awesome_voting_manifest,
234
235
  Decidim::SettingsManifest::Attribute.new(
235
236
  type: :select,
@@ -5,16 +5,16 @@ shared_examples "edits box label inline" do |test_case, key|
5
5
 
6
6
  it "updates the label when no changes" do
7
7
  link = find("[data-key=#{key}] a.awesome-auto-edit", match: :first)
8
- expect(page).not_to have_field(class: "awesome-auto-edit")
8
+ expect(page).to have_no_field(class: "awesome-auto-edit")
9
9
  link.click
10
10
  expect(page).to have_field(class: "awesome-auto-edit")
11
11
  find("body").click
12
- expect(page).not_to have_field(class: "awesome-auto-edit")
12
+ expect(page).to have_no_field(class: "awesome-auto-edit")
13
13
  link.click
14
14
  input = find("[data-key=#{key}] input.awesome-auto-edit")
15
15
  input.fill_in with: "A new làbel\n"
16
16
  sleep 1
17
- expect(page).not_to have_field(class: "awesome-auto-edit")
17
+ expect(page).to have_no_field(class: "awesome-auto-edit")
18
18
  expect(page).to have_css("span.awesome-auto-edit[data-key=a_new_label]")
19
19
 
20
20
  click_link_or_button "Update configuration"
@@ -24,14 +24,14 @@ shared_examples "edits box label inline" do |test_case, key|
24
24
  when :fields
25
25
  expect(page).to have_content("Occupation")
26
26
  expect(page).to have_content("Street Sweeper")
27
- expect(page).not_to have_content("Short Bio")
27
+ expect(page).to have_no_content("Short Bio")
28
28
  when :admins
29
- expect(page).not_to have_content(user.name.to_s)
29
+ expect(page).to have_no_content(user.name.to_s)
30
30
  expect(page).to have_content(user2.name.to_s)
31
31
  expect(page).to have_content(user3.name.to_s)
32
32
  end
33
33
  expect(page).to have_css("span.awesome-auto-edit[data-key=a_new_label]")
34
- expect(page).not_to have_css("span.awesome-auto-edit[data-key=#{key}]")
34
+ expect(page).to have_no_css("span.awesome-auto-edit[data-key=#{key}]")
35
35
  end
36
36
 
37
37
  it "updates the label with previous changes" do
@@ -48,16 +48,16 @@ shared_examples "edits box label inline" do |test_case, key|
48
48
  end
49
49
 
50
50
  link = find("[data-key=#{key}] a.awesome-auto-edit", match: :first)
51
- expect(page).not_to have_field(class: "awesome-auto-edit")
51
+ expect(page).to have_no_field(class: "awesome-auto-edit")
52
52
  link.click
53
53
  expect(page).to have_field(class: "awesome-auto-edit")
54
54
  find("body").click
55
- expect(page).not_to have_field(class: "awesome-auto-edit")
55
+ expect(page).to have_no_field(class: "awesome-auto-edit")
56
56
  link.click
57
57
  input = find("[data-key=#{key}] input.awesome-auto-edit")
58
58
  input.fill_in with: "A new làbel\n"
59
59
  sleep 1
60
- expect(page).not_to have_field(class: "awesome-auto-edit")
60
+ expect(page).to have_no_field(class: "awesome-auto-edit")
61
61
  expect(page).to have_css("span.awesome-auto-edit[data-key=a_new_label]")
62
62
 
63
63
  click_link_or_button "Update configuration"
@@ -73,21 +73,21 @@ shared_examples "edits box label inline" do |test_case, key|
73
73
  expect(page).to have_content(user3.name.to_s)
74
74
  end
75
75
  expect(page).to have_css("span.awesome-auto-edit[data-key=a_new_label]")
76
- expect(page).not_to have_css("span.awesome-auto-edit[data-key=#{key}]")
76
+ expect(page).to have_no_css("span.awesome-auto-edit[data-key=#{key}]")
77
77
  end
78
78
 
79
79
  it "updates the label with post changes" do
80
80
  link = find("[data-key=#{key}] a.awesome-auto-edit", match: :first)
81
- expect(page).not_to have_field(class: "awesome-auto-edit")
81
+ expect(page).to have_no_field(class: "awesome-auto-edit")
82
82
  link.click
83
83
  expect(page).to have_field(class: "awesome-auto-edit")
84
84
  find("body").click
85
- expect(page).not_to have_field(class: "awesome-auto-edit")
85
+ expect(page).to have_no_field(class: "awesome-auto-edit")
86
86
  link.click
87
87
  input = find("[data-key=#{key}] input.awesome-auto-edit")
88
88
  input.fill_in with: "A new làbel\n"
89
89
  sleep 1
90
- expect(page).not_to have_field(class: "awesome-auto-edit")
90
+ expect(page).to have_no_field(class: "awesome-auto-edit")
91
91
  expect(page).to have_css("span.awesome-auto-edit[data-key=a_new_label]")
92
92
 
93
93
  case test_case
@@ -111,6 +111,6 @@ shared_examples "edits box label inline" do |test_case, key|
111
111
  expect(page).to have_content(user3.name.to_s)
112
112
  end
113
113
  expect(page).to have_css("span.awesome-auto-edit[data-key=a_new_label]")
114
- expect(page).not_to have_css("span.awesome-auto-edit[data-key=#{key}]")
114
+ expect(page).to have_no_css("span.awesome-auto-edit[data-key=#{key}]")
115
115
  end
116
116
  end
@@ -22,7 +22,7 @@ shared_examples "do not have menu link" do |item|
22
22
  let(:prefix) { "config/" }
23
23
  it "do not show the feature link" do
24
24
  within ".sidebar-menu" do
25
- expect(page).not_to have_link(href: "/admin/decidim_awesome/#{prefix}#{item}")
25
+ expect(page).to have_no_link(href: "/admin/decidim_awesome/#{prefix}#{item}")
26
26
  end
27
27
  end
28
28
  end
@@ -26,7 +26,7 @@ shared_examples "updates a box" do
26
26
  expect(page).to have_content("Full Name")
27
27
  expect(page).to have_content("Occupation")
28
28
  expect(page).to have_content("Street Sweeper")
29
- expect(page).not_to have_content("Short Bio")
29
+ expect(page).to have_no_content("Short Bio")
30
30
 
31
31
  page.execute_script("$('.proposal_custom_fields_container[data-key=\"foo\"] .proposal_custom_fields_editor')[0].FormBuilder.actions.setData(#{data})")
32
32
  click_on "Update configuration"
@@ -34,8 +34,8 @@ shared_examples "updates a box" do
34
34
  sleep 2
35
35
  expect(page).to have_admin_callout("updated successfully")
36
36
  expect(page).to have_content("Full Name")
37
- expect(page).not_to have_content("Occupation")
38
- expect(page).not_to have_content("Street Sweeper")
37
+ expect(page).to have_no_content("Occupation")
38
+ expect(page).to have_no_content("Street Sweeper")
39
39
  expect(page).to have_content("Short Bio")
40
40
  end
41
41
  end
@@ -53,7 +53,7 @@ shared_examples "removes a box" do |name|
53
53
  expect(page).to have_content("Full Name")
54
54
  expect(page).to have_content("Occupation")
55
55
  expect(page).to have_content("Street Sweeper")
56
- expect(page).not_to have_content("Short Bio")
56
+ expect(page).to have_no_content("Short Bio")
57
57
 
58
58
  within ".proposal_custom_fields_container[data-key=\"foo\"]" do
59
59
  accept_confirm { click_on "Remove this \"#{name}\" box" }
@@ -61,10 +61,10 @@ shared_examples "removes a box" do |name|
61
61
 
62
62
  sleep 2
63
63
  expect(page).to have_admin_callout("removed successfully")
64
- expect(page).not_to have_content("Full Name")
64
+ expect(page).to have_no_content("Full Name")
65
65
  expect(page).to have_content("Occupation")
66
66
  expect(page).to have_content("Street Sweeper")
67
- expect(page).not_to have_content("Short Bio")
67
+ expect(page).to have_no_content("Short Bio")
68
68
 
69
69
  expect(Decidim::DecidimAwesome::AwesomeConfig.find_by(organization:, var: "#{var_name}_foo")).not_to be_present
70
70
  expect(Decidim::DecidimAwesome::AwesomeConfig.find_by(organization:, var: "#{var_name}_bar")).to be_present
@@ -121,13 +121,13 @@ shared_examples "removes a constraint" do
121
121
  end
122
122
 
123
123
  within ".proposal_custom_fields_container[data-key=\"bar\"] .constraints-editor" do
124
- expect(page).not_to have_content("Proposals")
124
+ expect(page).to have_no_content("Proposals")
125
125
  end
126
126
 
127
127
  visit decidim_admin_decidim_awesome.config_path("#{var_name}s")
128
128
 
129
129
  within ".proposal_custom_fields_container[data-key=\"bar\"] .constraints-editor" do
130
- expect(page).not_to have_content("Proposals")
130
+ expect(page).to have_no_content("Proposals")
131
131
  end
132
132
 
133
133
  expect(Decidim::DecidimAwesome::AwesomeConfig.find_by(organization:, var: "#{var_name}_bar")).to be_present
@@ -26,7 +26,7 @@ shared_examples "saves content" do |key|
26
26
  click_link_or_button "Update configuration"
27
27
 
28
28
  expect(page).to have_admin_callout("updated successfully")
29
- expect(page).not_to have_content("body {background: red;}")
29
+ expect(page).to have_no_content("body {background: red;}")
30
30
  expect(page).to have_content("body {background: green;}")
31
31
  expect(page).to have_content("body {background: blue;}")
32
32
  end
@@ -37,7 +37,7 @@ shared_examples "saves content" do |key|
37
37
  click_link_or_button "Update configuration"
38
38
 
39
39
  expect(page).to have_admin_callout("Error updating configuration!")
40
- expect(page).not_to have_content("body {background: red;}")
40
+ expect(page).to have_no_content("body {background: red;}")
41
41
  expect(page).to have_content("body {background: blue;}")
42
42
  expect(page).to have_content("I am invalid CSS")
43
43
  end
@@ -68,7 +68,7 @@ shared_examples "removes a box" do
68
68
 
69
69
  expect(page).to have_admin_callout("removed successfully")
70
70
  expect(page).to have_content("body {background: blue;}")
71
- expect(page).not_to have_content("body {background: red;}")
71
+ expect(page).to have_no_content("body {background: red;}")
72
72
  expect(Decidim::DecidimAwesome::AwesomeConfig.find_by(organization:, var: "#{var_name}_foo")).not_to be_present
73
73
  expect(Decidim::DecidimAwesome::AwesomeConfig.find_by(organization:, var: "#{var_name}_bar")).to be_present
74
74
  end
@@ -121,13 +121,13 @@ shared_examples "removes a constraint" do
121
121
  end
122
122
 
123
123
  within ".scoped_styles_container[data-key=\"bar\"] .constraints-editor" do
124
- expect(page).not_to have_content("Processes")
124
+ expect(page).to have_no_content("Processes")
125
125
  end
126
126
 
127
127
  visit decidim_admin_decidim_awesome.config_path("#{var_name}s")
128
128
 
129
129
  within ".scoped_styles_container[data-key=\"bar\"] .constraints-editor" do
130
- expect(page).not_to have_content("Processes")
130
+ expect(page).to have_no_content("Processes")
131
131
  end
132
132
 
133
133
  expect(Decidim::DecidimAwesome::AwesomeConfig.find_by(organization:, var: "#{var_name}_bar")).to be_present
@@ -147,7 +147,7 @@ end
147
147
 
148
148
  shared_examples "no extra css is added" do
149
149
  it "css is no present" do
150
- expect(page.body).not_to have_content("body {background: red;}")
150
+ expect(page.body).to have_no_content("body {background: red;}")
151
151
  end
152
152
 
153
153
  it "css is not applyied" do
@@ -2,7 +2,7 @@
2
2
 
3
3
  shared_examples "has no image support" do
4
4
  it "has no image button" do
5
- expect(page).not_to have_xpath("//button[@class='editor-toolbar-control'][@data-editor-type='image']")
5
+ expect(page).to have_no_xpath("//button[@class='editor-toolbar-control'][@data-editor-type='image']")
6
6
  end
7
7
  end
8
8
 
@@ -14,7 +14,7 @@ end
14
14
 
15
15
  shared_examples "has no video support" do
16
16
  it "has no video button" do
17
- expect(page).not_to have_xpath("//button[@class='editor-toolbar-control'][@data-editor-type='videoEmbed']")
17
+ expect(page).to have_no_xpath("//button[@class='editor-toolbar-control'][@data-editor-type='videoEmbed']")
18
18
  end
19
19
  end
20
20
 
@@ -26,7 +26,7 @@ end
26
26
 
27
27
  shared_examples "has no drag and drop" do
28
28
  it "cannot drop a file" do
29
- expect(page).not_to have_content("Add images by dragging & dropping or pasting them.")
29
+ expect(page).to have_no_content("Add images by dragging & dropping or pasting them.")
30
30
  find(editor_selector).drop(image)
31
31
  expect(page.execute_script("return document.querySelector('#{editor_selector}').value")).not_to eq("[Uploading file...]")
32
32
  sleep 1
@@ -13,7 +13,7 @@ end
13
13
  shared_examples "forbids awesome access" do
14
14
  it "does not have awesome link" do
15
15
  visit decidim_admin.root_path
16
- expect(page).not_to have_content("Decidim awesome")
16
+ expect(page).to have_no_content("Decidim awesome")
17
17
  end
18
18
 
19
19
  describe "forbids module access" do
@@ -155,7 +155,7 @@ shared_examples "allows scoped admin routes" do
155
155
  it_behaves_like "redirects to index"
156
156
 
157
157
  it "is not a process page" do
158
- expect(page).not_to have_content("New process")
158
+ expect(page).to have_no_content("New process")
159
159
  end
160
160
  end
161
161
  end
@@ -171,7 +171,7 @@ end
171
171
  shared_examples "has no admin link" do
172
172
  it "has no menu link" do
173
173
  within "header" do
174
- expect(page).not_to have_css("#admin-bar", text: "Admin dashboard")
174
+ expect(page).to have_no_css("#admin-bar", text: "Admin dashboard")
175
175
  end
176
176
  end
177
177
  end
@@ -203,7 +203,7 @@ shared_examples "shows partial admin links in the frontend" do
203
203
 
204
204
  it_behaves_like "has no admin link"
205
205
  it "has no Edit button" do
206
- expect(page).not_to have_link(href: "/admin/processes")
206
+ expect(page).to have_no_link(href: "/admin/processes")
207
207
  end
208
208
  end
209
209
  end
@@ -358,7 +358,7 @@ shared_examples "shows component partial admin links in the frontend" do
358
358
 
359
359
  it_behaves_like "has no admin link"
360
360
  it "has no Edit button" do
361
- expect(page).not_to have_link(href: manage_component_path(another_component))
361
+ expect(page).to have_no_link(href: manage_component_path(another_component))
362
362
  end
363
363
  end
364
364
  end
@@ -37,8 +37,8 @@ shared_examples "activated concerns" do |enabled|
37
37
  expect(Decidim::MenuItemPresenter.included_modules).to include(Decidim::DecidimAwesome::MenuItemPresenterOverride)
38
38
  expect(Decidim::ErrorsController.included_modules).to include(Decidim::DecidimAwesome::NotFoundRedirect)
39
39
  expect(Decidim::Proposals::ApplicationHelper.included_modules).to include(Decidim::DecidimAwesome::Proposals::ApplicationHelperOverride)
40
- expect(Decidim::Proposals::ProposalWizardCreateStepForm.included_modules).to include(Decidim::DecidimAwesome::Proposals::ProposalWizardCreateStepFormOverride)
41
- expect(Decidim::Proposals::ProposalWizardCreateStepForm.included_modules).to include(Decidim::DecidimAwesome::Proposals::ProposalFormOverride)
40
+ expect(Decidim::Proposals::ProposalForm.included_modules).to include(Decidim::DecidimAwesome::Proposals::ProposalFormCustomizations)
41
+ expect(Decidim::Proposals::ProposalForm.included_modules).to include(Decidim::DecidimAwesome::Proposals::ProposalFormOverride)
42
42
  expect(Decidim::Proposals::Admin::ProposalForm.included_modules).to include(Decidim::DecidimAwesome::Proposals::ProposalFormOverride)
43
43
  expect(Decidim::AmendmentsHelper.included_modules).to include(Decidim::DecidimAwesome::AmendmentsHelperOverride)
44
44
  expect(EtiquetteValidator.included_modules).to include(Decidim::DecidimAwesome::EtiquetteValidatorOverride)
@@ -63,7 +63,7 @@ shared_examples "activated concerns" do |enabled|
63
63
  expect(Decidim::System::RegisterOrganizationForm.included_modules).to include(Decidim::DecidimAwesome::System::OrganizationFormOverride)
64
64
  expect(Decidim::System::UpdateOrganizationForm.included_modules).to include(Decidim::DecidimAwesome::System::OrganizationFormOverride)
65
65
  expect(Decidim::System::UpdateOrganization.included_modules).to include(Decidim::DecidimAwesome::System::UpdateOrganizationOverride)
66
- expect(Decidim::System::RegisterOrganization.included_modules).to include(Decidim::DecidimAwesome::System::RegisterOrganizationOverride)
66
+ expect(Decidim::System::CreateOrganization.included_modules).to include(Decidim::DecidimAwesome::System::CreateOrganizationOverride)
67
67
  expect(Decidim::AdminLog::UserPresenter.included_modules).to include(Decidim::DecidimAwesome::AdminLog::UserPresenterOverride)
68
68
  end
69
69
 
@@ -74,8 +74,8 @@ shared_examples "activated concerns" do |enabled|
74
74
  expect(Decidim::MenuItemPresenter.included_modules).not_to include(Decidim::DecidimAwesome::MenuItemPresenterOverride)
75
75
  expect(Decidim::ErrorsController.included_modules).not_to include(Decidim::DecidimAwesome::NotFoundRedirect)
76
76
  expect(Decidim::Proposals::ApplicationHelper.included_modules).not_to include(Decidim::DecidimAwesome::Proposals::ApplicationHelperOverride)
77
- expect(Decidim::Proposals::ProposalWizardCreateStepForm.included_modules).not_to include(Decidim::DecidimAwesome::Proposals::ProposalWizardCreateStepFormOverride)
78
- expect(Decidim::Proposals::ProposalWizardCreateStepForm.included_modules).not_to include(Decidim::DecidimAwesome::Proposals::ProposalFormOverride)
77
+ expect(Decidim::Proposals::ProposalForm.included_modules).not_to include(Decidim::DecidimAwesome::Proposals::ProposalFormCustomizations)
78
+ expect(Decidim::Proposals::ProposalForm.included_modules).not_to include(Decidim::DecidimAwesome::Proposals::ProposalFormOverride)
79
79
  expect(Decidim::Proposals::Admin::ProposalForm.included_modules).not_to include(Decidim::DecidimAwesome::Proposals::ProposalFormOverride)
80
80
  expect(Decidim::AmendmentsHelper.included_modules).not_to include(Decidim::DecidimAwesome::AmendmentsHelperOverride)
81
81
  expect(EtiquetteValidator.included_modules).not_to include(Decidim::DecidimAwesome::EtiquetteValidatorOverride)
@@ -223,11 +223,11 @@ shared_examples "basic rendering" do |enabled|
223
223
  end
224
224
 
225
225
  it "do not have custom fields javascript" do
226
- expect(page).not_to have_xpath("//script[contains(@src,'decidim_decidim_awesome_custom_fields')]", visible: :all)
226
+ expect(page).to have_no_xpath("//script[contains(@src,'decidim_decidim_awesome_custom_fields')]", visible: :all)
227
227
  end
228
228
 
229
229
  it "do not have custom styles CSS" do
230
- expect(page.body).not_to have_content(styles)
230
+ expect(page.body).to have_no_content(styles)
231
231
  end
232
232
  end
233
233
  end
@@ -284,7 +284,7 @@ shared_examples "basic rendering" do |enabled|
284
284
  it "has no admin menus" do
285
285
  menus.each do |menu|
286
286
  within ".sidebar-menu" do
287
- expect(page).not_to have_link(href: "/admin/decidim_awesome/#{menu}")
287
+ expect(page).to have_no_link(href: "/admin/decidim_awesome/#{menu}")
288
288
  end
289
289
  end
290
290
  end