decidim-dev 0.19.0 → 0.22.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 (63) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/images/decidim/dummy.svg +1 -4
  3. data/app/assets/images/decidim/gamification/badges/test.svg +1 -145
  4. data/app/commands/decidim/dummy_resources/create_dummy_resource.rb +48 -0
  5. data/app/forms/decidim/dummy_resources/dummy_resource_form.rb +3 -0
  6. data/config/locales/ar.yml +1 -0
  7. data/config/locales/bg-BG.yml +56 -0
  8. data/config/locales/ca.yml +15 -0
  9. data/config/locales/cs.yml +16 -1
  10. data/config/locales/da-DK.yml +1 -0
  11. data/config/locales/de.yml +16 -0
  12. data/config/locales/el-GR.yml +1 -0
  13. data/config/locales/el.yml +56 -0
  14. data/config/locales/en.yml +15 -0
  15. data/config/locales/es-MX.yml +15 -0
  16. data/config/locales/es-PY.yml +15 -0
  17. data/config/locales/es.yml +15 -0
  18. data/config/locales/et-EE.yml +1 -0
  19. data/config/locales/fi-plain.yml +15 -0
  20. data/config/locales/fi.yml +15 -0
  21. data/config/locales/fr-CA.yml +56 -0
  22. data/config/locales/fr.yml +15 -0
  23. data/config/locales/ga-IE.yml +1 -0
  24. data/config/locales/hr-HR.yml +1 -0
  25. data/config/locales/hu.yml +11 -2
  26. data/config/locales/is-IS.yml +21 -0
  27. data/config/locales/it.yml +18 -2
  28. data/config/locales/ja-JP.yml +56 -0
  29. data/config/locales/lt-LT.yml +1 -0
  30. data/config/locales/lv-LV.yml +54 -0
  31. data/config/locales/mt-MT.yml +1 -0
  32. data/config/locales/nl.yml +15 -0
  33. data/config/locales/no.yml +36 -0
  34. data/config/locales/pl.yml +26 -10
  35. data/config/locales/pt-BR.yml +1 -1
  36. data/config/locales/pt.yml +26 -10
  37. data/config/locales/ro-RO.yml +56 -0
  38. data/config/locales/ru.yml +13 -0
  39. data/config/locales/sk-SK.yml +47 -0
  40. data/config/locales/sk.yml +47 -0
  41. data/config/locales/sl.yml +5 -0
  42. data/config/locales/sr-CS.yml +8 -0
  43. data/config/locales/sv.yml +16 -0
  44. data/lib/decidim/dev/assets/city.jpeg +0 -0
  45. data/lib/decidim/dev/assets/city2.jpeg +0 -0
  46. data/lib/decidim/dev/assets/city3.jpeg +0 -0
  47. data/lib/decidim/dev/assets/participatory_processes.json +434 -0
  48. data/lib/decidim/dev/assets/participatory_processes_with_null.json +103 -0
  49. data/lib/decidim/dev/test/base_spec_helper.rb +14 -0
  50. data/lib/decidim/dev/test/rspec_support/authorization.rb +3 -0
  51. data/lib/decidim/dev/test/rspec_support/capybara.rb +1 -1
  52. data/lib/decidim/dev/test/rspec_support/capybara_data_picker.rb +15 -5
  53. data/lib/decidim/dev/test/rspec_support/capybara_scopes_picker.rb +5 -5
  54. data/lib/decidim/dev/test/rspec_support/comments.rb +2 -2
  55. data/lib/decidim/dev/test/rspec_support/component.rb +71 -2
  56. data/lib/decidim/dev/test/rspec_support/confirmation_helpers.rb +60 -0
  57. data/lib/decidim/dev/test/rspec_support/content_processing.rb +2 -2
  58. data/lib/decidim/dev/test/rspec_support/geocoder.rb +1 -2
  59. data/lib/decidim/dev/test/rspec_support/helpers.rb +2 -2
  60. data/lib/decidim/dev/test/rspec_support/timezone.rb +7 -0
  61. data/lib/decidim/dev/version.rb +1 -1
  62. metadata +66 -16
  63. data/lib/decidim/dev/test/rspec_support/capybara_proposals_picker.rb +0 -51
@@ -10,14 +10,14 @@ module Decidim::ComponentTestHelpers
10
10
 
11
11
  def within_user_menu
12
12
  within ".topbar__user__logged" do
13
- find("a", text: user.name).hover
13
+ find("a", text: user.name).click
14
14
  yield
