decidim-dev 0.26.8 → 0.27.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/commands/decidim/dummy_resources/create_dummy_resource.rb +1 -1
- data/app/controllers/concerns/decidim/dev/needs_development_tools.rb +1 -1
- data/config/assets.rb +1 -2
- data/config/locales/am-ET.yml +1 -0
- data/config/locales/ar.yml +1 -18
- data/config/locales/bg.yml +1 -0
- data/config/locales/ca.yml +1 -6
- data/config/locales/cs.yml +1 -6
- data/config/locales/da.yml +1 -0
- data/config/locales/de.yml +1 -8
- data/config/locales/el.yml +1 -0
- data/config/locales/en.yml +0 -6
- data/config/locales/eo.yml +1 -0
- data/config/locales/es-MX.yml +1 -6
- data/config/locales/es-PY.yml +1 -6
- data/config/locales/es.yml +1 -6
- data/config/locales/et.yml +1 -0
- data/config/locales/eu.yml +1 -0
- data/config/locales/fi-plain.yml +1 -6
- data/config/locales/fi.yml +1 -6
- data/config/locales/fr-CA.yml +1 -6
- data/config/locales/fr.yml +1 -6
- data/config/locales/ga-IE.yml +1 -0
- data/config/locales/gl.yml +1 -0
- data/config/locales/hr.yml +1 -0
- data/config/locales/hu.yml +1 -0
- data/config/locales/id-ID.yml +1 -0
- data/config/locales/is-IS.yml +2 -1
- data/config/locales/it.yml +1 -0
- data/config/locales/ja.yml +1 -6
- data/config/locales/ko.yml +1 -0
- data/config/locales/lb.yml +1 -0
- data/config/locales/lt.yml +1 -63
- data/config/locales/lv.yml +1 -0
- data/config/locales/mt.yml +1 -0
- data/config/locales/nl.yml +1 -0
- data/config/locales/no.yml +1 -0
- data/config/locales/om-ET.yml +1 -0
- data/config/locales/pl.yml +1 -0
- data/config/locales/pt-BR.yml +2 -1
- data/config/locales/pt.yml +1 -0
- data/config/locales/ro-RO.yml +1 -6
- data/config/locales/ru.yml +1 -0
- data/config/locales/si-LK.yml +1 -0
- data/config/locales/sk.yml +1 -0
- data/config/locales/sl.yml +1 -0
- data/config/locales/so-SO.yml +1 -0
- data/config/locales/sr-CS.yml +1 -0
- data/config/locales/sv.yml +1 -1
- data/config/locales/sw-KE.yml +1 -0
- data/config/locales/ti-ER.yml +1 -0
- data/config/locales/tr-TR.yml +1 -0
- data/config/locales/uk.yml +1 -0
- data/config/locales/val-ES.yml +1 -0
- data/config/locales/vi.yml +1 -0
- data/config/locales/zh-CN.yml +1 -0
- data/config/locales/zh-TW.yml +1 -63
- data/lib/decidim/dev/assets/assemblies.json +1 -11
- data/lib/decidim/dev/assets/geocoder_result_here.json +46 -67
- data/lib/decidim/dev/assets/logo.png +0 -0
- data/lib/decidim/dev/common_rake.rb +1 -0
- data/lib/decidim/dev/railtie.rb +1 -1
- data/lib/decidim/dev/test/base_spec_helper.rb +2 -1
- data/lib/decidim/dev/test/rspec_support/accessibility_examples.rb +1 -3
- data/lib/decidim/dev/test/rspec_support/attachment_helpers.rb +30 -0
- data/lib/decidim/dev/test/rspec_support/autocomplete_select.rb +23 -0
- data/lib/decidim/dev/test/rspec_support/capybara.rb +43 -5
- data/lib/decidim/dev/test/rspec_support/comments.rb +1 -1
- data/lib/decidim/dev/test/rspec_support/component.rb +5 -5
- data/lib/decidim/dev/test/rspec_support/component_context.rb +0 -20
- data/lib/decidim/dev/test/rspec_support/controller_example_group.rb +27 -0
- data/lib/decidim/dev/test/rspec_support/cookies.rb +41 -0
- data/lib/decidim/dev/test/rspec_support/dynamic_attach.rb +31 -0
- data/lib/decidim/dev/test/rspec_support/frontend.rb +1 -1
- data/lib/decidim/dev/test/rspec_support/geocoder.rb +6 -2
- data/lib/decidim/dev/test/rspec_support/helpers.rb +0 -12
- data/lib/decidim/dev/test/rspec_support/html_matchers.rb +11 -0
- data/lib/decidim/dev/test/rspec_support/imports_controller_shared_examples.rb +3 -8
- data/lib/decidim/dev/test/rspec_support/network_conditions_helpers.rb +18 -0
- data/lib/decidim/dev/test/rspec_support/rake_tasks.rb +0 -2
- data/lib/decidim/dev/test/rspec_support/screenshot_helper.rb +41 -0
- data/lib/decidim/dev/test/rspec_support/warden.rb +5 -0
- data/lib/decidim/dev/test/rspec_support/wicked_pdf_assets_mock.rb +4 -0
- data/lib/decidim/dev/test/spec_helper.rb +2 -4
- data/lib/decidim/dev/test/w3c_rspec_validators_overrides.rb +0 -2
- data/lib/decidim/dev/version.rb +1 -1
- data/lib/decidim-dev.rb +1 -1
- data/lib/tasks/generators.rake +6 -2
- data/lib/tasks/lighthouse_report.rake +29 -0
- data/lib/tasks/locale_checker.rake +1 -1
- metadata +48 -53
- data/app/packs/entrypoints/decidim_dev_test_custom_map.js +0 -1
- data/app/packs/src/decidim/dev/test/custom_map_factory.js +0 -55
- data/config/environment.rb +0 -0
- data/config/locales/fa-IR.yml +0 -1
- data/config/locales/gn-PY.yml +0 -1
- data/config/locales/ka-GE.yml +0 -1
- data/config/locales/kaa.yml +0 -1
- data/config/locales/lo-LA.yml +0 -1
- data/config/locales/oc-FR.yml +0 -1
- data/lib/decidim/dev/test/rspec_support/react_select.rb +0 -29
- data/lib/decidim/dev/test/rspec_support/summary_notification.rb +0 -51
- data/lib/rubocop/cop/decidim/hash_shorthand_syntax_backports.rb +0 -175
- data/lib/rubocop/cop/decidim.rb +0 -9
@@ -19,14 +19,9 @@ shared_examples "admin imports controller" do
|
|
19
19
|
end
|
20
20
|
|
21
21
|
describe "POST create" do
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
Rack::Test::UploadedFile.new(
|
26
|
-
Decidim::Dev.test_file("import_proposals.csv", "text/csv"),
|
27
|
-
"text/csv"
|
28
|
-
)
|
29
|
-
end
|
22
|
+
# The file does not really matter for the dummies creator because it
|
23
|
+
# will always create a record for each data row regardless of the data.
|
24
|
+
let(:file) { upload_test_file(Decidim::Dev.test_file("import_proposals.csv", "text/csv")) }
|
30
25
|
let(:params) do
|
31
26
|
default_params.merge(extra_params).merge(file: file)
|
32
27
|
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module NetworkConditionsHelpers
|
4
|
+
def with_browser_in_offline_mode
|
5
|
+
page.driver.browser.network_conditions = { offline: true }
|
6
|
+
|
7
|
+
# Wait for the browser to be offline
|
8
|
+
sleep 1
|
9
|
+
|
10
|
+
yield
|
11
|
+
|
12
|
+
page.driver.browser.network_conditions = { offline: false }
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
RSpec.configure do |config|
|
17
|
+
config.include NetworkConditionsHelpers, type: :system
|
18
|
+
end
|
@@ -32,7 +32,6 @@ module RakeTaskOutputHelpers
|
|
32
32
|
included do
|
33
33
|
let!(:original_stdout) { $stdout }
|
34
34
|
|
35
|
-
# rubocop:disable RSpec/ExpectOutput
|
36
35
|
before do
|
37
36
|
$stdout = StringIO.new
|
38
37
|
end
|
@@ -40,7 +39,6 @@ module RakeTaskOutputHelpers
|
|
40
39
|
after do
|
41
40
|
$stdout = original_stdout
|
42
41
|
end
|
43
|
-
# rubocop:enable RSpec/ExpectOutput
|
44
42
|
end
|
45
43
|
|
46
44
|
def check_no_errors_have_been_printed
|
@@ -0,0 +1,41 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "action_dispatch/system_testing/test_helpers/screenshot_helper"
|
4
|
+
|
5
|
+
module ActionDispatch
|
6
|
+
module SystemTesting
|
7
|
+
module TestHelpers
|
8
|
+
module ScreenshotHelper
|
9
|
+
private
|
10
|
+
|
11
|
+
# Customize the screenshot helper to fix the file paths for examples that have
|
12
|
+
# unallowed characters in them. Otherwise the artefacts creation and upload
|
13
|
+
# fails at GitHub actions. See the list of unallowed characters from:
|
14
|
+
# https://github.com/actions/toolkit/blob/main/packages/artifact/docs/additional-information.md#non-supported-characters
|
15
|
+
def image_name
|
16
|
+
# By default, this only cleans up the forward and backward slash characters.
|
17
|
+
sanitized_method_name = method_name.tr("/\\()\":<>|*?", "-----------")
|
18
|
+
name = "#{unique}_#{sanitized_method_name}"
|
19
|
+
name[0...225]
|
20
|
+
end
|
21
|
+
|
22
|
+
# Add the file URI scheme so terminal emulators can open one click
|
23
|
+
def display_image
|
24
|
+
message = +"[Screenshot Image]: file://#{image_path}\n"
|
25
|
+
message << +"[Screenshot HTML]: file://#{html_path}\n" if save_html?
|
26
|
+
|
27
|
+
case output_type
|
28
|
+
when "artifact"
|
29
|
+
message << "\e]1338;url=artifact://#{absolute_image_path}\a\n"
|
30
|
+
when "inline"
|
31
|
+
name = inline_base64(File.basename(absolute_image_path))
|
32
|
+
image = inline_base64(File.read(absolute_image_path))
|
33
|
+
message << "\e]1337;File=name=#{name};height=400px;inline=1:#{image}\a\n"
|
34
|
+
end
|
35
|
+
|
36
|
+
message
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
@@ -18,6 +18,7 @@ end
|
|
18
18
|
|
19
19
|
RSpec.configure do |config|
|
20
20
|
config.include Decidim::WardenTestHelpers, type: :system
|
21
|
+
config.include Decidim::WardenTestHelpers, type: :request
|
21
22
|
config.include Devise::Test::ControllerHelpers, type: :controller
|
22
23
|
|
23
24
|
config.before :each, type: :cell do
|
@@ -30,4 +31,8 @@ RSpec.configure do |config|
|
|
30
31
|
config.after :each, type: :system do
|
31
32
|
Warden.test_reset!
|
32
33
|
end
|
34
|
+
|
35
|
+
config.after :each, type: :request do
|
36
|
+
Warden.test_reset!
|
37
|
+
end
|
33
38
|
end
|
@@ -8,6 +8,10 @@ class WickedPdf
|
|
8
8
|
def wicked_pdf_stylesheet_pack_tag(*sources)
|
9
9
|
stylesheet_pack_tag(*sources)
|
10
10
|
end
|
11
|
+
|
12
|
+
# Disables the images in the PDFs as those requests would be jamming under
|
13
|
+
# the test environment
|
14
|
+
def wicked_pdf_image_tag(img, options = {}); end
|
11
15
|
end
|
12
16
|
end
|
13
17
|
end
|
@@ -4,7 +4,6 @@ require "rails-controller-testing"
|
|
4
4
|
require "rspec/rails"
|
5
5
|
require "rspec/cells"
|
6
6
|
require "byebug"
|
7
|
-
require "rectify/rspec"
|
8
7
|
require "wisper/rspec/stub_wisper_publisher"
|
9
8
|
require "db-query-matchers"
|
10
9
|
require "action_view/helpers/sanitize_helper"
|
@@ -14,13 +13,13 @@ require "decidim/dev/test/w3c_rspec_validators_overrides"
|
|
14
13
|
|
15
14
|
# Requires supporting files with custom matchers and macros, etc,
|
16
15
|
# in ./rspec_support/ and its subdirectories.
|
17
|
-
Dir["#{__dir__}/rspec_support/**/*.rb"].
|
16
|
+
Dir["#{__dir__}/rspec_support/**/*.rb"].each { |f| require f }
|
18
17
|
|
19
18
|
require_relative "factories"
|
20
19
|
|
21
20
|
RSpec.configure do |config|
|
22
21
|
config.color = true
|
23
|
-
config.fail_fast = ENV
|
22
|
+
config.fail_fast = ENV.fetch("FAIL_FAST", nil) == "true"
|
24
23
|
config.infer_spec_type_from_file_location!
|
25
24
|
config.mock_with :rspec
|
26
25
|
config.order = :random
|
@@ -32,7 +31,6 @@ RSpec.configure do |config|
|
|
32
31
|
# instead of true.
|
33
32
|
config.use_transactional_fixtures = true
|
34
33
|
|
35
|
-
config.include Rectify::RSpec::Helpers
|
36
34
|
config.include ActionView::Helpers::SanitizeHelper
|
37
35
|
config.include ERB::Util
|
38
36
|
end
|
@@ -36,12 +36,10 @@ end
|
|
36
36
|
# This allows us to dynamically load the validator URL from the ENV.
|
37
37
|
module W3cRspecValidators
|
38
38
|
class Config
|
39
|
-
# rubocop:disable Naming/MemoizedInstanceVariableName
|
40
39
|
def self.get
|
41
40
|
@config ||= {
|
42
41
|
w3c_service_uri: ENV.fetch("VALIDATOR_HTML_URI", "https://validator.w3.org/nu/")
|
43
42
|
}.stringify_keys
|
44
43
|
end
|
45
|
-
# rubocop:enable Naming/MemoizedInstanceVariableName
|
46
44
|
end
|
47
45
|
end
|
data/lib/decidim/dev/version.rb
CHANGED
data/lib/decidim-dev.rb
CHANGED
data/lib/tasks/generators.rake
CHANGED
@@ -32,7 +32,9 @@ namespace :decidim do
|
|
32
32
|
"--skip_spring",
|
33
33
|
"--demo",
|
34
34
|
"--force_ssl",
|
35
|
-
"false"
|
35
|
+
"false",
|
36
|
+
"--locales",
|
37
|
+
"en,ca,es"
|
36
38
|
)
|
37
39
|
end
|
38
40
|
|
@@ -48,7 +50,9 @@ namespace :decidim do
|
|
48
50
|
"--recreate_db",
|
49
51
|
"--seed_db",
|
50
52
|
"--demo",
|
51
|
-
"--profiling"
|
53
|
+
"--profiling",
|
54
|
+
"--locales",
|
55
|
+
"en,ca,es"
|
52
56
|
)
|
53
57
|
end
|
54
58
|
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
namespace :decidim do
|
4
|
+
namespace :lighthouse do
|
5
|
+
desc "Prepares seeds for Lighthouse report"
|
6
|
+
task prepare_urls: :environment do
|
7
|
+
# Lighhouse report is executed in CI and should check:
|
8
|
+
# - homepage
|
9
|
+
# - a participatory process page
|
10
|
+
# - a meeting page
|
11
|
+
# - a proposal page
|
12
|
+
#
|
13
|
+
# Because seeds make urls dynamic, this task updates the lighthouse configuration
|
14
|
+
# to add dynamically the urls to check.
|
15
|
+
|
16
|
+
host = "http://localhost:3000"
|
17
|
+
urls = ["/"]
|
18
|
+
urls << ::Decidim::ResourceLocatorPresenter.new(Decidim::ParticipatoryProcess.published.first).path
|
19
|
+
urls << ::Decidim::ResourceLocatorPresenter.new(Decidim::Meetings::Meeting.published.first).path
|
20
|
+
urls << ::Decidim::ResourceLocatorPresenter.new(Decidim::Proposals::Proposal.published.first).path
|
21
|
+
|
22
|
+
# Update lighthouse configuration with the urls
|
23
|
+
lighthouse_rc_path = Rails.root.join("../.lighthouserc.json")
|
24
|
+
lighthouserc = JSON.parse(File.read(lighthouse_rc_path))
|
25
|
+
lighthouserc["ci"]["collect"]["url"] = urls.map { |url| "#{host}#{url}" }
|
26
|
+
File.write(lighthouse_rc_path, lighthouserc.to_json)
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -5,7 +5,7 @@ namespace :decidim do
|
|
5
5
|
task check_locales: :environment do
|
6
6
|
FileUtils.remove_dir("tmp/decidim_repo", true)
|
7
7
|
|
8
|
-
branch = ENV
|
8
|
+
branch = ENV.fetch("TARGET_BRANCH", nil) || "develop"
|
9
9
|
status = system("git clone --depth=1 --single-branch --branch #{branch} https://github.com/decidim/decidim tmp/decidim_repo")
|
10
10
|
return unless status
|
11
11
|
|
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.
|
4
|
+
version: 0.27.0.rc1
|
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:
|
13
|
+
date: 2022-06-27 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.
|
35
|
+
version: 0.27.0.rc1
|
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.
|
42
|
+
version: 0.27.0.rc1
|
43
43
|
- !ruby/object:Gem::Dependency
|
44
44
|
name: factory_bot_rails
|
45
45
|
requirement: !ruby/object:Gem::Requirement
|
@@ -144,14 +144,28 @@ dependencies:
|
|
144
144
|
requirements:
|
145
145
|
- - "~>"
|
146
146
|
- !ruby/object:Gem::Version
|
147
|
-
version: '1.
|
147
|
+
version: '1.13'
|
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: '1.
|
154
|
+
version: '1.13'
|
155
|
+
- !ruby/object:Gem::Dependency
|
156
|
+
name: parallel_tests
|
157
|
+
requirement: !ruby/object:Gem::Requirement
|
158
|
+
requirements:
|
159
|
+
- - "~>"
|
160
|
+
- !ruby/object:Gem::Version
|
161
|
+
version: '3.7'
|
162
|
+
type: :runtime
|
163
|
+
prerelease: false
|
164
|
+
version_requirements: !ruby/object:Gem::Requirement
|
165
|
+
requirements:
|
166
|
+
- - "~>"
|
167
|
+
- !ruby/object:Gem::Version
|
168
|
+
version: '3.7'
|
155
169
|
- !ruby/object:Gem::Dependency
|
156
170
|
name: puma
|
157
171
|
requirement: !ruby/object:Gem::Requirement
|
@@ -186,14 +200,14 @@ dependencies:
|
|
186
200
|
requirements:
|
187
201
|
- - "~>"
|
188
202
|
- !ruby/object:Gem::Version
|
189
|
-
version: 0.3.
|
203
|
+
version: 0.3.7
|
190
204
|
type: :runtime
|
191
205
|
prerelease: false
|
192
206
|
version_requirements: !ruby/object:Gem::Requirement
|
193
207
|
requirements:
|
194
208
|
- - "~>"
|
195
209
|
- !ruby/object:Gem::Version
|
196
|
-
version: 0.3.
|
210
|
+
version: 0.3.7
|
197
211
|
- !ruby/object:Gem::Dependency
|
198
212
|
name: rspec-html-matchers
|
199
213
|
requirement: !ruby/object:Gem::Requirement
|
@@ -256,98 +270,84 @@ dependencies:
|
|
256
270
|
requirements:
|
257
271
|
- - "~>"
|
258
272
|
- !ruby/object:Gem::Version
|
259
|
-
version:
|
273
|
+
version: 1.28.0
|
260
274
|
type: :runtime
|
261
275
|
prerelease: false
|
262
276
|
version_requirements: !ruby/object:Gem::Requirement
|
263
277
|
requirements:
|
264
278
|
- - "~>"
|
265
279
|
- !ruby/object:Gem::Version
|
266
|
-
version:
|
280
|
+
version: 1.28.0
|
267
281
|
- !ruby/object:Gem::Dependency
|
268
282
|
name: rubocop-rails
|
269
283
|
requirement: !ruby/object:Gem::Requirement
|
270
284
|
requirements:
|
271
285
|
- - "~>"
|
272
286
|
- !ruby/object:Gem::Version
|
273
|
-
version: '2.
|
287
|
+
version: '2.14'
|
274
288
|
type: :runtime
|
275
289
|
prerelease: false
|
276
290
|
version_requirements: !ruby/object:Gem::Requirement
|
277
291
|
requirements:
|
278
292
|
- - "~>"
|
279
293
|
- !ruby/object:Gem::Version
|
280
|
-
version: '2.
|
294
|
+
version: '2.14'
|
281
295
|
- !ruby/object:Gem::Dependency
|
282
296
|
name: rubocop-rspec
|
283
297
|
requirement: !ruby/object:Gem::Requirement
|
284
298
|
requirements:
|
285
|
-
- -
|
299
|
+
- - "~>"
|
286
300
|
- !ruby/object:Gem::Version
|
287
|
-
version:
|
301
|
+
version: '2.10'
|
288
302
|
type: :runtime
|
289
303
|
prerelease: false
|
290
304
|
version_requirements: !ruby/object:Gem::Requirement
|
291
305
|
requirements:
|
292
|
-
- -
|
306
|
+
- - "~>"
|
293
307
|
- !ruby/object:Gem::Version
|
294
|
-
version:
|
308
|
+
version: '2.10'
|
295
309
|
- !ruby/object:Gem::Dependency
|
296
310
|
name: selenium-webdriver
|
297
311
|
requirement: !ruby/object:Gem::Requirement
|
298
312
|
requirements:
|
299
313
|
- - "~>"
|
300
314
|
- !ruby/object:Gem::Version
|
301
|
-
version:
|
315
|
+
version: 4.1.0
|
302
316
|
type: :runtime
|
303
317
|
prerelease: false
|
304
318
|
version_requirements: !ruby/object:Gem::Requirement
|
305
319
|
requirements:
|
306
320
|
- - "~>"
|
307
321
|
- !ruby/object:Gem::Version
|
308
|
-
version:
|
322
|
+
version: 4.1.0
|
309
323
|
- !ruby/object:Gem::Dependency
|
310
324
|
name: simplecov
|
311
325
|
requirement: !ruby/object:Gem::Requirement
|
312
326
|
requirements:
|
313
327
|
- - "~>"
|
314
328
|
- !ruby/object:Gem::Version
|
315
|
-
version: 0.
|
329
|
+
version: 0.21.0
|
316
330
|
type: :runtime
|
317
331
|
prerelease: false
|
318
332
|
version_requirements: !ruby/object:Gem::Requirement
|
319
333
|
requirements:
|
320
334
|
- - "~>"
|
321
335
|
- !ruby/object:Gem::Version
|
322
|
-
version: 0.
|
336
|
+
version: 0.21.0
|
323
337
|
- !ruby/object:Gem::Dependency
|
324
338
|
name: simplecov-cobertura
|
325
339
|
requirement: !ruby/object:Gem::Requirement
|
326
340
|
requirements:
|
327
341
|
- - "~>"
|
328
342
|
- !ruby/object:Gem::Version
|
329
|
-
version: 1.
|
330
|
-
type: :runtime
|
331
|
-
prerelease: false
|
332
|
-
version_requirements: !ruby/object:Gem::Requirement
|
333
|
-
requirements:
|
334
|
-
- - "~>"
|
335
|
-
- !ruby/object:Gem::Version
|
336
|
-
version: 1.3.1
|
337
|
-
- !ruby/object:Gem::Dependency
|
338
|
-
name: system_test_html_screenshots
|
339
|
-
requirement: !ruby/object:Gem::Requirement
|
340
|
-
requirements:
|
341
|
-
- - "~>"
|
342
|
-
- !ruby/object:Gem::Version
|
343
|
-
version: '0.2'
|
343
|
+
version: 2.1.0
|
344
344
|
type: :runtime
|
345
345
|
prerelease: false
|
346
346
|
version_requirements: !ruby/object:Gem::Requirement
|
347
347
|
requirements:
|
348
348
|
- - "~>"
|
349
349
|
- !ruby/object:Gem::Version
|
350
|
-
version:
|
350
|
+
version: 2.1.0
|
351
351
|
- !ruby/object:Gem::Dependency
|
352
352
|
name: w3c_rspec_validators
|
353
353
|
requirement: !ruby/object:Gem::Requirement
|
@@ -408,18 +408,15 @@ files:
|
|
408
408
|
- app/mailers/decidim/dummy_resources/dummy_resource_mailer.rb
|
409
409
|
- app/packs/entrypoints/decidim_dev.js
|
410
410
|
- app/packs/entrypoints/decidim_dev.scss
|
411
|
-
- app/packs/entrypoints/decidim_dev_test_custom_map.js
|
412
411
|
- app/packs/images/decidim/decidim_dev_dummy.svg
|
413
412
|
- app/packs/images/decidim/gamification/badges/decidim_gamification_badges_test.svg
|
414
413
|
- app/packs/src/decidim/dev/accessibility.js
|
415
|
-
- app/packs/src/decidim/dev/test/custom_map_factory.js
|
416
414
|
- app/packs/stylesheets/decidim/dev.scss
|
417
415
|
- app/packs/stylesheets/decidim/dev/_accessibility.scss
|
418
416
|
- app/views/decidim/dummy_resource/_linked_dummys.html.erb
|
419
417
|
- app/views/decidim/dummy_resources/dummy_resources/foo.html.erb
|
420
418
|
- app/views/decidim/dummy_resources/dummy_resources/show.html.erb
|
421
419
|
- config/assets.rb
|
422
|
-
- config/environment.rb
|
423
420
|
- config/locales/am-ET.yml
|
424
421
|
- config/locales/ar-SA.yml
|
425
422
|
- config/locales/ar.yml
|
@@ -442,7 +439,6 @@ files:
|
|
442
439
|
- config/locales/et-EE.yml
|
443
440
|
- config/locales/et.yml
|
444
441
|
- config/locales/eu.yml
|
445
|
-
- config/locales/fa-IR.yml
|
446
442
|
- config/locales/fi-pl.yml
|
447
443
|
- config/locales/fi-plain.yml
|
448
444
|
- config/locales/fi.yml
|
@@ -451,7 +447,6 @@ files:
|
|
451
447
|
- config/locales/fr.yml
|
452
448
|
- config/locales/ga-IE.yml
|
453
449
|
- config/locales/gl.yml
|
454
|
-
- config/locales/gn-PY.yml
|
455
450
|
- config/locales/hr-HR.yml
|
456
451
|
- config/locales/hr.yml
|
457
452
|
- config/locales/hu.yml
|
@@ -460,13 +455,10 @@ files:
|
|
460
455
|
- config/locales/is.yml
|
461
456
|
- config/locales/it.yml
|
462
457
|
- config/locales/ja.yml
|
463
|
-
- config/locales/ka-GE.yml
|
464
|
-
- config/locales/kaa.yml
|
465
458
|
- config/locales/ko-KR.yml
|
466
459
|
- config/locales/ko.yml
|
467
460
|
- config/locales/lb-LU.yml
|
468
461
|
- config/locales/lb.yml
|
469
|
-
- config/locales/lo-LA.yml
|
470
462
|
- config/locales/lt-LT.yml
|
471
463
|
- config/locales/lt.yml
|
472
464
|
- config/locales/lv.yml
|
@@ -474,7 +466,6 @@ files:
|
|
474
466
|
- config/locales/mt.yml
|
475
467
|
- config/locales/nl.yml
|
476
468
|
- config/locales/no.yml
|
477
|
-
- config/locales/oc-FR.yml
|
478
469
|
- config/locales/om-ET.yml
|
479
470
|
- config/locales/pl.yml
|
480
471
|
- config/locales/pt-BR.yml
|
@@ -528,6 +519,7 @@ files:
|
|
528
519
|
- lib/decidim/dev/assets/import_voting_census_without_headers.csv
|
529
520
|
- lib/decidim/dev/assets/invalid.jpeg
|
530
521
|
- lib/decidim/dev/assets/iso-8859-15.md
|
522
|
+
- lib/decidim/dev/assets/logo.png
|
531
523
|
- lib/decidim/dev/assets/malicious.jpg
|
532
524
|
- lib/decidim/dev/assets/participatory_processes.json
|
533
525
|
- lib/decidim/dev/assets/participatory_processes_with_null.json
|
@@ -556,6 +548,7 @@ files:
|
|
556
548
|
- lib/decidim/dev/test/rspec_support/active_job.rb
|
557
549
|
- lib/decidim/dev/test/rspec_support/attachment_helpers.rb
|
558
550
|
- lib/decidim/dev/test/rspec_support/authorization.rb
|
551
|
+
- lib/decidim/dev/test/rspec_support/autocomplete_select.rb
|
559
552
|
- lib/decidim/dev/test/rspec_support/caching.rb
|
560
553
|
- lib/decidim/dev/test/rspec_support/capybara.rb
|
561
554
|
- lib/decidim/dev/test/rspec_support/capybara_data_picker.rb
|
@@ -566,6 +559,9 @@ files:
|
|
566
559
|
- lib/decidim/dev/test/rspec_support/component_context.rb
|
567
560
|
- lib/decidim/dev/test/rspec_support/confirmation_helpers.rb
|
568
561
|
- lib/decidim/dev/test/rspec_support/content_processing.rb
|
562
|
+
- lib/decidim/dev/test/rspec_support/controller_example_group.rb
|
563
|
+
- lib/decidim/dev/test/rspec_support/cookies.rb
|
564
|
+
- lib/decidim/dev/test/rspec_support/dynamic_attach.rb
|
569
565
|
- lib/decidim/dev/test/rspec_support/factory_bot.rb
|
570
566
|
- lib/decidim/dev/test/rspec_support/frontend.rb
|
571
567
|
- lib/decidim/dev/test/rspec_support/gamification.rb
|
@@ -574,13 +570,13 @@ files:
|
|
574
570
|
- lib/decidim/dev/test/rspec_support/html_matchers.rb
|
575
571
|
- lib/decidim/dev/test/rspec_support/imports_controller_shared_examples.rb
|
576
572
|
- lib/decidim/dev/test/rspec_support/migration.rb
|
573
|
+
- lib/decidim/dev/test/rspec_support/network_conditions_helpers.rb
|
577
574
|
- lib/decidim/dev/test/rspec_support/orderly_matchers.rb
|
578
575
|
- lib/decidim/dev/test/rspec_support/organization.rb
|
579
576
|
- lib/decidim/dev/test/rspec_support/permissions_shared_examples.rb
|
580
577
|
- lib/decidim/dev/test/rspec_support/rake_tasks.rb
|
581
|
-
- lib/decidim/dev/test/rspec_support/react_select.rb
|
582
578
|
- lib/decidim/dev/test/rspec_support/route_helpers.rb
|
583
|
-
- lib/decidim/dev/test/rspec_support/
|
579
|
+
- lib/decidim/dev/test/rspec_support/screenshot_helper.rb
|
584
580
|
- lib/decidim/dev/test/rspec_support/time_helpers.rb
|
585
581
|
- lib/decidim/dev/test/rspec_support/timezone.rb
|
586
582
|
- lib/decidim/dev/test/rspec_support/translation_helpers.rb
|
@@ -592,9 +588,8 @@ files:
|
|
592
588
|
- lib/decidim/dev/test/spec_helper.rb
|
593
589
|
- lib/decidim/dev/test/w3c_rspec_validators_overrides.rb
|
594
590
|
- lib/decidim/dev/version.rb
|
595
|
-
- lib/rubocop/cop/decidim.rb
|
596
|
-
- lib/rubocop/cop/decidim/hash_shorthand_syntax_backports.rb
|
597
591
|
- lib/tasks/generators.rake
|
592
|
+
- lib/tasks/lighthouse_report.rake
|
598
593
|
- lib/tasks/locale_checker.rake
|
599
594
|
homepage: https://github.com/decidim/decidim
|
600
595
|
licenses:
|
@@ -608,14 +603,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
608
603
|
requirements:
|
609
604
|
- - ">="
|
610
605
|
- !ruby/object:Gem::Version
|
611
|
-
version: '
|
606
|
+
version: '3.0'
|
612
607
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
613
608
|
requirements:
|
614
|
-
- - "
|
609
|
+
- - ">"
|
615
610
|
- !ruby/object:Gem::Version
|
616
|
-
version:
|
611
|
+
version: 1.3.1
|
617
612
|
requirements: []
|
618
|
-
rubygems_version: 3.
|
613
|
+
rubygems_version: 3.2.22
|
619
614
|
signing_key:
|
620
615
|
specification_version: 4
|
621
616
|
summary: Decidim dev tools
|
@@ -1 +0,0 @@
|
|
1
|
-
import "src/decidim/dev/test/custom_map_factory";
|
@@ -1,55 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* Example of a custom map controller and how to override the
|
3
|
-
* `createMapController` factory method. To use it in the ERB view, add the
|
4
|
-
* following snippet to any view:
|
5
|
-
*
|
6
|
-
* <%= dynamic_map_for type: "custom", markers: [{ title: "Test 1", latitude: 41.385063, longitude: 2.173404 }], popup_template_id: "custom-popup" do %>
|
7
|
-
* <% javascript_pack_tag("decidim_dev_test_custom_map") %>
|
8
|
-
* <template id="custom-popup">
|
9
|
-
* <div>
|
10
|
-
* <h3>${title}</h3>
|
11
|
-
* </div>
|
12
|
-
* </template>
|
13
|
-
* <% end %>
|
14
|
-
*/
|
15
|
-
|
16
|
-
import MapMarkersController from "src/decidim/map/controller/markers";
|
17
|
-
|
18
|
-
const appendToBody = (content) => {
|
19
|
-
const p = document.createElement("p");
|
20
|
-
p.innerHTML = content;
|
21
|
-
document.body.appendChild(p);
|
22
|
-
}
|
23
|
-
|
24
|
-
class CustomMapController extends MapMarkersController {
|
25
|
-
start() {
|
26
|
-
this.markerClusters = null;
|
27
|
-
this.addMarkers(this.config.markers);
|
28
|
-
|
29
|
-
appendToBody("Custom map started");
|
30
|
-
}
|
31
|
-
}
|
32
|
-
|
33
|
-
const origCreateMapController = window.Decidim.createMapController;
|
34
|
-
|
35
|
-
const createMapController = (mapId, config) => {
|
36
|
-
if (config.type === "custom") {
|
37
|
-
return new CustomMapController(mapId, config);
|
38
|
-
}
|
39
|
-
|
40
|
-
return origCreateMapController(mapId, config);
|
41
|
-
}
|
42
|
-
|
43
|
-
window.Decidim.createMapController = createMapController;
|
44
|
-
|
45
|
-
// Prevent external requests to the Here URLs during tests
|
46
|
-
if (L.TileLayer.HERE) {
|
47
|
-
L.TileLayer.HERE.prototype.onAdd = function(map) {};
|
48
|
-
}
|
49
|
-
|
50
|
-
// Test that the map events are working correctly
|
51
|
-
$("[data-decidim-map]").on("ready.decidim", (ev, _map, mapConfig) => {
|
52
|
-
appendToBody("Custom map ready");
|
53
|
-
});
|
54
|
-
|
55
|
-
appendToBody("LOADED");
|
data/config/environment.rb
DELETED
File without changes
|
data/config/locales/fa-IR.yml
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
fa:
|
data/config/locales/gn-PY.yml
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
gn:
|
data/config/locales/ka-GE.yml
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
ka:
|
data/config/locales/kaa.yml
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
kaa:
|
data/config/locales/lo-LA.yml
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
lo:
|
data/config/locales/oc-FR.yml
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
oc:
|