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.
- checksums.yaml +4 -4
- data/app/assets/images/decidim/dummy.svg +1 -4
- data/app/assets/images/decidim/gamification/badges/test.svg +1 -145
- data/app/commands/decidim/dummy_resources/create_dummy_resource.rb +48 -0
- data/app/controllers/decidim/dummy_resources/dummy_resources_controller.rb +1 -0
- data/app/forms/decidim/dummy_resources/dummy_resource_form.rb +3 -0
- data/app/views/decidim/dummy_resources/dummy_resources/show.html.erb +4 -0
- data/config/locales/am-ET.yml +1 -0
- data/config/locales/bg-BG.yml +56 -0
- data/config/locales/bg.yml +56 -0
- data/config/locales/ca.yml +15 -0
- data/config/locales/cs.yml +16 -1
- data/config/locales/da-DK.yml +1 -0
- data/config/locales/da.yml +1 -0
- data/config/locales/de.yml +16 -0
- data/config/locales/el.yml +56 -0
- data/config/locales/en.yml +15 -0
- data/config/locales/eo.yml +1 -0
- data/config/locales/es-MX.yml +15 -0
- data/config/locales/es-PY.yml +15 -0
- data/config/locales/es.yml +15 -0
- data/config/locales/et-EE.yml +1 -0
- data/config/locales/et.yml +1 -0
- data/config/locales/fi-plain.yml +15 -0
- data/config/locales/fi.yml +15 -0
- data/config/locales/fr-CA.yml +56 -0
- data/config/locales/fr.yml +15 -0
- data/config/locales/ga-IE.yml +1 -0
- data/config/locales/hr-HR.yml +1 -0
- data/config/locales/hr.yml +1 -0
- data/config/locales/hu.yml +9 -0
- data/config/locales/is.yml +21 -0
- data/config/locales/it.yml +17 -2
- data/config/locales/ja-JP.yml +56 -0
- data/config/locales/ja.yml +56 -0
- data/config/locales/ko-KR.yml +1 -0
- data/config/locales/ko.yml +1 -0
- data/config/locales/lt-LT.yml +1 -0
- data/config/locales/lt.yml +1 -0
- data/config/locales/lv.yml +54 -0
- data/config/locales/mt-MT.yml +1 -0
- data/config/locales/mt.yml +1 -0
- data/config/locales/nl.yml +15 -0
- data/config/locales/om-ET.yml +1 -0
- data/config/locales/pl.yml +26 -10
- data/config/locales/pt-BR.yml +1 -1
- data/config/locales/pt.yml +26 -10
- data/config/locales/ro-RO.yml +56 -0
- data/config/locales/sk-SK.yml +47 -0
- data/config/locales/sk.yml +47 -0
- data/config/locales/sl.yml +5 -0
- data/config/locales/so-SO.yml +1 -0
- data/config/locales/sr-CS.yml +8 -0
- data/config/locales/sv.yml +15 -0
- data/config/locales/ti-ER.yml +1 -0
- data/config/locales/vi-VN.yml +1 -0
- data/config/locales/vi.yml +1 -0
- data/config/locales/zh-CN.yml +56 -0
- data/config/locales/zh-TW.yml +1 -0
- data/lib/decidim/dev.rb +2 -0
- data/lib/decidim/dev/assets/assemblies.json +816 -0
- data/lib/decidim/dev/assets/assemblies_with_null.json +135 -0
- data/lib/decidim/dev/assets/city.jpeg +0 -0
- data/lib/decidim/dev/assets/city2.jpeg +0 -0
- data/lib/decidim/dev/assets/city3.jpeg +0 -0
- data/lib/decidim/dev/assets/geocoder_result_here.json +72 -0
- data/lib/decidim/dev/assets/geocoder_result_osm.json +150 -0
- data/lib/decidim/dev/assets/import_participatory_space_private_users_nok.csv +2 -0
- data/lib/decidim/dev/dummy_translator.rb +32 -0
- data/lib/decidim/dev/test/base_spec_helper.rb +14 -0
- data/lib/decidim/dev/test/rspec_support/authorization.rb +3 -0
- data/lib/decidim/dev/test/rspec_support/capybara.rb +6 -2
- data/lib/decidim/dev/test/rspec_support/capybara_data_picker.rb +15 -5
- data/lib/decidim/dev/test/rspec_support/capybara_scopes_picker.rb +5 -5
- data/lib/decidim/dev/test/rspec_support/comments.rb +2 -2
- data/lib/decidim/dev/test/rspec_support/component.rb +104 -5
- data/lib/decidim/dev/test/rspec_support/component_context.rb +1 -2
- data/lib/decidim/dev/test/rspec_support/confirmation_helpers.rb +60 -0
- data/lib/decidim/dev/test/rspec_support/content_processing.rb +4 -4
- data/lib/decidim/dev/test/rspec_support/frontend.rb +20 -0
- data/lib/decidim/dev/test/rspec_support/geocoder.rb +150 -6
- data/lib/decidim/dev/test/rspec_support/helpers.rb +2 -2
- data/lib/decidim/dev/test/rspec_support/organization.rb +7 -0
- data/lib/decidim/dev/test/rspec_support/rake_tasks.rb +75 -0
- data/lib/decidim/dev/test/rspec_support/timezone.rb +7 -0
- data/lib/decidim/dev/test/rspec_support/translation_helpers.rb +2 -0
- data/lib/decidim/dev/version.rb +1 -1
- data/lib/tasks/generators.rake +2 -1
- data/lib/tasks/locale_checker.rake +1 -1
- metadata +91 -23
- 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
|