15
15
  end
16
16
  end
17
17
 
18
18
  def within_language_menu
19
19
  within ".topbar__dropmenu.language-choose" do
20
- find("ul.dropdown.menu").hover
20
+ find("ul.dropdown.menu").click
21
21
  yield
22
22
  end
23
23
  end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ RSpec.configure do |config|
4
+ config.around :example, :tz do |example|
5
+ Time.use_zone(example.metadata[:tz]) { example.run }
6
+ end
7
+ end
@@ -4,7 +4,7 @@ module Decidim
4
4
  # This holds the decidim-dev version.
5
5
  module Dev
6
6
  def self.version
7
- "0.19.0"
7
+ "0.22.0"
8
8
  end
9
9
  end
10
10
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: decidim-dev
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.19.0
4
+ version: 0.22.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josep Jaume Rey Peroy
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2019-10-21 00:00:00.000000000 Z
13
+ date: 2020-09-01 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: capybara
@@ -32,14 +32,14 @@ dependencies:
32
32
  requirements:
33
33
  - - '='
34
34
  - !ruby/object:Gem::Version
35
- version: 0.19.0
35
+ version: 0.22.0
36
36
  type: :runtime
37
37
  prerelease: false
38
38
  version_requirements: !ruby/object:Gem::Requirement
39
39
  requirements:
40
40
  - - '='
41
41
  - !ruby/object:Gem::Version
42
- version: 0.19.0
42
+ version: 0.22.0
43
43
  - !ruby/object:Gem::Dependency
44
44
  name: factory_bot_rails
45
45
  requirement: !ruby/object:Gem::Requirement
@@ -116,42 +116,42 @@ dependencies:
116
116
  requirements:
117
117
  - - "~>"
118
118
  - !ruby/object:Gem::Version
119
- version: 0.5.0
119
+ version: '0.10'
120
120
  type: :runtime
121
121
  prerelease: false
122
122
  version_requirements: !ruby/object:Gem::Requirement
123
123
  requirements:
124
124
  - - "~>"
125
125
  - !ruby/object:Gem::Version
126
- version: 0.5.0
126
+ version: '0.10'
127
127
  - !ruby/object:Gem::Dependency
128
128
  name: nokogiri
129
129
  requirement: !ruby/object:Gem::Requirement
130
130
  requirements:
131
131
  - - ">="
132
132
  - !ruby/object:Gem::Version
133
- version: 1.10.4
133
+ version: 1.10.8
134
134
  type: :runtime
135
135
  prerelease: false
136
136
  version_requirements: !ruby/object:Gem::Requirement
137
137
  requirements:
138
138
  - - ">="
139
139
  - !ruby/object:Gem::Version
140
- version: 1.10.4
140
+ version: 1.10.8
141
141
  - !ruby/object:Gem::Dependency
142
142
  name: puma
143
143
  requirement: !ruby/object:Gem::Requirement
144
144
  requirements:
145
- - - "~>"
145
+ - - ">="
146
146
  - !ruby/object:Gem::Version
147
- version: '3.12'
147
+ version: '4.3'
148
148
  type: :runtime
149
149
  prerelease: false
150
150
  version_requirements: !ruby/object:Gem::Requirement
151
151
  requirements:
152
- - - "~>"
152
+ - - ">="
153
153
  - !ruby/object:Gem::Version
154
- version: '3.12'
154
+ version: '4.3'
155
155
  - !ruby/object:Gem::Dependency
156
156
  name: rails-controller-testing
157
157
  requirement: !ruby/object:Gem::Requirement
@@ -208,6 +208,20 @@ dependencies:
208
208
  - - "~>"
209
209
  - !ruby/object:Gem::Version
210
210
  version: '3.7'
211
+ - !ruby/object:Gem::Dependency
212
+ name: rspec-retry
213
+ requirement: !ruby/object:Gem::Requirement
214
+ requirements:
215
+ - - "~>"
216
+ - !ruby/object:Gem::Version
217
+ version: 0.6.2
218
+ type: :runtime
219
+ prerelease: false
220
+ version_requirements: !ruby/object:Gem::Requirement
221
+ requirements:
222
+ - - "~>"
223
+ - !ruby/object:Gem::Version
224
+ version: 0.6.2
211
225
  - !ruby/object:Gem::Dependency
212
226
  name: rspec_junit_formatter
213
227
  requirement: !ruby/object:Gem::Requirement
