decidim-dev 0.30.6 → 0.31.0.rc1

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 (96) hide show
  1. checksums.yaml +4 -4
  2. data/app/models/decidim/dev/dummy_resource.rb +2 -6
  3. data/app/packs/entrypoints/decidim_dev.scss +1 -1
  4. data/app/packs/src/decidim/dev/accessibility.js +2 -2
  5. data/app/packs/stylesheets/decidim/dev.scss +4 -4
  6. data/app/presenters/decidim/dev/dummy_resource_presenter.rb +2 -2
  7. data/config/assets.rb +2 -2
  8. data/config/locales/ar.yml +0 -2
  9. data/config/locales/bg.yml +0 -2
  10. data/config/locales/bs-BA.yml +0 -8
  11. data/config/locales/ca-IT.yml +3 -3
  12. data/config/locales/ca.yml +3 -3
  13. data/config/locales/cs.yml +2 -2
  14. data/config/locales/de.yml +2 -2
  15. data/config/locales/el.yml +2 -14
  16. data/config/locales/en.yml +2 -2
  17. data/config/locales/es-MX.yml +2 -2
  18. data/config/locales/es-PY.yml +2 -2
  19. data/config/locales/es.yml +2 -2
  20. data/config/locales/eu.yml +10 -10
  21. data/config/locales/fi-plain.yml +2 -2
  22. data/config/locales/fi.yml +2 -2
  23. data/config/locales/fr-CA.yml +0 -2
  24. data/config/locales/fr.yml +0 -2
  25. data/config/locales/gl.yml +0 -2
  26. data/config/locales/hu.yml +0 -2
  27. data/config/locales/it.yml +0 -2
  28. data/config/locales/ja.yml +2 -2
  29. data/config/locales/lt.yml +0 -2
  30. data/config/locales/lv.yml +0 -2
  31. data/config/locales/nl.yml +0 -2
  32. data/config/locales/no.yml +0 -2
  33. data/config/locales/pl.yml +0 -2
  34. data/config/locales/pt-BR.yml +0 -2
  35. data/config/locales/pt.yml +0 -2
  36. data/config/locales/ro-RO.yml +9 -16
  37. data/config/locales/sk.yml +0 -2
  38. data/config/locales/sr-CS.yml +0 -8
  39. data/config/locales/sv.yml +2 -2
  40. data/config/locales/tr-TR.yml +0 -2
  41. data/config/locales/zh-CN.yml +0 -2
  42. data/config/locales/zh-TW.yml +0 -2
  43. data/config/rubocop/capybara/configuration.yml +1 -0
  44. data/config/rubocop/capybara/disabled.yml +7 -0
  45. data/config/rubocop/disabled.yml +1 -41
  46. data/config/rubocop/factory_bot/configuration.yml +1 -0
  47. data/config/rubocop/factory_bot/disabled.yml +10 -0
  48. data/config/rubocop/{faker.yml → faker/configuration.yml} +2 -2
  49. data/config/rubocop/faker/disabled.yml +3 -0
  50. data/config/rubocop/{graphql.yml → graphql/configuration.yml} +2 -6
  51. data/config/rubocop/graphql/disabled.yml +4 -0
  52. data/config/rubocop/performance/configuration.yml +1 -0
  53. data/config/rubocop/{performance.yml → performance/disabled.yml} +1 -1
  54. data/config/rubocop/{rails.yml → rails/configuration.yml} +1 -24
  55. data/config/rubocop/rails/disabled.yml +46 -0
  56. data/config/rubocop/{rspec.yml → rspec/configuration.yml} +2 -29
  57. data/config/rubocop/rspec/disabled.yml +49 -0
  58. data/config/rubocop/{ruby.yml → ruby/configuration.yml} +3 -38
  59. data/config/rubocop/ruby/disabled.yml +106 -0
  60. data/decidim-dev.gemspec +10 -10
  61. data/lib/decidim/dev/assets/assemblies.json +6 -11
  62. data/lib/decidim/dev/assets/assemblies_with_null.json +0 -1
  63. data/lib/decidim/dev/assets/census_all_invalid.csv +4 -0
  64. data/lib/decidim/dev/assets/census_duplicate_emails.csv +4 -0
  65. data/lib/decidim/dev/assets/census_no_header.csv +2 -0
  66. data/lib/decidim/dev/assets/census_with_missing_email.csv +3 -0
  67. data/lib/decidim/dev/assets/census_with_missing_token.csv +3 -0
  68. data/lib/decidim/dev/assets/empty_file.csv +0 -0
  69. data/lib/decidim/dev/assets/participatory_processes.json +0 -1
  70. data/lib/decidim/dev/assets/participatory_processes_with_null.json +0 -1
  71. data/lib/decidim/dev/assets/valid_election_census.csv +3 -0
  72. data/lib/decidim/dev/assets/valid_emails.csv +27 -0
  73. data/lib/decidim/dev/component.rb +2 -2
  74. data/lib/decidim/dev/engine.rb +1 -7
  75. data/lib/decidim/dev/test/base_spec_helper.rb +9 -0
  76. data/lib/decidim/dev/test/factories.rb +5 -12
  77. data/lib/decidim/dev/test/rspec_support/activestorage_matchers.rb +1 -1
  78. data/lib/decidim/dev/test/rspec_support/capybara.rb +11 -18
  79. data/lib/decidim/dev/test/rspec_support/comments.rb +1 -1
  80. data/lib/decidim/dev/test/rspec_support/component.rb +2 -2
  81. data/lib/decidim/dev/test/rspec_support/component_context.rb +0 -108
  82. data/lib/decidim/dev/test/rspec_support/editor_context.rb +1 -13
  83. data/lib/decidim/dev/test/rspec_support/gamification.rb +1 -1
  84. data/lib/decidim/dev/test/rspec_support/helpers.rb +16 -0
  85. data/lib/decidim/dev/test/rspec_support/rake_tasks.rb +0 -16
  86. data/lib/decidim/dev/test/rspec_support/screenshot_helper.rb +2 -2
  87. data/lib/decidim/dev/test/rspec_support/{webpacker.rb → shakapacker.rb} +2 -2
  88. data/lib/decidim/dev/test/rspec_support/z_download_helper.rb +0 -1
  89. data/lib/decidim/dev/test/spec_helper.rb +1 -1
  90. data/lib/decidim/dev/version.rb +1 -1
  91. data/lib/decidim/dev.rb +0 -2
  92. data/rubocop-decidim.yml +17 -9
  93. metadata +91 -40
  94. data/lib/decidim/api/dummy_resource_type.rb +0 -12
  95. data/lib/decidim/dev/api.rb +0 -7
  96. data/lib/decidim/dev/assets/dummy-export.zip +0 -0
