@sap-ux/ui5-test-writer 1.19.0 → 1.19.1

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.
package/dist/types.d.ts CHANGED
@@ -143,6 +143,7 @@ export type SectionFormField = {
143
143
  connectedFields?: string;
144
144
  fieldGroup?: string;
145
145
  targetAnnotation?: string;
146
+ checkBoxGroup?: boolean;
146
147
  };
147
148
  export type TableColumn = {
148
149
  header?: string;
@@ -487,8 +487,10 @@ function extractFormFields(subSection, convertedMetadata, entitySetName) {
487
487
  });
488
488
  }
489
489
  else if (annotationParts.property === 'FieldGroup' && entityType) {
490
- resolveFieldGroupInnerProperties(entityType, qualifier).forEach((property) => {
491
- fields.push({ property, fieldGroup: qualifier });
490
+ const innerProperties = resolveFieldGroupInnerProperties(entityType, qualifier);
491
+ const checkBoxGroup = isCheckBoxGroup(entityType, innerProperties);
492
+ innerProperties.forEach((property) => {
493
+ fields.push({ property, fieldGroup: qualifier, ...(checkBoxGroup && { checkBoxGroup }) });
492
494
  });
493
495
  }
494
496
  // ConnectedFields/FieldGroup without metadata: skip
@@ -537,6 +539,21 @@ function resolveFieldGroupInnerProperties(entityType, qualifier) {
537
539
  const dataFields = annotation?.Data ?? [];
538
540
  return dataFields.map((dataField) => dataField?.Value?.path).filter((path) => Boolean(path));
539
541
  }
542
+ /**
543
+ * Determines whether a FieldGroup's inner properties render as a group of checkboxes.
544
+ *
545
+ * Fiori Elements renders a nested FieldGroup as a checkbox group when every inner field is boolean.
546
+ * Such members live inside a single FormElement and are not addressable by the sap.fe.test.api form API,
547
+ * so the generator must flag them to avoid emitting unpassable `iCheckField` steps.
548
+ *
549
+ * @param entityType - the entity type carrying the properties
550
+ * @param properties - the FieldGroup inner property paths
551
+ * @returns true when the group is non-empty and all inner properties are `Edm.Boolean`
552
+ */
553
+ function isCheckBoxGroup(entityType, properties) {
554
+ return (properties.length > 0 &&
555
+ properties.every((property) => entityType.entityProperties.find((p) => p.name === property)?.type === 'Edm.Boolean'));
556
+ }
540
557
  /**
541
558
  * Looks up the entity type for the given entity set name in the converted metadata.
542
559
  *
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sap-ux/ui5-test-writer",
3
3
  "description": "SAP UI5 tests writer",
4
- "version": "1.19.0",
4
+ "version": "1.19.1",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/SAP/open-ux-tools.git",
@@ -30,9 +30,9 @@
30
30
  "@sap-ux/annotation-converter": "0.10.22",
31
31
  "@sap-ux/ui5-application-writer": "2.1.6",
32
32
  "@sap-ux/logger": "1.0.3",
33
- "@sap-ux/fiori-generator-shared": "1.2.22",
33
+ "@sap-ux/fiori-generator-shared": "1.2.23",
34
34
  "@sap-ux/project-access": "2.3.1",
35
- "@sap-ux/preview-middleware": "1.2.27"
35
+ "@sap-ux/preview-middleware": "1.2.28"
36
36
  },
37
37
  "devDependencies": {
38
38
  "@jest/globals": "30.4.1",
@@ -187,8 +187,15 @@ sap.ui.define([
187
187
  Then.onThe<%- name%>Generated.iCheckSubSection({ section: "<%- subSection.id %>" });
188
188
  <% } -%>
189
189
  <% if (subSection.fields && subSection.fields.length > 0) { -%>
190
- <% subSection.fields.forEach(function(field) { -%>
190
+ <% subSection.fields.forEach(function(field, fieldIndex) { -%>
191
+ <% if (field.checkBoxGroup) { -%>
192
+ <% if (fieldIndex === 0 || !subSection.fields[fieldIndex - 1].checkBoxGroup) { -%>
193
+ // Checkbox-group members cannot be addressed by sap.fe.test.api
194
+ <% } -%>
195
+ // Then.onThe<%- name%>Generated.onForm({ section: "<%- subSection.id %>" }).iCheckField({ property: "<%- field.property %>", fieldGroup: "<%- field.fieldGroup %>" });
196
+ <% } else { -%>
191
197
  Then.onThe<%- name%>Generated.onForm({ section: "<%- subSection.id %>" }).iCheckField({ property: "<%- field.property %>"<% if (field.connectedFields) { %>, connectedFields: "<%- field.connectedFields %>"<% } %><% if (field.fieldGroup) { %>, fieldGroup: "<%- field.fieldGroup %>"<% } %> });
198
+ <% } -%>
192
199
  <% }) -%>
193
200
  <% } -%>
194
201
  <% if (subSection.tableColumns && Object.keys(subSection.tableColumns).length > 0 && subSection.navigationProperty) { -%>
@@ -197,8 +204,15 @@ sap.ui.define([
197
204
  <% }) -%>
198
205
  <% } else { -%>
199
206
  <% if (section.fields && section.fields.length > 0) { -%>
200
- <% section.fields.forEach(function(field) { -%>
207
+ <% section.fields.forEach(function(field, fieldIndex) { -%>
208
+ <% if (field.checkBoxGroup) { -%>
209
+ <% if (fieldIndex === 0 || !section.fields[fieldIndex - 1].checkBoxGroup) { -%>
210
+ // Checkbox-group members cannot be addressed by sap.fe.test.api
211
+ <% } -%>
212
+ // Then.onThe<%- name%>Generated.onForm({ section: "<%- section.id %>" }).iCheckField({ property: "<%- field.property %>", fieldGroup: "<%- field.fieldGroup %>" });
213
+ <% } else { -%>
201
214
  Then.onThe<%- name%>Generated.onForm({ section: "<%- section.id %>" }).iCheckField({ property: "<%- field.property %>"<% if (field.connectedFields) { %>, connectedFields: "<%- field.connectedFields %>"<% } %><% if (field.fieldGroup) { %>, fieldGroup: "<%- field.fieldGroup %>"<% } %> });
215
+ <% } -%>
202
216
  <% }) -%>
203
217
  <% } -%>
204
218
  <% if (section.tableColumns && Object.keys(section.tableColumns).length > 0 && section.navigationProperty) { -%>
@@ -23,9 +23,9 @@ const usesFieldIdentifier = (headerSections || []).some(function(section) {
23
23
  });
24
24
  const usesFormIdentifier = (bodySections || []).some(function(section) {
25
25
  const subSectionsHaveForm = (section.subSections || []).some(function(sub) {
26
- return sub.fields && sub.fields.length > 0;
26
+ return sub.fields && sub.fields.some(function(field) { return !field.checkBoxGroup; });
27
27
  });
28
- const sectionHasFormFields = !(section.subSections && section.subSections.length > 0) && section.fields && section.fields.length > 0;
28
+ const sectionHasFormFields = !(section.subSections && section.subSections.length > 0) && section.fields && section.fields.some(function(field) { return !field.checkBoxGroup; });
29
29
  const hasFormAction = (section.actions || []).some(function(action) {
30
30
  return action.visible && !(section.isTable && section.navigationProperty);
31
31
  });
@@ -208,8 +208,15 @@ function journey() {
208
208
  Then.onThe<%- name%>Generated.iCheckSubSection({ section: "<%- subSection.id %>" }, {});
209
209
  <% } -%>
210
210
  <% if (subSection.fields && subSection.fields.length > 0) { -%>
211
- <% subSection.fields.forEach(function(field) { -%>
211
+ <% subSection.fields.forEach(function(field, fieldIndex) { -%>
212
+ <% if (field.checkBoxGroup) { -%>
213
+ <% if (fieldIndex === 0 || !subSection.fields[fieldIndex - 1].checkBoxGroup) { -%>
214
+ // Checkbox-group members cannot be addressed by sap.fe.test.api
215
+ <% } -%>
216
+ // Then.onThe<%- name%>Generated.onForm({ section: "<%- subSection.id %>" } as unknown as FormIdentifier).iCheckField({ property: "<%- field.property %>", fieldGroup: "<%- field.fieldGroup %>" });
217
+ <% } else { -%>
212
218
  Then.onThe<%- name%>Generated.onForm({ section: "<%- subSection.id %>" } as unknown as FormIdentifier).iCheckField({ property: "<%- field.property %>"<% if (field.connectedFields) { %>, connectedFields: "<%- field.connectedFields %>"<% } %><% if (field.fieldGroup) { %>, fieldGroup: "<%- field.fieldGroup %>"<% } %> });
219
+ <% } -%>
213
220
  <% }) -%>
214
221
  <% } -%>
215
222
  <% if (subSection.tableColumns && Object.keys(subSection.tableColumns).length > 0 && subSection.navigationProperty) { -%>
@@ -218,8 +225,15 @@ function journey() {
218
225
  <% }) -%>
219
226
  <% } else { -%>
220
227
  <% if (section.fields && section.fields.length > 0) { -%>
221
- <% section.fields.forEach(function(field) { -%>
228
+ <% section.fields.forEach(function(field, fieldIndex) { -%>
229
+ <% if (field.checkBoxGroup) { -%>
230
+ <% if (fieldIndex === 0 || !section.fields[fieldIndex - 1].checkBoxGroup) { -%>
231
+ // Checkbox-group members cannot be addressed by sap.fe.test.api
232
+ <% } -%>
233
+ // Then.onThe<%- name%>Generated.onForm({ section: "<%- section.id %>" } as unknown as FormIdentifier).iCheckField({ property: "<%- field.property %>", fieldGroup: "<%- field.fieldGroup %>" });
234
+ <% } else { -%>
222
235
  Then.onThe<%- name%>Generated.onForm({ section: "<%- section.id %>" } as unknown as FormIdentifier).iCheckField({ property: "<%- field.property %>"<% if (field.connectedFields) { %>, connectedFields: "<%- field.connectedFields %>"<% } %><% if (field.fieldGroup) { %>, fieldGroup: "<%- field.fieldGroup %>"<% } %> });
236
+ <% } -%>
223
237
  <% }) -%>
224
238
  <% } -%>
225
239
  <% if (section.tableColumns && Object.keys(section.tableColumns).length > 0 && section.navigationProperty) { -%>
@@ -255,8 +255,15 @@ sap.ui.define([
255
255
  Then.onThe<%- name%>Generated.iCheckSubSection({ section: "<%- subSection.id %>" });
256
256
  <% } -%>
257
257
  <% if (subSection.fields && subSection.fields.length > 0) { -%>
258
- <% subSection.fields.forEach(function(field) { -%>
258
+ <% subSection.fields.forEach(function(field, fieldIndex) { -%>
259
+ <% if (field.checkBoxGroup) { -%>
260
+ <% if (fieldIndex === 0 || !subSection.fields[fieldIndex - 1].checkBoxGroup) { -%>
261
+ // Checkbox-group members cannot be addressed by sap.fe.test.api
262
+ <% } -%>
263
+ // Then.onThe<%- name%>Generated.onForm({ section: "<%- subSection.id %>" }).iCheckField({ property: "<%- field.property %>", fieldGroup: "<%- field.fieldGroup %>" });
264
+ <% } else { -%>
259
265
  Then.onThe<%- name%>Generated.onForm({ section: "<%- subSection.id %>" }).iCheckField({ property: "<%- field.property %>"<% if (field.connectedFields) { %>, connectedFields: "<%- field.connectedFields %>"<% } %><% if (field.fieldGroup) { %>, fieldGroup: "<%- field.fieldGroup %>"<% } %> });
266
+ <% } -%>
260
267
  <% }) -%>
261
268
  <% } -%>
262
269
  <% subSection.contactCardFields.forEach(function(field) { -%>
@@ -275,8 +282,15 @@ sap.ui.define([
275
282
  <% }) -%>
276
283
  <% } else { -%>
277
284
  <% if (section.fields && section.fields.length > 0) { -%>
278
- <% section.fields.forEach(function(field) { -%>
285
+ <% section.fields.forEach(function(field, fieldIndex) { -%>
286
+ <% if (field.checkBoxGroup) { -%>
287
+ <% if (fieldIndex === 0 || !section.fields[fieldIndex - 1].checkBoxGroup) { -%>
288
+ // Checkbox-group members cannot be addressed by sap.fe.test.api
289
+ <% } -%>
290
+ // Then.onThe<%- name%>Generated.onForm({ section: "<%- section.id %>" }).iCheckField({ property: "<%- field.property %>", fieldGroup: "<%- field.fieldGroup %>" });
291
+ <% } else { -%>
279
292
  Then.onThe<%- name%>Generated.onForm({ section: "<%- section.id %>" }).iCheckField({ property: "<%- field.property %>"<% if (field.connectedFields) { %>, connectedFields: "<%- field.connectedFields %>"<% } %><% if (field.fieldGroup) { %>, fieldGroup: "<%- field.fieldGroup %>"<% } %> });
293
+ <% } -%>
280
294
  <% }) -%>
281
295
  <% } -%>
282
296
  <% section.contactCardFields.forEach(function(field) { -%>
@@ -23,9 +23,9 @@ const usesFieldIdentifier = (headerSections || []).some(function(section) {
23
23
  });
24
24
  const usesFormIdentifier = (bodySections || []).some(function(section) {
25
25
  const subSectionsHaveForm = (section.subSections || []).some(function(sub) {
26
- return sub.fields && sub.fields.length > 0;
26
+ return sub.fields && sub.fields.some(function(field) { return !field.checkBoxGroup; });
27
27
  });
28
- const sectionHasFormFields = !(section.subSections && section.subSections.length > 0) && section.fields && section.fields.length > 0;
28
+ const sectionHasFormFields = !(section.subSections && section.subSections.length > 0) && section.fields && section.fields.some(function(field) { return !field.checkBoxGroup; });
29
29
  const hasFormAction = (section.actions || []).some(function(action) {
30
30
  return action.visible && !(section.isTable && section.navigationProperty);
31
31
  });
@@ -283,8 +283,15 @@ function journey() {
283
283
  Then.onThe<%- name%>Generated.iCheckSubSection({ section: "<%- subSection.id %>" }, {});
284
284
  <% } -%>
285
285
  <% if (subSection.fields && subSection.fields.length > 0) { -%>
286
- <% subSection.fields.forEach(function(field) { -%>
286
+ <% subSection.fields.forEach(function(field, fieldIndex) { -%>
287
+ <% if (field.checkBoxGroup) { -%>
288
+ <% if (fieldIndex === 0 || !subSection.fields[fieldIndex - 1].checkBoxGroup) { -%>
289
+ // Checkbox-group members cannot be addressed by sap.fe.test.api
290
+ <% } -%>
291
+ // Then.onThe<%- name%>Generated.onForm({ section: "<%- subSection.id %>" } as unknown as FormIdentifier).iCheckField({ property: "<%- field.property %>", fieldGroup: "<%- field.fieldGroup %>" });
292
+ <% } else { -%>
287
293
  Then.onThe<%- name%>Generated.onForm({ section: "<%- subSection.id %>" } as unknown as FormIdentifier).iCheckField({ property: "<%- field.property %>"<% if (field.connectedFields) { %>, connectedFields: "<%- field.connectedFields %>"<% } %><% if (field.fieldGroup) { %>, fieldGroup: "<%- field.fieldGroup %>"<% } %> });
294
+ <% } -%>
288
295
  <% }) -%>
289
296
  <% } -%>
290
297
  <% subSection.contactCardFields.forEach(function(field) { -%>
@@ -303,8 +310,15 @@ function journey() {
303
310
  <% }) -%>
304
311
  <% } else { -%>
305
312
  <% if (section.fields && section.fields.length > 0) { -%>
306
- <% section.fields.forEach(function(field) { -%>
313
+ <% section.fields.forEach(function(field, fieldIndex) { -%>
314
+ <% if (field.checkBoxGroup) { -%>
315
+ <% if (fieldIndex === 0 || !section.fields[fieldIndex - 1].checkBoxGroup) { -%>
316
+ // Checkbox-group members cannot be addressed by sap.fe.test.api
317
+ <% } -%>
318
+ // Then.onThe<%- name%>Generated.onForm({ section: "<%- section.id %>" } as unknown as FormIdentifier).iCheckField({ property: "<%- field.property %>", fieldGroup: "<%- field.fieldGroup %>" });
319
+ <% } else { -%>
307
320
  Then.onThe<%- name%>Generated.onForm({ section: "<%- section.id %>" } as unknown as FormIdentifier).iCheckField({ property: "<%- field.property %>"<% if (field.connectedFields) { %>, connectedFields: "<%- field.connectedFields %>"<% } %><% if (field.fieldGroup) { %>, fieldGroup: "<%- field.fieldGroup %>"<% } %> });
321
+ <% } -%>
308
322
  <% }) -%>
309
323
  <% } -%>
310
324
  <% section.contactCardFields.forEach(function(field) { -%>
@@ -139,8 +139,15 @@ sap.ui.define([
139
139
  Then.onThe<%- name%>Generated.iCheckSubSection({ section: "<%- subSection.id %>" });
140
140
  <% } -%>
141
141
  <% if (subSection.fields && subSection.fields.length > 0) { -%>
142
- <% subSection.fields.forEach(function(field) { -%>
142
+ <% subSection.fields.forEach(function(field, fieldIndex) { -%>
143
+ <% if (field.checkBoxGroup) { -%>
144
+ <% if (fieldIndex === 0 || !subSection.fields[fieldIndex - 1].checkBoxGroup) { -%>
145
+ // Checkbox-group members cannot be addressed by sap.fe.test.api
146
+ <% } -%>
147
+ // Then.onThe<%- name%>Generated.onForm({ section: "<%- subSection.id %>" }).iCheckField({ property: "<%- field.property %>", fieldGroup: "<%- field.fieldGroup %>" });
148
+ <% } else { -%>
143
149
  Then.onThe<%- name%>Generated.onForm({ section: "<%- subSection.id %>" }).iCheckField({ property: "<%- field.property %>"<% if (field.connectedFields) { %>, connectedFields: "<%- field.connectedFields %>"<% } %><% if (field.fieldGroup) { %>, fieldGroup: "<%- field.fieldGroup %>"<% } %> });
150
+ <% } -%>
144
151
  <% }) -%>
145
152
  <% } -%>
146
153
  <% if (subSection.tableColumns && Object.keys(subSection.tableColumns).length > 0 && subSection.navigationProperty) { -%>
@@ -149,8 +156,15 @@ sap.ui.define([
149
156
  <% }) -%>
150
157
  <% } else { -%>
151
158
  <% if (section.fields && section.fields.length > 0) { -%>
152
- <% section.fields.forEach(function(field) { -%>
159
+ <% section.fields.forEach(function(field, fieldIndex) { -%>
160
+ <% if (field.checkBoxGroup) { -%>
161
+ <% if (fieldIndex === 0 || !section.fields[fieldIndex - 1].checkBoxGroup) { -%>
162
+ // Checkbox-group members cannot be addressed by sap.fe.test.api
163
+ <% } -%>
164
+ // Then.onThe<%- name%>Generated.onForm({ section: "<%- section.id %>" }).iCheckField({ property: "<%- field.property %>", fieldGroup: "<%- field.fieldGroup %>" });
165
+ <% } else { -%>
153
166
  Then.onThe<%- name%>Generated.onForm({ section: "<%- section.id %>" }).iCheckField({ property: "<%- field.property %>"<% if (field.connectedFields) { %>, connectedFields: "<%- field.connectedFields %>"<% } %><% if (field.fieldGroup) { %>, fieldGroup: "<%- field.fieldGroup %>"<% } %> });
167
+ <% } -%>
154
168
  <% }) -%>
155
169
  <% } -%>
156
170
  <% if (section.tableColumns && Object.keys(section.tableColumns).length > 0 && section.navigationProperty) { -%>
@@ -23,9 +23,9 @@ const usesFieldIdentifier = (headerSections || []).some(function(section) {
23
23
  });
24
24
  const usesFormIdentifier = (bodySections || []).some(function(section) {
25
25
  const subSectionsHaveForm = (section.subSections || []).some(function(sub) {
26
- return sub.fields && sub.fields.length > 0;
26
+ return sub.fields && sub.fields.some(function(field) { return !field.checkBoxGroup; });
27
27
  });
28
- const sectionHasFormFields = !(section.subSections && section.subSections.length > 0) && section.fields && section.fields.length > 0;
28
+ const sectionHasFormFields = !(section.subSections && section.subSections.length > 0) && section.fields && section.fields.some(function(field) { return !field.checkBoxGroup; });
29
29
  const hasFormAction = (section.actions || []).some(function(action) {
30
30
  return action.visible && !(section.isTable && section.navigationProperty);
31
31
  });
@@ -158,8 +158,15 @@ function journey() {
158
158
  Then.onThe<%- name%>Generated.iCheckSubSection({ section: "<%- subSection.id %>" }, {});
159
159
  <% } -%>
160
160
  <% if (subSection.fields && subSection.fields.length > 0) { -%>
161
- <% subSection.fields.forEach(function(field) { -%>
161
+ <% subSection.fields.forEach(function(field, fieldIndex) { -%>
162
+ <% if (field.checkBoxGroup) { -%>
163
+ <% if (fieldIndex === 0 || !subSection.fields[fieldIndex - 1].checkBoxGroup) { -%>
164
+ // Checkbox-group members cannot be addressed by sap.fe.test.api
165
+ <% } -%>
166
+ // Then.onThe<%- name%>Generated.onForm({ section: "<%- subSection.id %>" } as unknown as FormIdentifier).iCheckField({ property: "<%- field.property %>", fieldGroup: "<%- field.fieldGroup %>" });
167
+ <% } else { -%>
162
168
  Then.onThe<%- name%>Generated.onForm({ section: "<%- subSection.id %>" } as unknown as FormIdentifier).iCheckField({ property: "<%- field.property %>"<% if (field.connectedFields) { %>, connectedFields: "<%- field.connectedFields %>"<% } %><% if (field.fieldGroup) { %>, fieldGroup: "<%- field.fieldGroup %>"<% } %> });
169
+ <% } -%>
163
170
  <% }) -%>
164
171
  <% } -%>
165
172
  <% if (subSection.tableColumns && Object.keys(subSection.tableColumns).length > 0 && subSection.navigationProperty) { -%>
@@ -168,8 +175,15 @@ function journey() {
168
175
  <% }) -%>
169
176
  <% } else { -%>
170
177
  <% if (section.fields && section.fields.length > 0) { -%>
171
- <% section.fields.forEach(function(field) { -%>
178
+ <% section.fields.forEach(function(field, fieldIndex) { -%>
179
+ <% if (field.checkBoxGroup) { -%>
180
+ <% if (fieldIndex === 0 || !section.fields[fieldIndex - 1].checkBoxGroup) { -%>
181
+ // Checkbox-group members cannot be addressed by sap.fe.test.api
182
+ <% } -%>
183
+ // Then.onThe<%- name%>Generated.onForm({ section: "<%- section.id %>" } as unknown as FormIdentifier).iCheckField({ property: "<%- field.property %>", fieldGroup: "<%- field.fieldGroup %>" });
184
+ <% } else { -%>
172
185
  Then.onThe<%- name%>Generated.onForm({ section: "<%- section.id %>" } as unknown as FormIdentifier).iCheckField({ property: "<%- field.property %>"<% if (field.connectedFields) { %>, connectedFields: "<%- field.connectedFields %>"<% } %><% if (field.fieldGroup) { %>, fieldGroup: "<%- field.fieldGroup %>"<% } %> });
186
+ <% } -%>
173
187
  <% }) -%>
174
188
  <% } -%>
175
189
  <% if (section.tableColumns && Object.keys(section.tableColumns).length > 0 && section.navigationProperty) { -%>
@@ -255,8 +255,15 @@ sap.ui.define([
255
255
  Then.onThe<%- name%>Generated.iCheckSubSection({ section: "<%- subSection.id %>" });
256
256
  <% } -%>
257
257
  <% if (subSection.fields && subSection.fields.length > 0) { -%>
258
- <% subSection.fields.forEach(function(field) { -%>
258
+ <% subSection.fields.forEach(function(field, fieldIndex) { -%>
259
+ <% if (field.checkBoxGroup) { -%>
260
+ <% if (fieldIndex === 0 || !subSection.fields[fieldIndex - 1].checkBoxGroup) { -%>
261
+ // Checkbox-group members cannot be addressed by sap.fe.test.api
262
+ <% } -%>
263
+ // Then.onThe<%- name%>Generated.onForm({ section: "<%- subSection.id %>" }).iCheckField({ property: "<%- field.property %>", fieldGroup: "<%- field.fieldGroup %>" });
264
+ <% } else { -%>
259
265
  Then.onThe<%- name%>Generated.onForm({ section: "<%- subSection.id %>" }).iCheckField({ property: "<%- field.property %>"<% if (field.connectedFields) { %>, connectedFields: "<%- field.connectedFields %>"<% } %><% if (field.fieldGroup) { %>, fieldGroup: "<%- field.fieldGroup %>"<% } %> });
266
+ <% } -%>
260
267
  <% }) -%>
261
268
  <% } -%>
262
269
  <% subSection.contactCardFields.forEach(function(field) { -%>
@@ -275,8 +282,15 @@ sap.ui.define([
275
282
  <% }) -%>
276
283
  <% } else { -%>
277
284
  <% if (section.fields && section.fields.length > 0) { -%>
278
- <% section.fields.forEach(function(field) { -%>
285
+ <% section.fields.forEach(function(field, fieldIndex) { -%>
286
+ <% if (field.checkBoxGroup) { -%>
287
+ <% if (fieldIndex === 0 || !section.fields[fieldIndex - 1].checkBoxGroup) { -%>
288
+ // Checkbox-group members cannot be addressed by sap.fe.test.api
289
+ <% } -%>
290
+ // Then.onThe<%- name%>Generated.onForm({ section: "<%- section.id %>" }).iCheckField({ property: "<%- field.property %>", fieldGroup: "<%- field.fieldGroup %>" });
291
+ <% } else { -%>
279
292
  Then.onThe<%- name%>Generated.onForm({ section: "<%- section.id %>" }).iCheckField({ property: "<%- field.property %>"<% if (field.connectedFields) { %>, connectedFields: "<%- field.connectedFields %>"<% } %><% if (field.fieldGroup) { %>, fieldGroup: "<%- field.fieldGroup %>"<% } %> });
293
+ <% } -%>
280
294
  <% }) -%>
281
295
  <% } -%>
282
296
  <% section.contactCardFields.forEach(function(field) { -%>
@@ -23,9 +23,9 @@ const usesFieldIdentifier = (headerSections || []).some(function(section) {
23
23
  });
24
24
  const usesFormIdentifier = (bodySections || []).some(function(section) {
25
25
  const subSectionsHaveForm = (section.subSections || []).some(function(sub) {
26
- return sub.fields && sub.fields.length > 0;
26
+ return sub.fields && sub.fields.some(function(field) { return !field.checkBoxGroup; });
27
27
  });
28
- const sectionHasFormFields = !(section.subSections && section.subSections.length > 0) && section.fields && section.fields.length > 0;
28
+ const sectionHasFormFields = !(section.subSections && section.subSections.length > 0) && section.fields && section.fields.some(function(field) { return !field.checkBoxGroup; });
29
29
  const hasFormAction = (section.actions || []).some(function(action) {
30
30
  return action.visible && !(section.isTable && section.navigationProperty);
31
31
  });
@@ -283,8 +283,15 @@ function journey() {
283
283
  Then.onThe<%- name%>Generated.iCheckSubSection({ section: "<%- subSection.id %>" }, {});
284
284
  <% } -%>
285
285
  <% if (subSection.fields && subSection.fields.length > 0) { -%>
286
- <% subSection.fields.forEach(function(field) { -%>
286
+ <% subSection.fields.forEach(function(field, fieldIndex) { -%>
287
+ <% if (field.checkBoxGroup) { -%>
288
+ <% if (fieldIndex === 0 || !subSection.fields[fieldIndex - 1].checkBoxGroup) { -%>
289
+ // Checkbox-group members cannot be addressed by sap.fe.test.api
290
+ <% } -%>
291
+ // Then.onThe<%- name%>Generated.onForm({ section: "<%- subSection.id %>" } as unknown as FormIdentifier).iCheckField({ property: "<%- field.property %>", fieldGroup: "<%- field.fieldGroup %>" });
292
+ <% } else { -%>
287
293
  Then.onThe<%- name%>Generated.onForm({ section: "<%- subSection.id %>" } as unknown as FormIdentifier).iCheckField({ property: "<%- field.property %>"<% if (field.connectedFields) { %>, connectedFields: "<%- field.connectedFields %>"<% } %><% if (field.fieldGroup) { %>, fieldGroup: "<%- field.fieldGroup %>"<% } %> });
294
+ <% } -%>
288
295
  <% }) -%>
289
296
  <% } -%>
290
297
  <% subSection.contactCardFields.forEach(function(field) { -%>
@@ -303,8 +310,15 @@ function journey() {
303
310
  <% }) -%>
304
311
  <% } else { -%>
305
312
  <% if (section.fields && section.fields.length > 0) { -%>
306
- <% section.fields.forEach(function(field) { -%>
313
+ <% section.fields.forEach(function(field, fieldIndex) { -%>
314
+ <% if (field.checkBoxGroup) { -%>
315
+ <% if (fieldIndex === 0 || !section.fields[fieldIndex - 1].checkBoxGroup) { -%>
316
+ // Checkbox-group members cannot be addressed by sap.fe.test.api
317
+ <% } -%>
318
+ // Then.onThe<%- name%>Generated.onForm({ section: "<%- section.id %>" } as unknown as FormIdentifier).iCheckField({ property: "<%- field.property %>", fieldGroup: "<%- field.fieldGroup %>" });
319
+ <% } else { -%>
307
320
  Then.onThe<%- name%>Generated.onForm({ section: "<%- section.id %>" } as unknown as FormIdentifier).iCheckField({ property: "<%- field.property %>"<% if (field.connectedFields) { %>, connectedFields: "<%- field.connectedFields %>"<% } %><% if (field.fieldGroup) { %>, fieldGroup: "<%- field.fieldGroup %>"<% } %> });
321
+ <% } -%>
308
322
  <% }) -%>
309
323
  <% } -%>
310
324
  <% section.contactCardFields.forEach(function(field) { -%>