@@ -284,14 +298,28 @@ dependencies:
284
298
  requirements:
285
299
  - - "~>"
286
300
  - !ruby/object:Gem::Version
287
- version: '0.16'
301
+ version: 0.18.5
302
+ type: :runtime
303
+ prerelease: false
304
+ version_requirements: !ruby/object:Gem::Requirement
305
+ requirements:
306
+ - - "~>"
307
+ - !ruby/object:Gem::Version
308
+ version: 0.18.5
309
+ - !ruby/object:Gem::Dependency
310
+ name: simplecov-cobertura
311
+ requirement: !ruby/object:Gem::Requirement
312
+ requirements:
313
+ - - "~>"
314
+ - !ruby/object:Gem::Version
315
+ version: 1.3.1
288
316
  type: :runtime
289
317
  prerelease: false
290
318
  version_requirements: !ruby/object:Gem::Requirement
291
319
  requirements:
292
320
  - - "~>"
293
321
  - !ruby/object:Gem::Version
294
- version: '0.16'
322
+ version: 1.3.1
295
323
  - !ruby/object:Gem::Dependency
296
324
  name: system_test_html_screenshots
297
325
  requirement: !ruby/object:Gem::Requirement
@@ -347,6 +375,7 @@ files:
347
375
  - Rakefile
348
376
  - app/assets/images/decidim/dummy.svg
349
377
  - app/assets/images/decidim/gamification/badges/test.svg
378
+ - app/commands/decidim/dummy_resources/create_dummy_resource.rb
350
379
  - app/controllers/decidim/dummy_resources/dummy_resources_controller.rb
351
380
  - app/forms/decidim/dummy_resources/dummy_resource_form.rb
352
381
  - app/views/decidim/dummy_resource/_linked_dummys.html.erb
@@ -354,30 +383,48 @@ files:
354
383
  - app/views/decidim/dummy_resources/dummy_resources/show.html.erb
355
384
  - config/locales/ar-SA.yml
356
385
  - config/locales/ar.yml
386
+ - config/locales/bg-BG.yml
357
387
  - config/locales/ca.yml
358
388
  - config/locales/cs-CZ.yml
359
389
  - config/locales/cs.yml
390
+ - config/locales/da-DK.yml
360
391
  - config/locales/de.yml
392
+ - config/locales/el-GR.yml
393
+ - config/locales/el.yml
361
394
  - config/locales/en.yml
362
395
  - config/locales/eo-UY.yml
363
396
  - config/locales/es-MX.yml
364
397
  - config/locales/es-PY.yml
365
398
  - config/locales/es.yml
399
+ - config/locales/et-EE.yml
366
400
  - config/locales/eu.yml
367
401
  - config/locales/fi-pl.yml
368
402
  - config/locales/fi-plain.yml
369
403
  - config/locales/fi.yml
404
+ - config/locales/fr-CA.yml
370
405
  - config/locales/fr.yml
406
+ - config/locales/ga-IE.yml
371
407
  - config/locales/gl.yml
408
+ - config/locales/hr-HR.yml
372
409
  - config/locales/hu.yml
373
410
  - config/locales/id-ID.yml
411
+ - config/locales/is-IS.yml
374
412
  - config/locales/it.yml
413
+ - config/locales/ja-JP.yml
414
+ - config/locales/lt-LT.yml
415
+ - config/locales/lv-LV.yml
416
+ - config/locales/mt-MT.yml
375
417
  - config/locales/nl.yml
376
418
  - config/locales/no.yml
377
419
  - config/locales/pl.yml
378
420
  - config/locales/pt-BR.yml
379
421
  - config/locales/pt.yml
422
+ - config/locales/ro-RO.yml
380
423
  - config/locales/ru.yml
424
+ - config/locales/sk-SK.yml
425
+ - config/locales/sk.yml
426
+ - config/locales/sl.yml
427
+ - config/locales/sr-CS.yml
381
428
  - config/locales/sv.yml
382
429
  - config/locales/tr-TR.yml
383
430
  - config/locales/uk.yml
@@ -393,6 +440,8 @@ files:
393
440
  - lib/decidim/dev/assets/import_participatory_space_private_users.csv
394
441
  - lib/decidim/dev/assets/iso-8859-15.md
395
442
  - lib/decidim/dev/assets/malicious.jpg
443
+ - lib/decidim/dev/assets/participatory_processes.json
444
+ - lib/decidim/dev/assets/participatory_processes_with_null.json
396
445
  - lib/decidim/dev/assets/participatory_text.md