@@ -12,7 +12,6 @@
12
12
  "es": "In laudantium."
13
13
  },
14
14
  "slug": "distinctio-cupiditate",
15
- "hashtag": "harum",
16
15
  "short_description": {
17
16
  "ca": "<p>Harum magnam id.</p>",
18
17
  "en": "<p>Aut quam doloribus.</p>",
@@ -12,7 +12,6 @@
12
12
  "es": "In laudantium."
13
13
  },
14
14
  "slug": "distinctio-cupiditate",
15
- "hashtag": "harum",
16
15
  "short_description": {
17
16
  "ca": "<p>Harum magnam id.</p>",
18
17
  "en": "<p>Aut quam doloribus.</p>",
@@ -0,0 +1,3 @@
1
+ email;token
2
+ user1@example.org;token123
3
+ user2@example.org;token456
@@ -0,0 +1,27 @@
1
+ first_test_email@example.org
2
+ second_test_email@example.org
3
+ third_test_email@example.org
4
+ this_is_a_test_email@test.org
5
+ test.123@test.org
6
+ example.123@test.org
7
+ this_is_another_test_email@test.com
8
+ test_user_001@example.com
9
+ test.account@example.com
10
+ test.example@example.com
11
+ example.account@example.com
12
+ new_email_test@example.com
13
+ one_more_example_email@test.org
14
+ another_example_email@test.org
15
+ first_test@test.org
16
+ one_example_email@test.org
17
+ second_test@test.com
18
+ four.test@test.org
19
+ the_test_email@example.org
20
+ these_test_email@test.org
21
+ more_example_email@test.org
22
+ the_new_email_test@example.test
23
+ another_example_email@test.example
24
+ this_is_the_new_email_test@example.test
25
+ one_more_example_email@example.test
26
+ another_example_email@example.test
27
+ first_test@example.test
@@ -33,8 +33,8 @@ Decidim.register_component(:dummy) do |component|
33
33
  settings.attribute :amendment_reaction_enabled, type: :boolean, default: true
34
34
  settings.attribute :amendment_promotion_enabled, type: :boolean, default: true
35
35
  settings.attribute :amendments_visibility, type: :string, default: "all"
36
- settings.attribute :endorsements_enabled, type: :boolean, default: false
37
- settings.attribute :endorsements_blocked, type: :boolean, default: false
36
+ settings.attribute :likes_enabled, type: :boolean, default: false
37
+ settings.attribute :likes_blocked, type: :boolean, default: false
38
38
  end
39
39
 
40
40
  component.register_resource(:dummy_resource) do |resource|
@@ -25,7 +25,7 @@ module Decidim
25
25
  ActiveSupport.on_load(:action_controller) { include Decidim::Dev::NeedsDevelopmentTools } if Rails.env.development? || ENV.fetch("DECIDIM_DEV_ENGINE", nil)
26
26
  end
27
27
 
28
- initializer "decidim_dev.webpacker.assets_path" do
28
+ initializer "decidim_dev.shakapacker.assets_path" do
29
29
  Decidim.register_assets_path File.expand_path("app/packs", root)
30
30
  end
31
31
 
@@ -45,12 +45,6 @@ module Decidim
45
45
  end
46
46
  end
47
47
  end
48
-
49
- initializer "decidim_dev.graphql_api" do
50
- next unless Decidim.module_installed?(:api)
51
-
52
- Decidim::Api.add_orphan_type Decidim::Dev::DummyResourceType
53
- end
54
48
  end
55
49
  end
56
50
  end
@@ -4,6 +4,15 @@ require "decidim/dev"
4
4
 
5
5
  ENV["RAILS_ENV"] ||= "test"
6
6
  ENV["RAILS_SYSTEM_TESTING_SCREENSHOT_HTML"] ||= "1"
7
+ ENV["DECIDIM_API_JWT_SECRET"] ||= "dummy-api-jwt-secret"
8
+ ENV["DECIDIM_AVAILABLE_LOCALES"] ||= "en,ca,es"
9
+ ENV["DECIDIM_ENABLE_MACHINE_TRANSLATION"] ||= "true"
10
+ ENV["DECIDIM_SPAM_DETECTION_BACKEND_RESOURCE"] ||= "memory"
11
+ ENV["DECIDIM_SPAM_DETECTION_BACKEND_USER"] ||= "memory"
12
+ ENV["DECIDIM_SMS_GATEWAY_SERVICE"] ||= "Decidim::Verifications::Sms::ExampleGateway"
13
+ ENV["DECIDIM_TIMESTAMP_SERVICE"] ||= "Decidim::Initiatives::DummyTimestamp"
14
+ ENV["DECIDIM_PDF_SIGNATURE_SERVICE"] ||= "Decidim::PdfSignatureExample"
15
+ ENV["DECIDIM_MACHINE_TRANSLATION_SERVICE"] ||= "Decidim::Dev::DummyTranslator"
7
16
 
8
17
  engine_spec_dir = File.join(Dir.pwd, "spec")
9
18
 
@@ -15,8 +15,6 @@ FactoryBot.define do
15
15
  transient do
16
16
  skip_injection { false }
17
17
  users { nil }
18
- # user_groups correspondence to users is by sorting order
19
- user_groups { [] }
20
18
  end
21
19
  title { generate_localized_title(:dummy_resource_title, skip_injection:) }
22
20
  component { create(:dummy_component, skip_injection:) }
@@ -27,11 +25,11 @@ FactoryBot.define do
27
25
  published_at { Time.current }
28
26
  end
29
27
 
30
- trait :with_endorsements do
28
+ trait :with_likes do
31
29
  after :create do |resource, evaluator|
32
30
  5.times.collect do
33
- create(:endorsement, resource:, skip_injection: evaluator.skip_injection,
34
- author: build(:user, organization: resource.component.organization, skip_injection: evaluator.skip_injection))
31
+ create(:like, resource:, skip_injection: evaluator.skip_injection,
32
+ author: build(:user, organization: resource.component.organization, skip_injection: evaluator.skip_injection))
35
33
  end
36
34
  end
37
35
  end
@@ -61,13 +59,8 @@ FactoryBot.define do
61
59
 
62
60
  after :build do |resource, evaluator|
63
61
  evaluator.authors_list.each do |coauthor|
64
- resource.coauthorships << if coauthor.is_a?(Decidim::UserGroup)
65
- build(:coauthorship, author: coauthor.users.first, user_group: coauthor, coauthorable: resource,
66
- organization: evaluator.component.organization, skip_injection: evaluator.skip_injection)
67
- else
68
- build(:coauthorship, author: coauthor, coauthorable: resource, organization: evaluator.component.organization,
69
- skip_injection: evaluator.skip_injection)
70
- end
62
+ resource.coauthorships << build(:coauthorship, author: coauthor, coauthorable: resource, organization: evaluator.component.organization,
63
+ skip_injection: evaluator.skip_injection)
71
64
  end
72
65
  end
73
66
  end
@@ -28,7 +28,7 @@ module ActiveStorageMatchers
28
28
  when :redirect, :representation
29
29
  ActiveStorage::Blob.find_signed(key_match)
30
30
  when :disk
31
- decoded = ActiveStorage.verifier.verified(key_match, purpose: :blob_key)
31
+ decoded = ActiveStorage.verifier.verified(key_match, purpose: :blob_key).with_indifferent_access
32
32
  ActiveStorage::Blob.find_by(key: decoded[:key]) if decoded
33
33
  end
34
34
  end
@@ -30,28 +30,21 @@ module Decidim
30
30
  end
31
31
  end
32
32
 
33
- 1.step do
34
- port = rand(5000..6999)
33
+ # Expected values: "", "2", "3", etc. (see parallel_tests documentation)
34
+ parallel_run_idx = ENV.fetch("TEST_ENV_NUMBER", "").to_i
35
+ parallel_run_idx -= 1 if parallel_run_idx.positive?
36
+ Capybara.server_port = 1.step do |num|
37
+ port = 4999 + num + (100 * parallel_run_idx)
38
+ next if port == 5432 # Reserved for PostgreSQL
35
39
  next if port == 6379 # Reserved for Redis
36
40
 
41
+ # Make sure the port is not reserved by any other application.
37
42
  begin
38
- redis = Redis.new
39
- reserved_ports = (redis.get("decidim_test_capybara_reserved_ports") || "").split(",").map(&:to_i)
40
- unless reserved_ports.include?(port)
41
- reserved_ports << port
42
- if ParallelTests.last_process?
43
- redis.del("decidim_test_capybara_reserved_ports")
44
- else
45
- redis.set("decidim_test_capybara_reserved_ports", reserved_ports.sort.join(","))
46
- end
47
- break
48
- end
49
- rescue Redis::CannotConnectError
50
- # Redis is not available
51
- break
43
+ Socket.tcp("127.0.0.1", port, connect_timeout: 5).close
44
+ warn "Port #{port} is already in use, trying another one."
45
+ rescue Errno::ECONNREFUSED
46
+ break port
52
47
  end
53
- ensure
54
- Capybara.server_port = port
55
48
  end
56
49
 
57
50
  Capybara.register_driver :headless_chrome do |app|
@@ -3,7 +3,7 @@
3
3
  module CommentsHelpers
4
4
  def have_comment_from(user, text, opts = {})
5
5
  within "#comments" do
6
- have_content(decidim_sanitize_translated(user.name).gsub("\n", " "), **opts) && have_content(text, **opts)
6
+ have_content(user.name, **opts).and have_content(text, **opts)
7
7
  end
8
8
  end
9
9
 
@@ -18,7 +18,7 @@ RSpec.configure do |config|
18
18
  t.datetime :published_at
19
19
  t.datetime :deleted_at
20
20
  t.integer :coauthorships_count, null: false, default: 0
21
- t.integer :endorsements_count, null: false, default: 0
21
+ t.integer :likes_count, null: false, default: 0
22
22
  t.integer :comments_count, null: false, default: 0
23
23
  t.integer :follows_count, null: false, default: 0
24
24
 
@@ -53,7 +53,7 @@ RSpec.configure do |config|
53
53
  t.datetime :published_at
54
54
  t.datetime :deleted_at
55
55
  t.integer :coauthorships_count, null: false, default: 0
56
- t.integer :endorsements_count, null: false, default: 0
56
+ t.integer :likes_count, null: false, default: 0
57
57
  t.integer :comments_count, null: false, default: 0
58
58
 
59
59
  t.references :decidim_component, index: false
@@ -114,111 +114,3 @@ shared_context "when managing a component as a process admin" do
114
114
  participatory_process:)
