decidim-dev 0.31.1 → 0.31.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a79ead7ad7f3dd062299e76d5f12bdbc60453fb37f50f524c3d57ecb5e5ecd2d
4
- data.tar.gz: 48b437d8896a4568b4e58f8fb0820e59907844f26e7903be5984024c0b6f1a3b
3
+ metadata.gz: d6e3da71ad4c3d237e0818b69c7a6d3769c72097a157a717fae30a207ac0f34d
4
+ data.tar.gz: 3593b211fdf0bedd964dcf5643c78f9e7fe6e34afb6b0dbc748163692aec42c8
5
5
  SHA512:
6
- metadata.gz: 3820a342090ad04d60592a15abf04e0c749f503d66eb6aab2fe7556ecc92b81ecd7c960db9b553317d25d173e58ef0e28c5feec05013b683716b44b4d907da4a
7
- data.tar.gz: 5d383711d54ed52713590d1652657366b595dd11fde4e9badf02ae3e9ecde46416288b4fab5acc8008aa45604a3e623172b62b71ed0d0ddf5775d82b83de07de
6
+ metadata.gz: ff98b0035148acbe72d19e76d23e2d4375a93e29d1342ccee5dd645847b1f287cd18dc902e837986ce062f6087199148c821100ad6e97acb086c676594d8d907
7
+ data.tar.gz: 82ba085f4e98bfaba504d43e16e663e64020a263db977926401448cfbfcf21292cfd56263b80a817f94a64e99882361a58856429f87ba2b43244800a3e1a0248
@@ -2,6 +2,9 @@
2
2
  el:
3
3
  activemodel:
4
4
  attributes:
5
+ dummy:
6
+ image: Εικόνα
7
+ dummy_attribute: Εικονικό χαρακτηριστικό
5
8
  dummy_resource:
6
9
  created_at: Δημιουργήθηκε στις
7
10
  decidim_scope_id: Πεδίο εφαρμογής
@@ -15,14 +18,21 @@ el:
15
18
  dummy:
16
19
  settings:
17
20
  global:
21
+ clear_all: Εκκαθάριση όλων
22
+ guided: Καθοδηγούμενη εισαγωγή
23
+ guided_help: Κείμενο βοήθειας
24
+ guided_readonly: Απενεργοποιημένη εισαγωγή
25
+ guided_rich: Καθοδηγούμενη πλούσια εισαγωγή
26
+ guided_rich_help_html: HTML <strong>βοήθεια</strong> κείμενο
18
27
  readonly_attribute: Χαρακτηριστικό μόνο για ανάγνωση
19
28
  test: A δοκιμή
29
+ test_add: Προσθήκη τεστ
20
30
  test_choices:
21
31
  a: A επιλογή
22
32
  b: B επιλογή
23
33
  c: C επιλογή
24
34
  test_options:
25
- bar: Bar
35
+ bar: Μπάρα
26
36
  foo: Foo
27
37
  step:
28
38
  readonly_step_attribute: Χαρακτηριστικό βήματος μόνο για ανάγνωση
@@ -48,7 +58,7 @@ el:
48
58
  test_link:
49
59
  dummy_resource_dummy: Σχετικό εικονικό στοιχείο
50
60
  statistics:
51
- bar: Bar
61
+ bar: Μπάρα
52
62
  dummies_count_high: Εικονικά στοιχεία υψηλά
53
63
  dummies_count_medium: Εικονικά στοιχεία μεσαία
54
64
  foo: Foo
@@ -37,8 +37,8 @@ sv:
37
37
  baz: Baz
38
38
  foo: Foo
39
39
  step:
40
- likes_blocked: Gilla är blockerat
41
- likes_enabled: Gilla är aktiverat
40
+ likes_blocked: Stäng av gilla-markeringar
41
+ likes_enabled: Aktivera gilla-markeringar
42
42
  readonly_step_attribute: Attribut för skrivskyddat steg
43
43
  test_options:
44
44
  bar: Bar
@@ -15,9 +15,10 @@ FactoryBot.define do
15
15
  transient do
16
16
  skip_injection { false }
17
17
  users { nil }
18
+ organization { create(:organization, skip_injection:) }
18
19
  end
19
20
  title { generate_localized_title(:dummy_resource_title, skip_injection:) }
20
- component { create(:dummy_component, skip_injection:) }
21
+ component { create(:dummy_component, organization:, skip_injection:) }
21
22
  author { create(:user, :confirmed, organization: component.organization, skip_injection:) }
22
23
  scope { create(:scope, organization: component.organization, skip_injection:) }
23
24
 
