decidim-forms 0.18.0 → 0.18.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/config/locales/cs.yml +1 -1
- data/config/locales/de.yml +1 -1
- data/config/locales/fr.yml +3 -3
- data/config/locales/it.yml +1 -1
- data/config/locales/no.yml +7 -0
- data/lib/decidim/forms/test/shared_examples/manage_questionnaires.rb +36 -10
- data/lib/decidim/forms/version.rb +1 -1
- metadata +10 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d1f739e99aa949b0c152539fdb879902ff12d2d28004b59d8d00316a48e71fff
|
4
|
+
data.tar.gz: 92e86b5dea1b22fd8432d8e5fee5aecb8f35a4a144d1ccaa7ed1f7107680cb60
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a762c17fc2c49dfb3b0d6317cfa170ff267422ef8abaf37eed0f1addaf057ded807fc181a3d85ecfde6724b12089a88f2afefdd2005529c513dd651dccb98e51
|
7
|
+
data.tar.gz: 0b84771051699336925d54983224785ff10a01a25b3fd8b4d3f3d9f161ecc7b9ab6e4542d96e19c4f8b6e23981a33c735b78547fab41720e5204a1bbc3940e14
|
data/config/locales/cs.yml
CHANGED
@@ -75,7 +75,7 @@ cs:
|
|
75
75
|
questionnaire_for_private_users:
|
76
76
|
body: Dotazník je k dispozici pouze pro soukromé uživatele
|
77
77
|
title: Dotazník byl uzavřen
|
78
|
-
submit:
|
78
|
+
submit: Odeslat
|
79
79
|
tos_agreement: Účastí přijímáte jeho smluvní podmínky
|
80
80
|
user_answers_serializer:
|
81
81
|
created_at: Zodpovězeno
|
data/config/locales/de.yml
CHANGED
data/config/locales/fr.yml
CHANGED
@@ -37,12 +37,12 @@ fr:
|
|
37
37
|
question:
|
38
38
|
add_answer_option: Ajouter une option de réponse
|
39
39
|
any: Tout
|
40
|
-
description:
|
41
|
-
down:
|
40
|
+
description: Description
|
41
|
+
down: Descendre
|
42
42
|
question: Question
|
43
43
|
remove: Retirer
|
44
44
|
statement: Déclaration
|
45
|
-
up:
|
45
|
+
up: Monter
|
46
46
|
update:
|
47
47
|
invalid: Il y a eu des erreurs lors de la sauvegarde du questionnaire.
|
48
48
|
success: Questionnaires sauvegardés avec succès.
|
data/config/locales/it.yml
CHANGED
@@ -75,7 +75,7 @@ it:
|
|
75
75
|
questionnaire_for_private_users:
|
76
76
|
body: Il questionario è disponibile solo per gli utenti privati
|
77
77
|
title: Questionario chiuso
|
78
|
-
submit:
|
78
|
+
submit: Invia
|
79
79
|
tos_agreement: Partecipando accetti i suoi Termini di servizio
|
80
80
|
user_answers_serializer:
|
81
81
|
created_at: Risposto
|
@@ -91,23 +91,44 @@ shared_examples_for "manage questionnaires" do
|
|
91
91
|
end
|
92
92
|
|
93
93
|
it "adds a question with answer options" do
|
94
|
-
question_body = "This is the first question"
|
95
|
-
answer_options_body = [
|
94
|
+
question_body = ["This is the first question", "This is the second question"]
|
95
|
+
answer_options_body = [
|
96
|
+
[
|
97
|
+
"This is the Q1 first option",
|
98
|
+
"This is the Q1 second option",
|
99
|
+
"This is the Q1 third option"
|
100
|
+
],
|
101
|
+
[
|
102
|
+
"This is the Q2 first option",
|
103
|
+
"This is the Q2 second option",
|
104
|
+
"This is the Q2 third option"
|
105
|
+
]
|
106
|
+
]
|
96
107
|
|
97
108
|
within "form.edit_questionnaire" do
|
98
109
|
click_button "Add question"
|
110
|
+
click_button "Add question"
|
99
111
|
|
100
|
-
|
101
|
-
|
112
|
+
page.all(".questionnaire-question").each_with_index do |question, idx|
|
113
|
+
within question do
|
114
|
+
fill_in find_nested_form_field_locator("body_en"), with: question_body[idx]
|
115
|
+
end
|
102
116
|
end
|
103
117
|
|
104
118
|
expect(page).to have_no_content "Add answer option"
|
105
119
|
|
106
|
-
|
120
|
+
page.all(".questionnaire-question").each do |question|
|
121
|
+
within question do
|
122
|
+
select "Single option", from: "Type"
|
123
|
+
click_button "Add answer option"
|
124
|
+
end
|
125
|
+
end
|
107
126
|
|
108
|
-
page.all(".questionnaire-question
|
109
|
-
|
110
|
-
|
127
|
+
page.all(".questionnaire-question").each_with_index do |question, idx|
|
128
|
+
question.all(".questionnaire-question-answer-option").each_with_index do |question_answer_option, aidx|
|
129
|
+
within question_answer_option do
|
130
|
+
fill_in find_nested_form_field_locator("body_en"), with: answer_options_body[idx][aidx]
|
131
|
+
end
|
111
132
|
end
|
112
133
|
end
|
113
134
|
|
@@ -119,8 +140,13 @@ shared_examples_for "manage questionnaires" do
|
|
119
140
|
visit questionnaire_edit_path
|
120
141
|
|
121
142
|
expect(page).to have_selector("input[value='This is the first question']")
|
122
|
-
expect(page).to have_selector("input[value='This is the first option']")
|
123
|
-
expect(page).to have_selector("input[value='This is the second option']")
|
143
|
+
expect(page).to have_selector("input[value='This is the Q1 first option']")
|
144
|
+
expect(page).to have_selector("input[value='This is the Q1 second option']")
|
145
|
+
expect(page).to have_selector("input[value='This is the Q1 third option']")
|
146
|
+
expect(page).to have_selector("input[value='This is the second question']")
|
147
|
+
expect(page).to have_selector("input[value='This is the Q2 first option']")
|
148
|
+
expect(page).to have_selector("input[value='This is the Q2 second option']")
|
149
|
+
expect(page).to have_selector("input[value='This is the Q2 third option']")
|
124
150
|
end
|
125
151
|
|
126
152
|
it "adds a sane number of options for each attribute type" do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: decidim-forms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.18.
|
4
|
+
version: 0.18.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josep Jaume Rey Peroy
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2019-
|
14
|
+
date: 2019-10-21 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: decidim-core
|
@@ -19,42 +19,42 @@ dependencies:
|
|
19
19
|
requirements:
|
20
20
|
- - '='
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: 0.18.
|
22
|
+
version: 0.18.1
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
27
|
- - '='
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: 0.18.
|
29
|
+
version: 0.18.1
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
31
|
name: decidim-admin
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|
33
33
|
requirements:
|
34
34
|
- - '='
|
35
35
|
- !ruby/object:Gem::Version
|
36
|
-
version: 0.18.
|
36
|
+
version: 0.18.1
|
37
37
|
type: :development
|
38
38
|
prerelease: false
|
39
39
|
version_requirements: !ruby/object:Gem::Requirement
|
40
40
|
requirements:
|
41
41
|
- - '='
|
42
42
|
- !ruby/object:Gem::Version
|
43
|
-
version: 0.18.
|
43
|
+
version: 0.18.1
|
44
44
|
- !ruby/object:Gem::Dependency
|
45
45
|
name: decidim-dev
|
46
46
|
requirement: !ruby/object:Gem::Requirement
|
47
47
|
requirements:
|
48
48
|
- - '='
|
49
49
|
- !ruby/object:Gem::Version
|
50
|
-
version: 0.18.
|
50
|
+
version: 0.18.1
|
51
51
|
type: :development
|
52
52
|
prerelease: false
|
53
53
|
version_requirements: !ruby/object:Gem::Requirement
|
54
54
|
requirements:
|
55
55
|
- - '='
|
56
56
|
- !ruby/object:Gem::Version
|
57
|
-
version: 0.18.
|
57
|
+
version: 0.18.1
|
58
58
|
description: A forms gem for decidim.
|
59
59
|
email:
|
60
60
|
- josepjaume@gmail.com
|
@@ -130,6 +130,7 @@ files:
|
|
130
130
|
- config/locales/id-ID.yml
|
131
131
|
- config/locales/it.yml
|
132
132
|
- config/locales/nl.yml
|
133
|
+
- config/locales/no.yml
|
133
134
|
- config/locales/pl.yml
|
134
135
|
- config/locales/pt-BR.yml
|
135
136
|
- config/locales/pt.yml
|
@@ -172,8 +173,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
172
173
|
- !ruby/object:Gem::Version
|
173
174
|
version: '0'
|
174
175
|
requirements: []
|
175
|
-
|
176
|
-
rubygems_version: 2.7.6
|
176
|
+
rubygems_version: 3.0.3
|
177
177
|
signing_key:
|
178
178
|
specification_version: 4
|
179
179
|
summary: Decidim forms
|