115
115
  end
116
116
  end
117
-
118
- shared_context "when publishing and unpublishing the component" do
119
- let(:title) { translated(current_component.name) }
120
- # When resources are being created or modified, the following jobs are enqueued among the ones that we need to wait for.
121
- # When running in CI, we have situations when job processing takes longer, causing flaky tests.
122
- # Adding a list of exceptions here, helps us to avoid those situations.
123
- let(:job_exceptions) do
124
- [
125
- Decidim::MachineTranslationResourceJob,
126
- ActiveStorage::AnalyzeJob
127
- ]
128
- end
129
-
130
- context "when component is unpublished" do
131
- before do
132
- current_component.unpublish!
133
- current_component.participatory_space.try_add_to_index_as_search_resource
134
-
135
- visit decidim_admin_participatory_processes.components_path(current_component.participatory_space)
136
- end
137
-
138
- it "reindexes on publication" do
139
- Decidim::SearchableResource.where(resource:).delete_all
140
- expect(Decidim::SearchableResource.where(resource:).count).to be_zero
141
-
142
- within "tr", text: title do
143
- click_on "Publish"
144
- end
145
-
146
- expect(page).to have_admin_callout("The component has been successfully published")
147
-
148
- perform_enqueued_jobs(except: job_exceptions)
149
-
150
- expect(Decidim::SearchableResource.where(resource:).count).to be_positive
151
- expect(component.reload).to be_published
152
- end
153
- end
154
-
155
- context "when component is published" do
156
- before do
157
- current_component.publish!
158
- current_component.participatory_space.try_add_to_index_as_search_resource
159
-
160
- visit decidim_admin_participatory_processes.components_path(current_component.participatory_space)
161
- end
162
-
163
- it "removes records from index" do
164
- perform_enqueued_jobs(except: job_exceptions)
165
-
166
- expect(Decidim::SearchableResource.where(resource:).count).to be_positive
167
-
168
- within ".sidebar-menu" do
169
- click_on "Components"
170
- end
171
-
172
- within "tr", text: title do
173
- click_on "Hide"
174
- end
175
-
176
- perform_enqueued_jobs(except: job_exceptions)
177
-
178
- expect(Decidim::SearchableResource.where(resource:).count).to be_positive
179
-
180
- within "tr", text: title do
181
- click_on "Unpublish"
182
- end
183
-
184
- expect(page).to have_admin_callout("The component has been successfully unpublished")
185
-
186
- perform_enqueued_jobs(except: job_exceptions)
187
-
188
- expect(Decidim::SearchableResource.where(resource:).count).to be_zero
189
- expect(current_component.reload).not_to be_published
190
- end
191
- end
192
- end
193
-
194
- shared_context "when cycling through publication states" do
195
- include_context "when managing a component as an admin" do
196
- let(:title) { translated(current_component.name) }
197
-
198
- it "cycles through unpublished and published states successfully" do
199
- visit decidim_admin_participatory_processes.components_path(current_component.participatory_space)
200
-
201
- within ".sidebar-menu" do
202
- click_on "Components"
203
- end
204
-
205
- within "tr", text: title do
206
- click_on "Hide"
207
- end
208
-
209
- expect(page).to have_admin_callout("The component has been successfully hidden from the menu.")
210
-
211
- within "tr", text: title do
212
- click_on "Unpublish"
213
- end
214
-
215
- expect(page).to have_admin_callout("The component has been successfully unpublished")
216
-
217
- within "tr", text: title do
218
- click_on "Publish"
219
- end
220
-
221
- expect(page).to have_admin_callout("The component has been successfully published")
222
- end
223
- end
224
- end
@@ -1,32 +1,20 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- shared_context "with editor content containing hashtags and mentions" do
4
- let(:hashtag) { create(:hashtag, organization:) }
5
- let(:hashtag2) { create(:hashtag, organization:) }
3
+ shared_context "with editor content containing mentions" do
6
4
  let(:user) { create(:user, :confirmed, organization:) }