@@ -114,3 +114,117 @@ 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
+ find("button[data-controller='dropdown']").click
144
+ click_on "Publish"
145
+ end
146
+
147
+ expect(page).to have_admin_callout("The component has been successfully published")
148
+
149
+ perform_enqueued_jobs(except: job_exceptions)
150
+
151
+ expect(Decidim::SearchableResource.where(resource:).count).to be_positive
152
+ expect(component.reload).to be_published
153
+ end
154
+ end
155
+
156
+ context "when component is published" do
157
+ before do
158
+ current_component.publish!
159
+ current_component.participatory_space.try_add_to_index_as_search_resource
160
+
161
+ visit decidim_admin_participatory_processes.components_path(current_component.participatory_space)
162
+ end
163
+
164
+ it "removes records from index" do
165
+ perform_enqueued_jobs(except: job_exceptions)
166
+
167
+ expect(Decidim::SearchableResource.where(resource:).count).to be_positive
168
+
169
+ within ".sidebar-menu" do
170
+ click_on "Components"
171
+ end
172
+
173
+ within "tr", text: title do
174
+ find("button[data-controller='dropdown']").click
175
+ click_on "Hide from menu"
176
+ end
177
+
178
+ perform_enqueued_jobs(except: job_exceptions)
179
+
180
+ expect(Decidim::SearchableResource.where(resource:).count).to be_positive
181
+
182
+ within "tr", text: title do
183
+ find("button[data-controller='dropdown']").click
184
+ click_on "Unpublish"
185
+ end
186
+
187
+ expect(page).to have_admin_callout("The component has been successfully unpublished")
188
+
189
+ perform_enqueued_jobs(except: job_exceptions)
190
+
191
+ expect(Decidim::SearchableResource.where(resource:).count).to be_zero
192
+ expect(current_component.reload).not_to be_published
193
+ end
194
+ end
195
+ end
196
+
197
+ shared_context "when cycling through publication states" do
198
+ include_context "when managing a component as an admin" do
199
+ let(:title) { translated(current_component.name) }
200
+
201
+ it "cycles through unpublished and published states successfully" do
202
+ visit decidim_admin_participatory_processes.components_path(current_component.participatory_space)
203
+
204
+ within ".sidebar-menu" do
205
+ click_on "Components"
206
+ end
207
+
208
+ within "tr", text: title do
209
+ find("button[data-controller='dropdown']").click
210
+ click_on "Hide from menu"
211
+ end
212
+
213
+ expect(page).to have_admin_callout("The component has been successfully hidden from the menu.")
214
+
215
+ within "tr", text: title do
216
+ find("button[data-controller='dropdown']").click
217
+ click_on "Unpublish"
218
+ end
219
+
220
+ expect(page).to have_admin_callout("The component has been successfully unpublished")
221
+
222
+ within "tr", text: title do
223
+ find("button[data-controller='dropdown']").click
224
+ click_on "Publish"
225
+ end
226
+
227
+ expect(page).to have_admin_callout("The component has been successfully published")
228
+ end
229
+ end
230
+ 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.31.1"
7
+ "0.31.2"
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.31.1
4
+ version: 0.31.2
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: 2026-01-28 00:00:00.000000000 Z
13
+ date: 2026-02-26 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: capybara
@@ -32,84 +32,84 @@ dependencies:
32
32
  requirements:
33
33
  - - '='
34
34
  - !ruby/object:Gem::Version
35
- version: 0.31.1
35
+ version: 0.31.2
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.31.1
42
+ version: 0.31.2
43
43
  - !ruby/object:Gem::Dependency
44
44
  name: decidim-api
45
45
  requirement: !ruby/object:Gem::Requirement
46
46
  requirements:
47
47
  - - '='
48
48
  - !ruby/object:Gem::Version
49
- version: 0.31.1
49
+ version: 0.31.2
50
50
  type: :runtime
51
51
  prerelease: false
52
52
  version_requirements: !ruby/object:Gem::Requirement
53
53
  requirements:
54
54
  - - '='
55
55
  - !ruby/object:Gem::Version
56
- version: 0.31.1
56
+ version: 0.31.2
57
57
  - !ruby/object:Gem::Dependency
58
58
  name: decidim-comments
59
59
  requirement: !ruby/object:Gem::Requirement
60
60
  requirements:
61
61
  - - '='
62
62
  - !ruby/object:Gem::Version
63
- version: 0.31.1
63
+ version: 0.31.2
64
64
  type: :runtime
65
65
  prerelease: false
66
66
  version_requirements: !ruby/object:Gem::Requirement
67
67
  requirements:
68
68
  - - '='
69
69
  - !ruby/object:Gem::Version
70
- version: 0.31.1
70
+ version: 0.31.2
71
71
  - !ruby/object:Gem::Dependency
72
72
  name: decidim-core
73
73
  requirement: !ruby/object:Gem::Requirement
74
74
  requirements:
75
75
  - - '='
76
76
  - !ruby/object:Gem::Version
77
- version: 0.31.1
77
+ version: 0.31.2
78
78
  type: :runtime
79
79
  prerelease: false
80
80
  version_requirements: !ruby/object:Gem::Requirement
81
81
  requirements:
82
82
  - - '='
83
83
  - !ruby/object:Gem::Version
84
- version: 0.31.1
84
+ version: 0.31.2
85
85
  - !ruby/object:Gem::Dependency
86
86
  name: decidim-generators
87
87
  requirement: !ruby/object:Gem::Requirement
88
88
  requirements:
89
89
  - - '='
90
90
  - !ruby/object:Gem::Version
91
- version: 0.31.1
91
+ version: 0.31.2
92
92
  type: :runtime
93
93
  prerelease: false
94
94
  version_requirements: !ruby/object:Gem::Requirement
95
95
  requirements:
96
96
  - - '='
97
97
  - !ruby/object:Gem::Version
98
- version: 0.31.1
98
+ version: 0.31.2
99
99
  - !ruby/object:Gem::Dependency
100
100
  name: decidim-verifications
101
101
  requirement: !ruby/object:Gem::Requirement
102
102
  requirements:
103
103
  - - '='
104
104
  - !ruby/object:Gem::Version
105
- version: 0.31.1
105
+ version: 0.31.2
106
106
  type: :runtime
107
107
  prerelease: false
108
108
  version_requirements: !ruby/object:Gem::Requirement
109
109
  requirements:
110
110
  - - '='
111
111
  - !ruby/object:Gem::Version
112
- version: 0.31.1
112
+ version: 0.31.2
113
113
  - !ruby/object:Gem::Dependency
114
114
  name: factory_bot_rails
115
115
  requirement: !ruby/object:Gem::Requirement