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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d354b6d1272004fbe129e57e706ecb2bce8f7f37e5a2f32c530d8df96d862e98
4
- data.tar.gz: 8cb45ad3b2d7b7fa4518720215d4fa89428345e1fb4825dd4ad6768f967a11d9
3
+ metadata.gz: d1f739e99aa949b0c152539fdb879902ff12d2d28004b59d8d00316a48e71fff
4
+ data.tar.gz: 92e86b5dea1b22fd8432d8e5fee5aecb8f35a4a144d1ccaa7ed1f7107680cb60
5
5
  SHA512:
6
- metadata.gz: 253ca5e79fc6adedad3512672df12413dd3eba8c7e26b75b0bf0e984b99c04694485361040c84f06370793fc54e8d8d802ab886fd75e60955ffcfb94bc421d72
7
- data.tar.gz: 3e73bed78008ffaa519a264948234aa8af20b3c4279e16076214454c8453988f9f4ebf2f92b1d6d7b6a659e5f9a967f25b4c03126ae3a8aa339ea3f9a3b2ae2e
6
+ metadata.gz: a762c17fc2c49dfb3b0d6317cfa170ff267422ef8abaf37eed0f1addaf057ded807fc181a3d85ecfde6724b12089a88f2afefdd2005529c513dd651dccb98e51
7
+ data.tar.gz: 0b84771051699336925d54983224785ff10a01a25b3fd8b4d3f3d9f161ecc7b9ab6e4542d96e19c4f8b6e23981a33c735b78547fab41720e5204a1bbc3940e14
@@ -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: Předložit
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
@@ -29,7 +29,7 @@ de:
29
29
  remove: Löschen
30
30
  statement: Aussage
31
31
  edit:
32
- save: sparen
32
+ save: Speichern
33
33
  title: Titel
34
34
  form:
35
35
  add_question: Frage hinzufügen
@@ -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: La description
41
- down: Vers le bas
40
+ description: Description
41
+ down: Descendre
42
42
  question: Question
43
43
  remove: Retirer
44
44
  statement: Déclaration
45
- up: Vers le haut
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.
@@ -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: Sottoscrivi
78
+ submit: Invia
79
79
  tos_agreement: Partecipando accetti i suoi Termini di servizio
80
80
  user_answers_serializer:
81
81
  created_at: Risposto
@@ -0,0 +1,7 @@
1
+ "no":
2
+ decidim:
3
+ forms:
4
+ admin:
5
+ questionnaires:
6
+ edit:
7
+ title: Tittel
@@ -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 = ["This is the first option", "This is the second option"]
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
- within ".questionnaire-question" do
101
- fill_in find_nested_form_field_locator("body_en"), with: question_body
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
- select "Single option", from: "Type"
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-answer-option").each_with_index do |question_answer_option, idx|
109
- within question_answer_option do
110
- fill_in find_nested_form_field_locator("body_en"), with: answer_options_body[idx]
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
@@ -4,7 +4,7 @@ module Decidim
4
4
  # This holds the decidim-forms version.
5
5
  module Forms
6
6
  def self.version
7
- "0.18.0"
7
+ "0.18.1"
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-forms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.18.0
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-07-03 00:00:00.000000000 Z
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.0
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.0
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.0
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.0
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.0
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.0
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
- rubyforge_project:
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