7
5
  let(:user2) { create(:user, :confirmed, organization:) }
8
- let(:user_group) { create(:user_group, :confirmed, organization:) }
9
- let(:user_group2) { create(:user_group, :confirmed, organization:) }
10
6
 
11
7
  let(:html) do
12
8
  <<~HTML
13
- <p>Paragraph with a hashtag #{hashtag.to_global_id} and another hashtag #{hashtag2.to_global_id}</p>
14
9
  <p>Paragraph with a user mention #{user.to_global_id} and another user mention #{user2.to_global_id}</p>
15
- <p>Paragraph with a user group mention #{user_group.to_global_id} and another user group mention #{user_group2.to_global_id}</p>
16
10
  HTML
17
11
  end
18
12
  let(:editor_html) do
19
13
  <<~HTML
20
- <p>Paragraph with a hashtag #{html_hashtag(hashtag)} and another hashtag #{html_hashtag(hashtag2)}</p>
21
14
  <p>Paragraph with a user mention #{html_mention(user)} and another user mention #{html_mention(user2)}</p>
22
- <p>Paragraph with a user group mention #{html_mention(user_group)} and another user group mention #{html_mention(user_group2)}</p>
23
15
  HTML
24
16
  end
25
17
 
26
- def html_hashtag(hashtag)
27
- %(<span data-type="hashtag" data-label="##{hashtag.name}">##{hashtag.name}</span>)
28
- end
29
-
30
18
  def html_mention(mentionable)
31
19
  mention = "@#{mentionable.nickname}"
32
20
  label = "#{mention} (#{CGI.escapeHTML(mentionable.name)})"
@@ -4,7 +4,7 @@ RSpec.configure do |config|
4
4
  config.before(:suite) do
5
5
  Decidim::Gamification.register_badge(:test) do |badge|
6
6
  badge.levels = [1, 5, 10]
7
- badge.valid_for = [:user, :user_group]
7
+ badge.valid_for = [:user]
8
8
  badge.reset = ->(_user) { 100 }
9
9
  end
10
10
  end
@@ -134,6 +134,22 @@ module Decidim
134
134
  JS
135
135
  )
