decidim-dev 0.20.1 → 0.23.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (91) 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/controllers/decidim/dummy_resources/dummy_resources_controller.rb +1 -0
  6. data/app/forms/decidim/dummy_resources/dummy_resource_form.rb +3 -0
  7. data/app/views/decidim/dummy_resources/dummy_resources/show.html.erb +4 -0
  8. data/config/locales/am-ET.yml +1 -0
  9. data/config/locales/bg-BG.yml +56 -0
  10. data/config/locales/bg.yml +56 -0
  11. data/config/locales/ca.yml +15 -0
  12. data/config/locales/cs.yml +16 -1
  13. data/config/locales/da-DK.yml +1 -0
  14. data/config/locales/da.yml +1 -0
  15. data/config/locales/de.yml +16 -0
  16. data/config/locales/el.yml +56 -0
  17. data/config/locales/en.yml +15 -0
  18. data/config/locales/eo.yml +1 -0
  19. data/config/locales/es-MX.yml +15 -0
  20. data/config/locales/es-PY.yml +15 -0
  21. data/config/locales/es.yml +15 -0
  22. data/config/locales/et-EE.yml +1 -0
  23. data/config/locales/et.yml +1 -0
  24. data/config/locales/fi-plain.yml +15 -0
  25. data/config/locales/fi.yml +15 -0
  26. data/config/locales/fr-CA.yml +56 -0
  27. data/config/locales/fr.yml +15 -0
  28. data/config/locales/ga-IE.yml +1 -0
  29. data/config/locales/hr-HR.yml +1 -0
  30. data/config/locales/hr.yml +1 -0
  31. data/config/locales/hu.yml +9 -0
  32. data/config/locales/is.yml +21 -0
  33. data/config/locales/it.yml +17 -2
  34. data/config/locales/ja-JP.yml +56 -0
  35. data/config/locales/ja.yml +56 -0
  36. data/config/locales/ko-KR.yml +1 -0
  37. data/config/locales/ko.yml +1 -0
  38. data/config/locales/lt-LT.yml +1 -0
  39. data/config/locales/lt.yml +1 -0
  40. data/config/locales/lv.yml +54 -0
  41. data/config/locales/mt-MT.yml +1 -0
  42. data/config/locales/mt.yml +1 -0
  43. data/config/locales/nl.yml +15 -0
  44. data/config/locales/om-ET.yml +1 -0
  45. data/config/locales/pl.yml +26 -10
  46. data/config/locales/pt-BR.yml +1 -1
  47. data/config/locales/pt.yml +26 -10
  48. data/config/locales/ro-RO.yml +56 -0
  49. data/config/locales/sk-SK.yml +47 -0
  50. data/config/locales/sk.yml +47 -0
  51. data/config/locales/sl.yml +5 -0
  52. data/config/locales/so-SO.yml +1 -0
  53. data/config/locales/sr-CS.yml +8 -0
  54. data/config/locales/sv.yml +15 -0
  55. data/config/locales/ti-ER.yml +1 -0
  56. data/config/locales/vi-VN.yml +1 -0
  57. data/config/locales/vi.yml +1 -0
  58. data/config/locales/zh-CN.yml +56 -0
  59. data/config/locales/zh-TW.yml +1 -0
  60. data/lib/decidim/dev.rb +2 -0
  61. data/lib/decidim/dev/assets/assemblies.json +816 -0
  62. data/lib/decidim/dev/assets/assemblies_with_null.json +135 -0
  63. data/lib/decidim/dev/assets/city.jpeg +0 -0
  64. data/lib/decidim/dev/assets/city2.jpeg +0 -0
  65. data/lib/decidim/dev/assets/city3.jpeg +0 -0
  66. data/lib/decidim/dev/assets/geocoder_result_here.json +72 -0
  67. data/lib/decidim/dev/assets/geocoder_result_osm.json +150 -0
  68. data/lib/decidim/dev/assets/import_participatory_space_private_users_nok.csv +2 -0
  69. data/lib/decidim/dev/dummy_translator.rb +32 -0
  70. data/lib/decidim/dev/test/base_spec_helper.rb +14 -0
  71. data/lib/decidim/dev/test/rspec_support/authorization.rb +3 -0
  72. data/lib/decidim/dev/test/rspec_support/capybara.rb +6 -2
  73. data/lib/decidim/dev/test/rspec_support/capybara_data_picker.rb +15 -5
  74. data/lib/decidim/dev/test/rspec_support/capybara_scopes_picker.rb +5 -5
  75. data/lib/decidim/dev/test/rspec_support/comments.rb +2 -2
  76. data/lib/decidim/dev/test/rspec_support/component.rb +104 -5
  77. data/lib/decidim/dev/test/rspec_support/component_context.rb +1 -2
  78. data/lib/decidim/dev/test/rspec_support/confirmation_helpers.rb +60 -0
  79. data/lib/decidim/dev/test/rspec_support/content_processing.rb +4 -4
  80. data/lib/decidim/dev/test/rspec_support/frontend.rb +20 -0
  81. data/lib/decidim/dev/test/rspec_support/geocoder.rb +150 -6
  82. data/lib/decidim/dev/test/rspec_support/helpers.rb +2 -2
  83. data/lib/decidim/dev/test/rspec_support/organization.rb +7 -0
  84. data/lib/decidim/dev/test/rspec_support/rake_tasks.rb +75 -0
  85. data/lib/decidim/dev/test/rspec_support/timezone.rb +7 -0
  86. data/lib/decidim/dev/test/rspec_support/translation_helpers.rb +2 -0
  87. data/lib/decidim/dev/version.rb +1 -1
  88. data/lib/tasks/generators.rake +2 -1
  89. data/lib/tasks/locale_checker.rake +1 -1
  90. metadata +91 -23
  91. data/lib/decidim/dev/test/rspec_support/capybara_proposals_picker.rb +0 -51
@@ -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