decidim-dev 0.31.2 → 0.31.3
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 +4 -4
- data/lib/decidim/dev/test/rspec_support/component_context.rb +72 -84
- data/lib/decidim/dev/version.rb +1 -1
- metadata +14 -14
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8e0f12166f9da48c5aa33d2976e11ab800faa7d8824c8a017f5e23a394346f4e
|
|
4
|
+
data.tar.gz: 6f1fe59ec10b8be3fc65b5085d15e68c1e2c65ddc776d25e9dc21faf5962bc75
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 78b7b8779dc4011e86478db3886d8f250bf6e3c471a057e93d92cd778c8a783beac47aea2c72b5fb8ef1c44264a5f7480078f2c8aa2e4528e14066946aec97d3
|
|
7
|
+
data.tar.gz: 3b303e3c5bc323e5d97643d098479b2583b08167f69a1f3486b01fdaed54b4d17458898ec0000236c4d1d70c6e9fceb95ffc5aaf6d2b0800823e225e0cefc22d
|
|
@@ -115,116 +115,104 @@ shared_context "when managing a component as a process admin" do
|
|
|
115
115
|
end
|
|
116
116
|
end
|
|
117
117
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
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)
|
|
118
|
+
shared_examples "add component resources to search index" do
|
|
119
|
+
before do
|
|
120
|
+
resource.reload.component.manifest.run_hooks(:unpublish, resource.reload.component)
|
|
121
|
+
visit decidim_admin_participatory_processes.components_path(resource.reload.component.participatory_space)
|
|
122
|
+
end
|
|
150
123
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
end
|
|
124
|
+
around do |example|
|
|
125
|
+
perform_enqueued_jobs { example.run }
|
|
154
126
|
end
|
|
155
127
|
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
current_component.publish!
|
|
159
|
-
current_component.participatory_space.try_add_to_index_as_search_resource
|
|
128
|
+
it "adds records to index" do
|
|
129
|
+
expect(Decidim::SearchableResource.where(resource:).count).to be_zero
|
|
160
130
|
|
|
161
|
-
|
|
131
|
+
within "tr", text: translated(current_component.name) do
|
|
132
|
+
find("button[data-controller='dropdown']").click
|
|
133
|
+
click_on "Publish"
|
|
162
134
|
end
|
|
163
135
|
|
|
164
|
-
|
|
165
|
-
perform_enqueued_jobs(except: job_exceptions)
|
|
136
|
+
perform_enqueued_jobs
|
|
166
137
|
|
|
167
|
-
|
|
138
|
+
expect(page).to have_admin_callout("The component has been successfully published")
|
|
139
|
+
|
|
140
|
+
expect(component.reload).to be_published
|
|
141
|
+
expect(resource.reload).to be_visible
|
|
142
|
+
expect(Decidim::SearchableResource.where(resource:).count).to be_positive
|
|
143
|
+
end
|
|
144
|
+
end
|
|
168
145
|
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
146
|
+
shared_examples "removes component resources from search index" do
|
|
147
|
+
before do
|
|
148
|
+
resource.reload.component.manifest.run_hooks(:publish, resource.reload.component)
|
|
149
|
+
visit decidim_admin_participatory_processes.components_path(resource.reload.component.participatory_space)
|
|
150
|
+
end
|
|
172
151
|
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
end
|
|
152
|
+
around do |example|
|
|
153
|
+
perform_enqueued_jobs { example.run }
|
|
154
|
+
end
|
|
177
155
|
|
|
178
|
-
|
|
156
|
+
it "removes records from index" do
|
|
157
|
+
expect(resource.reload.component).to be_published
|
|
158
|
+
expect(resource.component.participatory_space).to be_visible
|
|
159
|
+
expect(resource).to be_visible
|
|
160
|
+
expect(resource).to be_resource_visible
|
|
179
161
|
|
|
180
|
-
|
|
162
|
+
expect(Decidim::SearchableResource.where(resource:).count).to be_positive
|
|
181
163
|
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
164
|
+
within "tr", text: translated(current_component.name) do
|
|
165
|
+
find("button[data-controller='dropdown']").click
|
|
166
|
+
click_on "Hide from menu"
|
|
167
|
+
end
|
|
186
168
|
|
|
187
|
-
|
|
169
|
+
expect(component.reload).to be_published
|
|
170
|
+
expect(resource.reload).to be_visible
|
|
188
171
|
|
|
189
|
-
|
|
172
|
+
expect(Decidim::SearchableResource.where(resource:).count).to be_positive
|
|
190
173
|
|
|
191
|
-
|
|
192
|
-
|
|
174
|
+
within "tr", text: translated(current_component.name) do
|
|
175
|
+
find("button[data-controller='dropdown']").click
|
|
176
|
+
click_on "Unpublish"
|
|
193
177
|
end
|
|
178
|
+
|
|
179
|
+
expect(page).to have_admin_callout("The component has been successfully unpublished")
|
|
180
|
+
|
|
181
|
+
expect(current_component.reload).not_to be_published
|
|
182
|
+
expect(resource.reload).not_to be_visible
|
|
183
|
+
expect(Decidim::SearchableResource.where(resource:).count).to be_zero
|
|
194
184
|
end
|
|
195
185
|
end
|
|
196
186
|
|
|
197
|
-
|
|
198
|
-
|
|
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)
|
|
187
|
+
shared_examples "cycling through publication states" do
|
|
188
|
+
let(:title) { translated(current_component.name) }
|
|
203
189
|
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
end
|
|
190
|
+
it "works without raising errors" do
|
|
191
|
+
visit decidim_admin_participatory_processes.components_path(component.participatory_space)
|
|
207
192
|
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
end
|
|
193
|
+
within ".sidebar-menu" do
|
|
194
|
+
click_on "Components"
|
|
195
|
+
end
|
|
212
196
|
|
|
213
|
-
|
|
197
|
+
within "tr", text: title do
|
|
198
|
+
find("button[data-controller='dropdown']").click
|
|
199
|
+
click_on "Hide from menu"
|
|
200
|
+
end
|
|
214
201
|
|
|
215
|
-
|
|
216
|
-
find("button[data-controller='dropdown']").click
|
|
217
|
-
click_on "Unpublish"
|
|
218
|
-
end
|
|
202
|
+
expect(page).to have_admin_callout("The component has been successfully hidden from the menu.")
|
|
219
203
|
|
|
220
|
-
|
|
204
|
+
within "tr", text: title do
|
|
205
|
+
find("button[data-controller='dropdown']").click
|
|
206
|
+
click_on "Unpublish"
|
|
207
|
+
end
|
|
221
208
|
|
|
222
|
-
|
|
223
|
-
find("button[data-controller='dropdown']").click
|
|
224
|
-
click_on "Publish"
|
|
225
|
-
end
|
|
209
|
+
expect(page).to have_admin_callout("The component has been successfully unpublished")
|
|
226
210
|
|
|
227
|
-
|
|
211
|
+
within "tr", text: title do
|
|
212
|
+
find("button[data-controller='dropdown']").click
|
|
213
|
+
click_on "Publish"
|
|
228
214
|
end
|
|
215
|
+
|
|
216
|
+
expect(page).to have_admin_callout("The component has been successfully published")
|
|
229
217
|
end
|
|
230
218
|
end
|
data/lib/decidim/dev/version.rb
CHANGED
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.
|
|
4
|
+
version: 0.31.3
|
|
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-
|
|
13
|
+
date: 2026-03-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.
|
|
35
|
+
version: 0.31.3
|
|
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.
|
|
42
|
+
version: 0.31.3
|
|
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.
|
|
49
|
+
version: 0.31.3
|
|
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.
|
|
56
|
+
version: 0.31.3
|
|
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.
|
|
63
|
+
version: 0.31.3
|
|
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.
|
|
70
|
+
version: 0.31.3
|
|
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.
|
|
77
|
+
version: 0.31.3
|
|
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.
|
|
84
|
+
version: 0.31.3
|
|
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.
|
|
91
|
+
version: 0.31.3
|
|
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.
|
|
98
|
+
version: 0.31.3
|
|
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.
|
|
105
|
+
version: 0.31.3
|
|
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.
|
|
112
|
+
version: 0.31.3
|
|
113
113
|
- !ruby/object:Gem::Dependency
|
|
114
114
|
name: factory_bot_rails
|
|
115
115
|
requirement: !ruby/object:Gem::Requirement
|