136
136
  end
137
+
138
+ def select_text(selector)
139
+ page.execute_script(
140
+ <<~JS
141
+ var selection = document.getSelection();
142
+ var range = document.createRange();
143
+ var element = document.querySelector("#{selector}");
144
+
145
+ range.selectNodeContents(element);
146
+ selection.removeAllRanges();
147
+ selection.addRange(range);
148
+ document.dispatchEvent(new MouseEvent("selectstart"));
149
+ document.dispatchEvent(new MouseEvent("mouseup"));
150
+ JS
151
+ )
152
+ end
137
153
  end
138
154
 
139
155
  module FrontEndFileTestHelpers
@@ -40,22 +40,6 @@ module RakeTaskOutputHelpers
40
40
  $stdout = original_stdout
41
41
  end
42
42
  end
43
-
44
- def check_no_errors_have_been_printed
45
- expect($stdout.string).not_to include("ERROR:")
46
- end
47
-
48
- def check_some_errors_have_been_printed
49
- expect($stdout.string).to include("ERROR:")
50
- end
51
-
52
- def check_error_printed(type)
53
- expect($stdout.string).to include("ERROR: [#{type}]")
54
- end
55
-
56
- def check_message_printed(message)
57
- expect($stdout.string).to include(message)
58
- end
59
43
  end
