decidim-forms 0.31.4 → 0.32.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.
- checksums.yaml +4 -4
- data/README.md +3 -1
- data/app/commands/decidim/forms/response_questionnaire.rb +1 -1
- data/app/controllers/decidim/forms/admin/concerns/has_questionnaire.rb +3 -2
- data/app/controllers/decidim/forms/admin/concerns/has_questionnaire_responses.rb +1 -1
- data/app/controllers/decidim/forms/concerns/has_questionnaire.rb +1 -1
- data/app/models/decidim/forms/response.rb +1 -1
- data/app/views/decidim/forms/admin/questionnaires/edit.html.erb +1 -1
- data/app/views/decidim/forms/admin/questionnaires/edit_questions.html.erb +1 -1
- data/app/views/decidim/forms/admin/questionnaires/responses/index.html.erb +3 -1
- data/app/views/decidim/forms/admin/questionnaires/responses/show.html.erb +3 -1
- data/app/views/decidim/forms/questionnaires/_questionnaire.html.erb +1 -1
- data/app/views/decidim/forms/questionnaires/show.html.erb +1 -1
- data/config/locales/ar.yml +0 -4
- data/config/locales/bg.yml +0 -4
- data/config/locales/ca-IT.yml +3 -3
- data/config/locales/ca.yml +3 -3
- data/config/locales/cs.yml +3 -4
- data/config/locales/de.yml +2 -4
- data/config/locales/el.yml +0 -4
- data/config/locales/en.yml +3 -2
- data/config/locales/es-MX.yml +4 -4
- data/config/locales/es-PY.yml +4 -4
- data/config/locales/es.yml +3 -3
- data/config/locales/eu.yml +3 -3
- data/config/locales/fi-plain.yml +4 -4
- data/config/locales/fi.yml +3 -3
- data/config/locales/fr-CA.yml +4 -4
- data/config/locales/fr.yml +4 -4
- data/config/locales/ga-IE.yml +0 -1
- data/config/locales/gl.yml +0 -4
- data/config/locales/hu.yml +0 -4
- data/config/locales/id-ID.yml +0 -4
- data/config/locales/it.yml +0 -4
- data/config/locales/ja.yml +3 -3
- data/config/locales/kaa.yml +0 -1
- data/config/locales/lb.yml +0 -4
- data/config/locales/lt.yml +0 -4
- data/config/locales/lv.yml +0 -4
- data/config/locales/nl.yml +0 -4
- data/config/locales/no.yml +0 -4
- data/config/locales/pl.yml +0 -4
- data/config/locales/pt-BR.yml +3 -4
- data/config/locales/pt.yml +0 -4
- data/config/locales/ro-RO.yml +0 -4
- data/config/locales/ru.yml +0 -4
- data/config/locales/sk.yml +0 -4
- data/config/locales/sv.yml +3 -3
- data/config/locales/tr-TR.yml +0 -4
- data/config/locales/val-ES.yml +0 -1
- data/config/locales/zh-CN.yml +0 -4
- data/config/locales/zh-TW.yml +0 -4
- data/decidim-forms.gemspec +6 -8
- data/lib/decidim/api/questionnaire_entity_interface.rb +1 -0
- data/lib/decidim/forms/download_your_data_user_responses_serializer.rb +1 -0
- data/lib/decidim/forms/test/factories.rb +9 -5
- data/lib/decidim/forms/test/shared_examples/has_questionnaire.rb +23 -23
- data/lib/decidim/forms/test/shared_examples/manage_questionnaires/add_display_conditions.rb +1 -1
- data/lib/decidim/forms/test/shared_examples/manage_questionnaires/add_questions.rb +4 -4
- data/lib/decidim/forms/test/shared_examples/manage_questionnaires/update_display_conditions.rb +1 -1
- data/lib/decidim/forms/test/shared_examples/manage_questionnaires/update_questions.rb +9 -9
- data/lib/decidim/forms/version.rb +1 -1
- metadata +10 -13
data/config/locales/lv.yml
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
---
|
|
2
1
|
lv:
|
|
3
2
|
activemodel:
|
|
4
3
|
attributes:
|
|
@@ -56,9 +55,6 @@ lv:
|
|
|
56
55
|
of_total_steps: no %{total_steps}
|
|
57
56
|
questionnaire_closed:
|
|
58
57
|
title: Veidlapa slēgta
|
|
59
|
-
questionnaire_for_private_users:
|
|
60
|
-
body: Veidlapa ir pieejama tikai privātiem lietotājiem
|
|
61
|
-
title: Veidlapa slēgta
|
|
62
58
|
tos_agreement: Piedaloties jūs piekrītat pakalpojumu sniegšanas noteikumiem.
|
|
63
59
|
step_navigation:
|
|
64
60
|
show:
|
data/config/locales/nl.yml
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
---
|
|
2
1
|
nl:
|
|
3
2
|
activemodel:
|
|
4
3
|
attributes:
|
|
@@ -85,9 +84,6 @@ nl:
|
|
|
85
84
|
of_total_steps: van %{total_steps}
|
|
86
85
|
questionnaire_closed:
|
|
87
86
|
title: Vragenlijst gesloten
|
|
88
|
-
questionnaire_for_private_users:
|
|
89
|
-
body: De vragenlijst is alleen beschikbaar voor privé-gebruikers
|
|
90
|
-
title: Vragenlijst gesloten
|
|
91
87
|
questionnaire_js_disabled:
|
|
92
88
|
body: Sommige functies van dit formulier worden uitgeschakeld. Schakel JavaScript in in uw browser om uw ervaring te verbeteren.
|
|
93
89
|
title: JavaScript is uitgeschakeld
|
data/config/locales/no.yml
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
---
|
|
2
1
|
"no":
|
|
3
2
|
activemodel:
|
|
4
3
|
attributes:
|
|
@@ -88,9 +87,6 @@
|
|
|
88
87
|
of_total_steps: av %{total_steps}
|
|
89
88
|
questionnaire_closed:
|
|
90
89
|
title: Skjema lukket
|
|
91
|
-
questionnaire_for_private_users:
|
|
92
|
-
body: Skjemaet er bare tilgjengelig for private brukere
|
|
93
|
-
title: Skjema lukket
|
|
94
90
|
questionnaire_js_disabled:
|
|
95
91
|
body: Noen av funksjonene i dette skjemaet vil bli deaktivert. For å forbedre opplevelsen, må du aktivere JavaScript i nettleseren.
|
|
96
92
|
title: JavaScript deaktivert
|
data/config/locales/pl.yml
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
---
|
|
2
1
|
pl:
|
|
3
2
|
activemodel:
|
|
4
3
|
attributes:
|
|
@@ -95,9 +94,6 @@ pl:
|
|
|
95
94
|
of_total_steps: z %{total_steps}
|
|
96
95
|
questionnaire_closed:
|
|
97
96
|
title: Formularz został zamknięty
|
|
98
|
-
questionnaire_for_private_users:
|
|
99
|
-
body: Formularz jest dostępny tylko dla użytkowników prywatnych
|
|
100
|
-
title: Formularz został zamknięty
|
|
101
97
|
questionnaire_js_disabled:
|
|
102
98
|
body: Niektóre funkcje tego formularza zostaną wyłączone. Aby strona dostarczała lepszych doświadczeń, włącz obsługę JavaScript w przeglądarce.
|
|
103
99
|
title: JavaScript jest wyłączony
|
data/config/locales/pt-BR.yml
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
---
|
|
2
1
|
pt-BR:
|
|
3
2
|
activemodel:
|
|
4
3
|
attributes:
|
|
@@ -189,9 +188,9 @@ pt-BR:
|
|
|
189
188
|
questionnaire_closed:
|
|
190
189
|
body: O formulário está fechado e não pode ser respondido.
|
|
191
190
|
title: Questionário fechado
|
|
192
|
-
|
|
193
|
-
body: O
|
|
194
|
-
title:
|
|
191
|
+
questionnaire_for_members:
|
|
192
|
+
body: O formulário está disponível apenas para membros
|
|
193
|
+
title: Formulário fechado
|
|
195
194
|
questionnaire_js_disabled:
|
|
196
195
|
body: Algumas das funcionalidades deste formulário serão desativadas. Para melhorar sua experiência, por favor ative o JavaScript no seu navegador.
|
|
197
196
|
title: JavaScript está desativado
|
data/config/locales/pt.yml
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
---
|
|
2
1
|
pt:
|
|
3
2
|
activemodel:
|
|
4
3
|
attributes:
|
|
@@ -80,9 +79,6 @@ pt:
|
|
|
80
79
|
of_total_steps: de %{total_steps}
|
|
81
80
|
questionnaire_closed:
|
|
82
81
|
title: Questionário encerrado
|
|
83
|
-
questionnaire_for_private_users:
|
|
84
|
-
body: O questionário está disponível apenas para utilizadores privados
|
|
85
|
-
title: Questionário encerrado
|
|
86
82
|
questionnaire_js_disabled:
|
|
87
83
|
body: Algumas características deste questionário serão desativadas. Para melhorar a sua experiência, por favor ative o JavaScript no seu navegador.
|
|
88
84
|
title: JavaScript está desativado
|
data/config/locales/ro-RO.yml
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
---
|
|
2
1
|
ro:
|
|
3
2
|
activemodel:
|
|
4
3
|
attributes:
|
|
@@ -122,9 +121,6 @@ ro:
|
|
|
122
121
|
of_total_steps: din %{total_steps}
|
|
123
122
|
questionnaire_closed:
|
|
124
123
|
title: Formular închis
|
|
125
|
-
questionnaire_for_private_users:
|
|
126
|
-
body: Chestionarul este disponibil doar pentru utilizatorii privați
|
|
127
|
-
title: Formular închis
|
|
128
124
|
questionnaire_js_disabled:
|
|
129
125
|
body: Unele dintre funcționalitățile acestui chestionar vor fi dezactivate. Pentru a îți îmbunătăți experiența, te rugăm să activezi JavaScript în browser-ul tău.
|
|
130
126
|
title: JavaScript este dezactivat
|
data/config/locales/ru.yml
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
---
|
|
2
1
|
ru:
|
|
3
2
|
decidim:
|
|
4
3
|
forms:
|
|
@@ -27,9 +26,6 @@ ru:
|
|
|
27
26
|
show:
|
|
28
27
|
questionnaire_closed:
|
|
29
28
|
title: Форма закрыта
|
|
30
|
-
questionnaire_for_private_users:
|
|
31
|
-
body: Форма доступна только для частных пользователей
|
|
32
|
-
title: Форма закрыта
|
|
33
29
|
step_navigation:
|
|
34
30
|
show:
|
|
35
31
|
submit: Отправить
|
data/config/locales/sk.yml
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
---
|
|
2
1
|
sk:
|
|
3
2
|
activemodel:
|
|
4
3
|
attributes:
|
|
@@ -40,9 +39,6 @@ sk:
|
|
|
40
39
|
show:
|
|
41
40
|
questionnaire_closed:
|
|
42
41
|
title: Formulár je uzavretý.
|
|
43
|
-
questionnaire_for_private_users:
|
|
44
|
-
body: Formulár je otvorený len pre súkromných používateľov
|
|
45
|
-
title: Formulár je uzavretý.
|
|
46
42
|
tos_agreement: Účasťou súhlasíte s našimi Podmienkami použitia
|
|
47
43
|
step_navigation:
|
|
48
44
|
show:
|
data/config/locales/sv.yml
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
---
|
|
2
1
|
sv:
|
|
3
2
|
activemodel:
|
|
4
3
|
attributes:
|
|
@@ -181,6 +180,7 @@ sv:
|
|
|
181
180
|
response:
|
|
182
181
|
invalid: Det gick inte att besvara formuläret.
|
|
183
182
|
max_choices_alert: Du har valt för många alternativ
|
|
183
|
+
spam_detected: Det gick inte att svara på formuläret. Kanske har du varit för snabb, kan du försöka igen?
|
|
184
184
|
success: Formuläret har besvarats.
|
|
185
185
|
show:
|
|
186
186
|
current_step: Steg %{step}
|
|
@@ -189,8 +189,8 @@ sv:
|
|
|
189
189
|
questionnaire_closed:
|
|
190
190
|
body: Formuläret är stängt och kan inte besvaras.
|
|
191
191
|
title: Formuläret är stängt
|
|
192
|
-
|
|
193
|
-
body: Formuläret är endast tillgängligt för
|
|
192
|
+
questionnaire_for_members:
|
|
193
|
+
body: Formuläret är endast tillgängligt för medlemmar
|
|
194
194
|
title: Formuläret är stängt
|
|
195
195
|
questionnaire_js_disabled:
|
|
196
196
|
body: Vissa av formulärets funktioner kommer att inaktiveras. Aktivera JavaScript i webbläsaren för att förbättra upplevelsen.
|
data/config/locales/tr-TR.yml
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
---
|
|
2
1
|
tr:
|
|
3
2
|
activemodel:
|
|
4
3
|
attributes:
|
|
@@ -79,9 +78,6 @@ tr:
|
|
|
79
78
|
of_total_steps: '%{total_steps}'
|
|
80
79
|
questionnaire_closed:
|
|
81
80
|
title: Form kapatıldı
|
|
82
|
-
questionnaire_for_private_users:
|
|
83
|
-
body: Form yalnızca özel kullanıcılar tarafından kullanılabilir
|
|
84
|
-
title: Form kapatıldı
|
|
85
81
|
questionnaire_js_disabled:
|
|
86
82
|
body: Bu formun bazı özellikleri devre dışı bırakılacak. Deneyiminizi iyileştirmek için lütfen tarayıcınızda JavaScript'i etkinleştirin.
|
|
87
83
|
title: JavaScript devre dışı
|
data/config/locales/val-ES.yml
CHANGED
data/config/locales/zh-CN.yml
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
---
|
|
2
1
|
zh-CN:
|
|
3
2
|
activemodel:
|
|
4
3
|
attributes:
|
|
@@ -77,9 +76,6 @@ zh-CN:
|
|
|
77
76
|
of_total_steps: '%{total_steps}'
|
|
78
77
|
questionnaire_closed:
|
|
79
78
|
title: 表单已关闭
|
|
80
|
-
questionnaire_for_private_users:
|
|
81
|
-
body: 表单仅供私人用户使用
|
|
82
|
-
title: 表单已关闭
|
|
83
79
|
questionnaire_js_disabled:
|
|
84
80
|
body: 此表单的一些功能将被禁用。为了改善您的体验,请在您的浏览器中启用 JavaScript。
|
|
85
81
|
title: JavaScript 已禁用
|
data/config/locales/zh-TW.yml
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
---
|
|
2
1
|
zh-TW:
|
|
3
2
|
activemodel:
|
|
4
3
|
attributes:
|
|
@@ -94,9 +93,6 @@ zh-TW:
|
|
|
94
93
|
of_total_steps: 的%{total_steps}
|
|
95
94
|
questionnaire_closed:
|
|
96
95
|
title: 表單已關閉
|
|
97
|
-
questionnaire_for_private_users:
|
|
98
|
-
body: 此表單僅適用於私人使用者
|
|
99
|
-
title: 表單已關閉
|
|
100
96
|
questionnaire_js_disabled:
|
|
101
97
|
body: 此表單的某些功能將被禁用。為了改善您的體驗,請在您的瀏覽器中啟用JavaScript。
|
|
102
98
|
title: JavaScript已停用
|
data/decidim-forms.gemspec
CHANGED
|
@@ -2,12 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
$LOAD_PATH.push File.expand_path("lib", __dir__)
|
|
4
4
|
|
|
5
|
-
# Maintain your gem's version:
|
|
6
|
-
require "decidim/forms/version"
|
|
7
|
-
|
|
8
5
|
# Describe your gem and declare its dependencies:
|
|
9
6
|
Gem::Specification.new do |s|
|
|
10
|
-
|
|
7
|
+
version = "0.32.0.rc1"
|
|
8
|
+
s.version = version
|
|
11
9
|
s.authors = ["Josep Jaume Rey Peroy", "Marc Riera Casals", "Oriol Gual Oliva", "Rubén González Valero"]
|
|
12
10
|
s.email = ["josepjaume@gmail.com", "mrc2407@gmail.com", "oriolgual@gmail.com", "rbngzlv@gmail.com"]
|
|
13
11
|
s.license = "AGPL-3.0-or-later"
|
|
@@ -19,7 +17,7 @@ Gem::Specification.new do |s|
|
|
|
19
17
|
"homepage_uri" => "https://decidim.org",
|
|
20
18
|
"source_code_uri" => "https://github.com/decidim/decidim"
|
|
21
19
|
}
|
|
22
|
-
s.required_ruby_version = "~> 3.
|
|
20
|
+
s.required_ruby_version = "~> 3.4.0"
|
|
23
21
|
|
|
24
22
|
s.name = "decidim-forms"
|
|
25
23
|
s.summary = "Decidim forms"
|
|
@@ -32,8 +30,8 @@ Gem::Specification.new do |s|
|
|
|
32
30
|
end
|
|
33
31
|
end
|
|
34
32
|
|
|
35
|
-
s.add_dependency "decidim-core",
|
|
33
|
+
s.add_dependency "decidim-core", version
|
|
36
34
|
|
|
37
|
-
s.add_development_dependency "decidim-admin",
|
|
38
|
-
s.add_development_dependency "decidim-dev",
|
|
35
|
+
s.add_development_dependency "decidim-admin", version
|
|
36
|
+
s.add_development_dependency "decidim-dev", version
|
|
39
37
|
end
|
|
@@ -6,6 +6,7 @@ module Decidim
|
|
|
6
6
|
# The only requirement is to have an ID and the Type name be the class.name + Type
|
|
7
7
|
module QuestionnaireEntityInterface
|
|
8
8
|
include Decidim::Api::Types::BaseInterface
|
|
9
|
+
|
|
9
10
|
description "An interface that can be used in objects with questionnaires"
|
|
10
11
|
|
|
11
12
|
field :id, GraphQL::Types::ID, "ID of this entity", null: false
|
|
@@ -117,14 +117,18 @@ FactoryBot.define do
|
|
|
117
117
|
end
|
|
118
118
|
|
|
119
119
|
trait :with_response_options do
|
|
120
|
-
|
|
121
|
-
Array.new(3).collect
|
|
120
|
+
after(:build) do |question, evaluator|
|
|
121
|
+
question.response_options = Array.new(3).collect do
|
|
122
|
+
build(:response_option, question:, skip_injection: evaluator.skip_injection)
|
|
123
|
+
end
|
|
122
124
|
end
|
|
123
125
|
end
|
|
124
126
|
|
|
125
127
|
trait :conditioned do
|
|
126
|
-
|
|
127
|
-
Array.new(3).collect
|
|
128
|
+
after(:build) do |question, evaluator|
|
|
129
|
+
question.display_conditions = Array.new(3).collect do
|
|
130
|
+
build(:display_condition, question:, skip_injection: evaluator.skip_injection)
|
|
131
|
+
end
|
|
128
132
|
end
|
|
129
133
|
end
|
|
130
134
|
|
|
@@ -194,7 +198,7 @@ FactoryBot.define do
|
|
|
194
198
|
transient do
|
|
195
199
|
skip_injection { false }
|
|
196
200
|
end
|
|
197
|
-
condition_question { create(:questionnaire_question, skip_injection:) }
|
|
201
|
+
condition_question { create(:questionnaire_question, questionnaire: question.questionnaire, skip_injection:) }
|
|
198
202
|
question { create(:questionnaire_question, position: 1, skip_injection:) }
|
|
199
203
|
condition_type { :responded }
|
|
200
204
|
mandatory { true }
|
|
@@ -53,7 +53,7 @@ shared_examples_for "has questionnaire" do
|
|
|
53
53
|
click_on "Submit"
|
|
54
54
|
end
|
|
55
55
|
|
|
56
|
-
expect(page).to
|
|
56
|
+
expect(page).to have_callout(callout_success)
|
|
57
57
|
|
|
58
58
|
visit questionnaire_public_path
|
|
59
59
|
see_questionnaire_questions
|
|
@@ -125,7 +125,7 @@ shared_examples_for "has questionnaire" do
|
|
|
125
125
|
check "questionnaire_tos_agreement"
|
|
126
126
|
accept_confirm { click_on "Submit" }
|
|
127
127
|
|
|
128
|
-
expect(page).to
|
|
128
|
+
expect(page).to have_callout(callout_success)
|
|
129
129
|
|
|
130
130
|
visit questionnaire_public_path
|
|
131
131
|
see_questionnaire_questions
|
|
@@ -269,7 +269,7 @@ shared_examples_for "has questionnaire" do
|
|
|
269
269
|
end
|
|
270
270
|
|
|
271
271
|
it "submits the form and shows errors" do
|
|
272
|
-
expect(page).to
|
|
272
|
+
expect(page).to have_callout(callout_failure)
|
|
273
273
|
expect(page).to have_content("cannot be blank")
|
|
274
274
|
end
|
|
275
275
|
end
|
|
@@ -283,7 +283,7 @@ shared_examples_for "has questionnaire" do
|
|
|
283
283
|
|
|
284
284
|
it "submits the form and shows errors" do
|
|
285
285
|
expect(page).to have_css ".alert.flash"
|
|
286
|
-
expect(page).to
|
|
286
|
+
expect(page).to have_callout(callout_failure)
|
|
287
287
|
different_error = I18n.t("decidim.forms.questionnaires.response.max_choices_alert")
|
|
288
288
|
expect(different_error).to eq("There are too many choices selected")
|
|
289
289
|
expect(page).to have_no_content(different_error)
|
|
@@ -317,7 +317,7 @@ shared_examples_for "has questionnaire" do
|
|
|
317
317
|
end
|
|
318
318
|
|
|
319
319
|
it "submits the form and shows errors" do
|
|
320
|
-
expect(page).to
|
|
320
|
+
expect(page).to have_callout(callout_failure)
|
|
321
321
|
expect(page).to have_content("cannot be blank")
|
|
322
322
|
end
|
|
323
323
|
end
|
|
@@ -391,7 +391,7 @@ shared_examples_for "has questionnaire" do
|
|
|
391
391
|
check "questionnaire_tos_agreement"
|
|
392
392
|
accept_confirm { click_on "Submit" }
|
|
393
393
|
|
|
394
|
-
expect(page).to
|
|
394
|
+
expect(page).to have_callout(callout_success)
|
|
395
395
|
expect(Decidim::Forms::Response.first.choices.first.custom_body).to eq("Cacatua")
|
|
396
396
|
end
|
|
397
397
|
|
|
@@ -406,7 +406,7 @@ shared_examples_for "has questionnaire" do
|
|
|
406
406
|
check "questionnaire_tos_agreement"
|
|
407
407
|
accept_confirm { click_on "Submit" }
|
|
408
408
|
|
|
409
|
-
expect(page).to
|
|
409
|
+
expect(page).to have_callout("There was a problem responding")
|
|
410
410
|
expect(page).to have_field("questionnaire_responses_0_choices_2_custom_body", with: "Cacatua")
|
|
411
411
|
end
|
|
412
412
|
|
|
@@ -433,7 +433,7 @@ shared_examples_for "has questionnaire" do
|
|
|
433
433
|
check "questionnaire_tos_agreement"
|
|
434
434
|
accept_confirm { click_on "Submit" }
|
|
435
435
|
|
|
436
|
-
expect(page).to
|
|
436
|
+
expect(page).to have_callout(callout_success)
|
|
437
437
|
expect(Decidim::Forms::Response.first.choices.first.custom_body).to eq("Cacatua")
|
|
438
438
|
end
|
|
439
439
|
|
|
@@ -448,7 +448,7 @@ shared_examples_for "has questionnaire" do
|
|
|
448
448
|
check "questionnaire_tos_agreement"
|
|
449
449
|
accept_confirm { click_on "Submit" }
|
|
450
450
|
|
|
451
|
-
expect(page).to
|
|
451
|
+
expect(page).to have_callout("There was a problem responding")
|
|
452
452
|
expect(page).to have_field("questionnaire_responses_0_choices_2_custom_body", with: "Cacatua")
|
|
453
453
|
end
|
|
454
454
|
|
|
@@ -500,7 +500,7 @@ shared_examples_for "has questionnaire" do
|
|
|
500
500
|
|
|
501
501
|
accept_confirm { click_on "Submit" }
|
|
502
502
|
|
|
503
|
-
expect(page).to
|
|
503
|
+
expect(page).to have_callout(callout_success)
|
|
504
504
|
|
|
505
505
|
visit questionnaire_public_path
|
|
506
506
|
see_questionnaire_questions
|
|
@@ -529,7 +529,7 @@ shared_examples_for "has questionnaire" do
|
|
|
529
529
|
|
|
530
530
|
accept_confirm { click_on "Submit" }
|
|
531
531
|
|
|
532
|
-
expect(page).to
|
|
532
|
+
expect(page).to have_callout(callout_success)
|
|
533
533
|
|
|
534
534
|
visit questionnaire_public_path
|
|
535
535
|
see_questionnaire_questions
|
|
@@ -556,14 +556,14 @@ shared_examples_for "has questionnaire" do
|
|
|
556
556
|
|
|
557
557
|
accept_confirm { click_on "Submit" }
|
|
558
558
|
|
|
559
|
-
expect(page).to
|
|
559
|
+
expect(page).to have_callout("There was a problem responding")
|
|
560
560
|
expect(page).to have_content("are too many")
|
|
561
561
|
|
|
562
562
|
uncheck response_options[2]["body"][:en]
|
|
563
563
|
|
|
564
564
|
accept_confirm { click_on "Submit" }
|
|
565
565
|
|
|
566
|
-
expect(page).to
|
|
566
|
+
expect(page).to have_callout(callout_success)
|
|
567
567
|
end
|
|
568
568
|
end
|
|
569
569
|
|
|
@@ -606,7 +606,7 @@ shared_examples_for "has questionnaire" do
|
|
|
606
606
|
|
|
607
607
|
accept_confirm { click_on "Submit" }
|
|
608
608
|
|
|
609
|
-
expect(page).to
|
|
609
|
+
expect(page).to have_callout(callout_success)
|
|
610
610
|
expect(Decidim::Forms::Response.first.choices.pluck(:position, :body)).to eq(
|
|
611
611
|
[[0, "We"], [1, "all"], [2, "like"], [3, "dark"], [4, "chocolate"]]
|
|
612
612
|
)
|
|
@@ -647,7 +647,7 @@ shared_examples_for "has questionnaire" do
|
|
|
647
647
|
|
|
648
648
|
accept_confirm { click_on "Submit" }
|
|
649
649
|
|
|
650
|
-
expect(page).to
|
|
650
|
+
expect(page).to have_callout(callout_success)
|
|
651
651
|
|
|
652
652
|
visit questionnaire_public_path
|
|
653
653
|
see_questionnaire_questions
|
|
@@ -670,7 +670,7 @@ shared_examples_for "has questionnaire" do
|
|
|
670
670
|
|
|
671
671
|
accept_confirm { click_on "Submit" }
|
|
672
672
|
|
|
673
|
-
expect(page).to
|
|
673
|
+
expect(page).to have_callout("There was a problem responding")
|
|
674
674
|
|
|
675
675
|
radio_buttons = page.all(".js-radio-button-collection input[type=radio]")
|
|
676
676
|
expect(radio_buttons.pluck(:checked)).to eq([nil, "true", nil, nil])
|
|
@@ -689,7 +689,7 @@ shared_examples_for "has questionnaire" do
|
|
|
689
689
|
check "questionnaire_tos_agreement"
|
|
690
690
|
accept_confirm { click_on "Submit" }
|
|
691
691
|
|
|
692
|
-
expect(page).to
|
|
692
|
+
expect(page).to have_callout("There was a problem responding")
|
|
693
693
|
expect(page).to have_content("Choices are not complete")
|
|
694
694
|
end
|
|
695
695
|
end
|
|
@@ -732,7 +732,7 @@ shared_examples_for "has questionnaire" do
|
|
|
732
732
|
|
|
733
733
|
accept_confirm { click_on "Submit" }
|
|
734
734
|
|
|
735
|
-
expect(page).to
|
|
735
|
+
expect(page).to have_callout(callout_success)
|
|
736
736
|
|
|
737
737
|
visit questionnaire_public_path
|
|
738
738
|
see_questionnaire_questions
|
|
@@ -779,7 +779,7 @@ shared_examples_for "has questionnaire" do
|
|
|
779
779
|
|
|
780
780
|
accept_confirm { click_on "Submit" }
|
|
781
781
|
|
|
782
|
-
expect(page).to
|
|
782
|
+
expect(page).to have_callout("There was a problem responding")
|
|
783
783
|
expect(page).to have_content("are too many")
|
|
784
784
|
|
|
785
785
|
checkboxes = page.all(".js-check-box-collection input[type=checkbox]")
|
|
@@ -788,7 +788,7 @@ shared_examples_for "has questionnaire" do
|
|
|
788
788
|
|
|
789
789
|
accept_confirm { click_on "Submit" }
|
|
790
790
|
|
|
791
|
-
expect(page).to
|
|
791
|
+
expect(page).to have_callout(callout_success)
|
|
792
792
|
end
|
|
793
793
|
end
|
|
794
794
|
|
|
@@ -805,7 +805,7 @@ shared_examples_for "has questionnaire" do
|
|
|
805
805
|
check "questionnaire_tos_agreement"
|
|
806
806
|
accept_confirm { click_on "Submit" }
|
|
807
807
|
|
|
808
|
-
expect(page).to
|
|
808
|
+
expect(page).to have_callout("There was a problem responding")
|
|
809
809
|
expect(page).to have_content("Choices are not complete")
|
|
810
810
|
end
|
|
811
811
|
end
|
|
@@ -826,7 +826,7 @@ shared_examples_for "has questionnaire" do
|
|
|
826
826
|
check "questionnaire_tos_agreement"
|
|
827
827
|
accept_confirm { click_on "Submit" }
|
|
828
828
|
|
|
829
|
-
expect(page).to
|
|
829
|
+
expect(page).to have_callout("There was a problem responding")
|
|
830
830
|
|
|
831
831
|
checkboxes = page.all(".js-check-box-collection input[type=checkbox]")
|
|
832
832
|
expect(checkboxes.pluck(:checked)).to eq(["true", "true", "true", nil, nil, "true"])
|
|
@@ -1373,7 +1373,7 @@ shared_examples_for "has questionnaire" do
|
|
|
1373
1373
|
|
|
1374
1374
|
accept_confirm { click_on "Submit" }
|
|
1375
1375
|
|
|
1376
|
-
expect(page).to
|
|
1376
|
+
expect(page).to have_callout(callout_success)
|
|
1377
1377
|
end
|
|
1378
1378
|
end
|
|
1379
1379
|
end
|
|
@@ -54,7 +54,7 @@ shared_examples_for "add questions" do
|
|
|
54
54
|
|
|
55
55
|
click_on "Save"
|
|
56
56
|
|
|
57
|
-
expect(page).to
|
|
57
|
+
expect(page).to have_callout(callout_success)
|
|
58
58
|
|
|
59
59
|
visit_manage_questions_and_expand_all
|
|
60
60
|
|
|
@@ -76,7 +76,7 @@ shared_examples_for "add questions" do
|
|
|
76
76
|
|
|
77
77
|
click_on "Save"
|
|
78
78
|
|
|
79
|
-
expect(page).to
|
|
79
|
+
expect(page).to have_callout(callout_success)
|
|
80
80
|
|
|
81
81
|
update_component_settings_or_attributes
|
|
82
82
|
|
|
@@ -98,7 +98,7 @@ shared_examples_for "add questions" do
|
|
|
98
98
|
|
|
99
99
|
click_on "Save"
|
|
100
100
|
|
|
101
|
-
expect(page).to
|
|
101
|
+
expect(page).to have_callout(callout_success)
|
|
102
102
|
|
|
103
103
|
update_component_settings_or_attributes
|
|
104
104
|
|
|
@@ -152,7 +152,7 @@ shared_examples_for "add questions" do
|
|
|
152
152
|
|
|
153
153
|
click_on "Save"
|
|
154
154
|
|
|
155
|
-
expect(page).to
|
|
155
|
+
expect(page).to have_callout(callout_success)
|
|
156
156
|
|
|
157
157
|
visit_manage_questions_and_expand_all
|
|
158
158
|
|
|
@@ -21,7 +21,7 @@ shared_examples_for "update questions" do
|
|
|
21
21
|
|
|
22
22
|
click_on "Save"
|
|
23
23
|
|
|
24
|
-
expect(page).to
|
|
24
|
+
expect(page).to have_callout(callout_success)
|
|
25
25
|
|
|
26
26
|
visit_manage_questions_and_expand_all
|
|
27
27
|
|
|
@@ -47,7 +47,7 @@ shared_examples_for "update questions" do
|
|
|
47
47
|
click_on "Save"
|
|
48
48
|
click_on "Expand all questions"
|
|
49
49
|
|
|
50
|
-
expect(page).to
|
|
50
|
+
expect(page).to have_callout(callout_failure)
|
|
51
51
|
expect(page).to have_content("cannot be blank", count: 5)
|
|
52
52
|
expect(page).to have_content("must be greater than or equal to 0", count: 1)
|
|
53
53
|
|
|
@@ -83,7 +83,7 @@ shared_examples_for "update questions" do
|
|
|
83
83
|
|
|
84
84
|
click_on "Save"
|
|
85
85
|
|
|
86
|
-
expect(page).to
|
|
86
|
+
expect(page).to have_callout(callout_success)
|
|
87
87
|
|
|
88
88
|
click_on "Questions"
|
|
89
89
|
|
|
@@ -118,7 +118,7 @@ shared_examples_for "update questions" do
|
|
|
118
118
|
|
|
119
119
|
click_on "Save"
|
|
120
120
|
|
|
121
|
-
expect(page).to
|
|
121
|
+
expect(page).to have_callout(callout_success)
|
|
122
122
|
|
|
123
123
|
visit_manage_questions_and_expand_all
|
|
124
124
|
|
|
@@ -137,7 +137,7 @@ shared_examples_for "update questions" do
|
|
|
137
137
|
|
|
138
138
|
expand_all_questions
|
|
139
139
|
|
|
140
|
-
expect(page).to
|
|
140
|
+
expect(page).to have_callout(callout_failure)
|
|
141
141
|
expect(page).to have_content("cannot be blank", count: 1)
|
|
142
142
|
expect(page).to have_css("input[value='']")
|
|
143
143
|
expect(page).to have_no_css("input[value='This is the first title and description']")
|
|
@@ -167,7 +167,7 @@ shared_examples_for "update questions" do
|
|
|
167
167
|
|
|
168
168
|
click_on "Save"
|
|
169
169
|
|
|
170
|
-
expect(page).to
|
|
170
|
+
expect(page).to have_callout(callout_success)
|
|
171
171
|
|
|
172
172
|
click_on "Questions"
|
|
173
173
|
|
|
@@ -237,7 +237,7 @@ shared_examples_for "update questions" do
|
|
|
237
237
|
|
|
238
238
|
click_on "Save"
|
|
239
239
|
|
|
240
|
-
expect(page).to
|
|
240
|
+
expect(page).to have_callout(callout_success)
|
|
241
241
|
|
|
242
242
|
visit_manage_questions_and_expand_all
|
|
243
243
|
|
|
@@ -300,7 +300,7 @@ shared_examples_for "update questions" do
|
|
|
300
300
|
|
|
301
301
|
click_on "Save"
|
|
302
302
|
|
|
303
|
-
expect(page).to
|
|
303
|
+
expect(page).to have_callout(callout_success)
|
|
304
304
|
|
|
305
305
|
visit_manage_questions_and_expand_all
|
|
306
306
|
|
|
@@ -592,7 +592,7 @@ shared_examples_for "update questions" do
|
|
|
592
592
|
sleep 0.5
|
|
593
593
|
|
|
594
594
|
click_on "Save"
|
|
595
|
-
expect(page).to
|
|
595
|
+
expect(page).to have_callout(callout_success)
|
|
596
596
|
|
|
597
597
|
visit_manage_questions_and_expand_all
|
|
598
598
|
|