397
446
  - lib/decidim/dev/assets/participatory_text.odt
398
447
  - lib/decidim/dev/assets/participatory_text_wrong.odt
@@ -411,11 +460,11 @@ files:
411
460
  - lib/decidim/dev/test/rspec_support/authorization.rb
412
461
  - lib/decidim/dev/test/rspec_support/capybara.rb
413
462
  - lib/decidim/dev/test/rspec_support/capybara_data_picker.rb
414
- - lib/decidim/dev/test/rspec_support/capybara_proposals_picker.rb
415
463
  - lib/decidim/dev/test/rspec_support/capybara_scopes_picker.rb
416
464
  - lib/decidim/dev/test/rspec_support/comments.rb
417
465
  - lib/decidim/dev/test/rspec_support/component.rb
418
466
  - lib/decidim/dev/test/rspec_support/component_context.rb
467
+ - lib/decidim/dev/test/rspec_support/confirmation_helpers.rb
419
468
  - lib/decidim/dev/test/rspec_support/content_processing.rb
420
469
  - lib/decidim/dev/test/rspec_support/download_helper.rb
421
470
  - lib/decidim/dev/test/rspec_support/factory_bot.rb
@@ -427,6 +476,7 @@ files:
427
476
  - lib/decidim/dev/test/rspec_support/permissions_shared_examples.rb
428
477
  - lib/decidim/dev/test/rspec_support/react_select.rb
429
478
  - lib/decidim/dev/test/rspec_support/route_helpers.rb
479
+ - lib/decidim/dev/test/rspec_support/timezone.rb
430
480
  - lib/decidim/dev/test/rspec_support/translation_helpers.rb
431
481
  - lib/decidim/dev/test/rspec_support/warden.rb
432
482
  - lib/decidim/dev/test/rspec_support/webmock.rb
@@ -454,7 +504,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
454
504
  - !ruby/object:Gem::Version
455
505
  version: '0'
456
506
  requirements: []
457
- rubygems_version: 3.0.3
507
+ rubygems_version: 3.1.2
458
508
  signing_key:
459
509
  specification_version: 4
460
510
  summary: Decidim dev tools
@@ -1,51 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require_relative "capybara_data_picker"
4
-
5
- module Capybara
6
- module ProposalsPicker
7
- include DataPicker
8
-
9
- RSpec::Matchers.define :have_data_picked do |expected, text|
10
- match do |data_picker|
11
- data_picker_elem = data_picker.data_picker
12
- expect(data_picker_elem).to have_selector(".picker-values div input[value='#{expected&.id || data_picker.global_value}']", visible: false)
13
- expect(data_picker_elem).to have_selector(:xpath, "//div[contains(@class,'picker-values')]/div/a[text()[contains(.,'#{text}')]]")
14
- end
15
- end
16
-
17
- def proposal_pick(proposal_picker, proposal)
18
- data_picker = proposal_picker.data_picker
19
- # use scope_repick to change single scope picker selected scope
20
- expect(data_picker).to have_selector(".picker-values:empty", visible: false) if data_picker.has_css?(".picker-single")
21
-
22
- expect(data_picker).to have_selector(".picker-prompt")
23
- data_picker.find(".picker-prompt").click
24
-
25
- proposal_picker_search_perform(proposal.title)
26
- proposal_picker_search_choose_result(proposal.id)
27
- data_picker_pick_current
28
-
29
- expect(proposal_picker).to have_data_picked(proposal, proposal.title)
30
- end
31
-
32
- private
33
-
34
- def proposal_picker_search_perform(term)
35
- body = find(:xpath, "//body")
36
- input_selector = "#data_picker-modal .picker-content input#data_picker-autocomplete"
37
- expect(body).to have_selector(input_selector)
38
- body.find("#data_picker-modal .picker-content").fill_in("data_picker-autocomplete", with: term)
39
- end
40
-
41
- def proposal_picker_search_choose_result(proposal_id)
42
- body = find(:xpath, "//body")
43
- expect(body).to have_selector(".autocomplete-suggestions .autocomplete-suggestion")
44
- body.find(".autocomplete-suggestions div.autocomplete-suggestion[data-model-id='#{proposal_id}']").click
45
- end
46
- end
47
- end
48
-
49
- RSpec.configure do |config|
50
- config.include Capybara::ProposalsPicker, type: :system
51
- end