60
44
 
61
45
  RSpec.configure do |config|
@@ -20,9 +20,9 @@ module ActionDispatch
20
20
  end
21
21
 
22
22
  # Add the file URI scheme so terminal emulators can open one click
23
- def display_image
23
+ def display_image(html:, **)
24
24
  message = "[Screenshot Image]: file://#{image_path}\n"
25
- message << "[Screenshot HTML]: file://#{html_path}\n" if save_html?
25
+ message << "[Screenshot HTML]: file://#{html_path}\n" if html
26
26
 
27
27
  case output_type
28
28
  when "artifact"
@@ -6,12 +6,12 @@ RSpec.configure do |config|
6
6
  raise "package.json file does not exist" unless Rails.root.join("package.json").exist?
7
7
  raise "Node modules directory does not exist" unless Rails.root.join("node_modules").exist?
8
8
 
9
- Dir.chdir(Rails.root) { Webpacker.compile }
9
+ Dir.chdir(Rails.root) { Shakapacker.compile }
10
10
  rescue Errno::ENOENT
11
11
  node_modules_contents = `ls #{Rails.root.join("node_modules")}`
12
12
 
13
13
  message = <<~ERROR
14
- There was an error during the Webpacker compilation
14
+ There was an error during the Shakapacker compilation
15
15
  #{"=" * 80}
16
16
  Node version: #{`node -v`}
17
17
  #{"=" * 80}
@@ -43,6 +43,5 @@ RSpec.configure do |config|
43
43
  FileUtils.mkdir_p DownloadHelper::PATH.to_s
44
44
  page.driver.browser.download_path = DownloadHelper::PATH.to_s
45
45
  clear_downloads
46
- driven_by :headless_chrome
47
46
  end
48
47
  end
@@ -24,7 +24,7 @@ RSpec.configure do |config|
24
24
  config.raise_errors_for_deprecations!
25
25
  config.example_status_persistence_file_path = ".rspec-failures"
26
26
  config.filter_run_when_matching :focus
27
- config.profile_examples = 10
27
+ config.profile_examples = 10 unless ENV.fetch("CI", false)
28
28
  config.default_formatter = "doc" if config.files_to_run.one?
29
29
 
30
30
  # If you are not using ActiveRecord, or you'd prefer not to run each of your
@@ -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.30.6"
7
+ "0.31.0.rc1"
8
8
  end
9
9
  end
10
10
  end
data/lib/decidim/dev.rb CHANGED
@@ -15,8 +15,6 @@ require "decidim/dev/auth_engine"
15
15
  # Also, to avoid further headaches :)
16
16
  # require "decidim/dev/component"
17
17
 
18
- require "decidim/dev/api"
19
-
20
18
  module Decidim
21
19
  # Decidim::Dev holds all the convenience logic and libraries to be able to
22
20
  # create external libraries that create test apps and test themselves against
data/rubocop-decidim.yml CHANGED
@@ -5,16 +5,24 @@
5
5
  # For further details, see:
6
6
  # https://github.com/rubocop/rubocop/issues/4154#issuecomment-316004878
7
7
 
8
- require:
8
+ plugins:
9
9
  - rubocop-rubycw
10
- - rubocop-capybara
11
- - rubocop-factory_bot
12
10
 
13
11
  inherit_from:
14
- - config/rubocop/performance.yml
15
- - config/rubocop/ruby.yml
16
- - config/rubocop/rails.yml
17
- - config/rubocop/rspec.yml
18
- - config/rubocop/faker.yml
19
- - config/rubocop/graphql.yml
12
+ - config/rubocop/capybara/configuration.yml
13
+ - config/rubocop/capybara/disabled.yml
14
+ - config/rubocop/performance/configuration.yml
15
+ - config/rubocop/performance/disabled.yml
16
+ - config/rubocop/ruby/configuration.yml
17
+ - config/rubocop/ruby/disabled.yml
18
+ - config/rubocop/rails/configuration.yml
19
+ - config/rubocop/rails/disabled.yml
20
+ - config/rubocop/rspec/configuration.yml
21
+ - config/rubocop/rspec/disabled.yml
22
+ - config/rubocop/faker/configuration.yml
23
+ - config/rubocop/faker/disabled.yml
24
+ - config/rubocop/graphql/configuration.yml
25
+ - config/rubocop/graphql/disabled.yml
26
+ - config/rubocop/factory_bot/configuration.yml
27
+ - config/rubocop/factory_bot/disabled.yml
20
28
  - config/rubocop/disabled.yml