@sap-ux/ui5-test-writer 1.16.3 → 1.18.0

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.
@@ -20,17 +20,13 @@ import type { Given, When, Then } from "./types/OpaJourneyTypes.gen";
20
20
  <%_
21
21
  const usesFilterFieldIdentifier =
22
22
  !hideFilterBar && filterBarItems && filterBarItems.some(function(item) { return item.custom; });
23
- const toolBarHasMenu = (toolBarActions || []).some(function(item) { return item.visible && item.menuActions && !item.splitButton; });
24
- const toolBarHasDialogAction = (toolBarActions || []).some(function(item) {
25
- return item.visible && !item.menuActions && !item.custom && item.enabled !== 'dynamic' &&
26
- (item.isCritical || (item.parameterDialogFields && item.parameterDialogFields.length > 0));
27
- });
28
23
  -%>
29
24
  <% if (usesFilterFieldIdentifier) { -%>
30
25
  import type { FilterFieldIdentifier } from "sap/fe/test/api/FilterBarAPI";
31
26
  <% } -%>
32
27
  import runner from "./pages/JourneyRunner";
33
- <%_ if (startLR && textAnnotationColumns && textAnnotationColumns.length > 0) { -%>
28
+ <%_ const needsSortOrder = startLR && ((textAnnotationColumns && textAnnotationColumns.length > 0) || (tabs && tabs.some(function(tab) { return tab.textAnnotationColumns && tab.textAnnotationColumns.length > 0; }))); -%>
29
+ <%_ if (needsSortOrder) { -%>
34
30
  import { SortOrder } from "sap/ui/core/library";
35
31
  <%_ } -%>
36
32
 
@@ -89,34 +85,166 @@ function journey() {
89
85
  // });
90
86
 
91
87
  <%_ if (tabs && tabs.length > 0) { -%>
92
- opaTest("Check table columns and actions per tab", function (_Given: Given, When: When, Then: Then) {
93
- <%_ tabs.forEach(function(tab) { _%>
88
+ <%_ tabs.forEach(function(tab) { -%>
89
+ /// View "<%- tab.key %>" ///
90
+ <%_ if (tab.createButton.visible && !isALP) { -%>
91
+ opaTest(<%- JSON.stringify("Check the create button in view " + tab.key) %>, function (_Given: Given, When: When, Then: Then) {
94
92
  When.onThe<%- startLR%>Generated.iGoToView({ key: "<%- tab.key %>" });
95
- <%_ if (tab.createButton.visible && !isALP) { _%>
96
93
  Then.onThe<%- startLR%>Generated.onTable("<%- tab.key %>").iCheckCreate({ visible: true });
97
- // When.onThe<%- startLR%>Generated.onTable("<%- tab.key %>").iPressCreate();
94
+ // When.onThe<%- startLR%>Generated.onTable("<%- tab.key %>").iExecuteCreate();
95
+ });
96
+
97
+ <%_ } -%>
98
+ <%_ if (tab.deleteButton.visible) { -%>
99
+ opaTest(<%- JSON.stringify("Check the delete button in view " + tab.key) %>, function (_Given: Given, When: When, Then: Then) {
100
+ When.onThe<%- startLR%>Generated.iGoToView({ key: "<%- tab.key %>" });
101
+ <%_ const deleteIsSelectionGated = tab.deleteButton.enabled === true; _%>
102
+ <%_ if (deleteIsSelectionGated) { _%>
103
+ Then.onThe<%- startLR%>Generated.onTable("<%- tab.key %>").iCheckDelete({ visible: true, enabled: false });
104
+ <%_ if (!hideFilterBar) { _%>
105
+ // Populate the table and select a row so Delete becomes enabled.
106
+ When.onThe<%- startLR%>Generated.onFilterBar().iExecuteSearch();
98
107
  <%_ } _%>
99
- <%_ if (tab.deleteButton.visible) { _%>
100
- // When.onThe<%- startLR%>Generated.onTable("<%- tab.key %>").iPressDelete();
108
+ When.onThe<%- startLR%>Generated.onTable("<%- tab.key %>").iSelectRows(0);
109
+ Then.onThe<%- startLR%>Generated.onTable("<%- tab.key %>").iCheckDelete({ visible: true, enabled: true });
110
+ // When.onThe<%- startLR%>Generated.onTable("<%- tab.key %>").iExecuteDelete();
111
+ // Deselect the row so the following actions start with an empty selection.
112
+ When.onThe<%- startLR%>Generated.onTable("<%- tab.key %>").iSelectRows(0);
113
+ <%_ } else { _%>
101
114
  Then.onThe<%- startLR%>Generated.onTable("<%- tab.key %>").iCheckDelete({ visible: true });
115
+ // When.onThe<%- startLR%>Generated.onTable("<%- tab.key %>").iExecuteDelete();
102
116
  <%_ } _%>
103
- <%_ tab.toolBarActions.forEach(function(item) { _%>
104
- <%_ if (item.visible) { _%>
105
- <%_ if (item.custom) { _%>
117
+ });
118
+
119
+ <%_ } -%>
120
+ <%_ tab.toolBarActions.forEach(function(item) { -%>
121
+ <%_ if (item.visible) { -%>
122
+ opaTest(<%- JSON.stringify("Check the " + item.label + " action in view " + tab.key) %>, function (_Given: Given, When: When, Then: Then) {
123
+ When.onThe<%- startLR%>Generated.iGoToView({ key: "<%- tab.key %>" });
124
+ <%_ if (item.menuActions) { _%>
125
+ <%_ if (item.splitButton) { _%>
126
+ // "<%- item.label %>" is a split menu button (has a default action); its drop-down cannot be opened via the test API, so its menu items are not checked. Pressing it triggers the default action:
127
+ Then.onThe<%- startLR%>Generated.onTable("<%- tab.key %>").iCheckAction("<%- item.label %>");
128
+ // When.onThe<%- startLR%>Generated.onTable("<%- tab.key %>").iExecuteAction("<%- item.label %>");
129
+ <%_ } else { _%>
130
+ Then.onThe<%- startLR%>Generated.onTable("<%- tab.key %>").iCheckAction("<%- item.label %>");
131
+ When.onThe<%- startLR%>Generated.onTable("<%- tab.key %>").iExecuteAction("<%- item.label %>");
132
+ <%_ item.menuActions.forEach(function(menuAction) { _%>
133
+ <%_ if (menuAction.visible) { _%>
134
+ Then.onThe<%- startLR%>Generated.onTable("<%- tab.key %>").iCheckMenuAction("<%- menuAction.label %>");
135
+ // When.onThe<%- startLR%>Generated.onTable("<%- tab.key %>").iExecuteMenuAction("<%- menuAction.label %>");
136
+ <%_ } _%>
137
+ <%_ }); _%>
138
+ <%_ } _%>
139
+ <%_ } else if (item.custom) { _%>
106
140
  <%_ if (item.labelUnresolved) { _%>
107
141
  // TODO: label is an unresolved i18n key; replace with the rendered action text
108
142
  <%_ } _%>
109
- // When.onThe<%- startLR%>Generated.onTable("<%- tab.key %>").iPressAction("<%- item.label %>");
110
143
  Then.onThe<%- startLR%>Generated.onTable("<%- tab.key %>").iCheckAction("<%- item.label %>", { visible: true });
144
+ // When.onThe<%- startLR%>Generated.onTable("<%- tab.key %>").iExecuteAction("<%- item.label %>");
111
145
  <%_ } else { _%>
112
- // When.onThe<%- startLR%>Generated.onTable("<%- tab.key %>").iPressAction({ service: "<%- item.service %>", action: "<%- item.action %>", unbound: <%- item.unbound === true %> });
146
+ <%_ const hasParamDialog = item.parameterDialogFields && item.parameterDialogFields.length > 0; _%>
113
147
  Then.onThe<%- startLR%>Generated.onTable("<%- tab.key %>").iCheckAction({ service: "<%- item.service %>", action: "<%- item.action %>", unbound: <%- item.unbound === true %> }, { enabled: <%- item.enabled === true %> });
148
+ // When.onThe<%- startLR%>Generated.onTable("<%- tab.key %>").iExecuteAction({ service: "<%- item.service %>", action: "<%- item.action %>", unbound: <%- item.unbound === true %> });
149
+ <%_ if (item.selectionEnables && !item.isCritical && !hasParamDialog) { _%>
150
+ <%_ if (!hideFilterBar) { _%>
151
+ // Populate the table and select a row so the action becomes enabled.
152
+ When.onThe<%- startLR%>Generated.onFilterBar().iExecuteSearch();
153
+ <%_ } _%>
154
+ When.onThe<%- startLR%>Generated.onTable("<%- tab.key %>").iSelectRows(0);
155
+ Then.onThe<%- startLR%>Generated.onTable("<%- tab.key %>").iCheckAction({ service: "<%- item.service %>", action: "<%- item.action %>", unbound: <%- item.unbound === true %> }, { enabled: true });
156
+ // Deselect the row so the following actions start with an empty selection.
157
+ When.onThe<%- startLR%>Generated.onTable("<%- tab.key %>").iSelectRows(0);
158
+ <%_ } else if ((item.isCritical || hasParamDialog) && item.enabled === 'dynamic') { _%>
159
+ // "<%- item.label %>" is conditionally enabled (Core.OperationAvailable path); it may be disabled for the selected row. Uncomment and select a row that enables it to test the <%- hasParamDialog ? 'action parameter dialog' : 'confirmation dialog' %>.
160
+ <%_ if (!hideFilterBar) { _%>
161
+ // When.onThe<%- startLR%>Generated.onFilterBar().iExecuteSearch();
114
162
  <%_ } _%>
163
+ // When.onThe<%- startLR%>Generated.onTable("<%- tab.key %>").iSelectRows(0);
164
+ // When.onThe<%- startLR%>Generated.onTable("<%- tab.key %>").iExecuteAction({ service: "<%- item.service %>", action: "<%- item.action %>", unbound: <%- item.unbound === true %> });
165
+ <%_ if (hasParamDialog) { _%>
166
+ <%_ item.parameterDialogFields.forEach(function(parameter) { _%>
167
+ // Then.onThe<%- startLR%>Generated.onActionDialog().iCheckActionParameterDialogField({ property: "<%- parameter %>" }, undefined, { visible: true });
168
+ <%_ }); _%>
169
+ // When.onThe<%- startLR%>Generated.onActionDialog().iCancel();
170
+ <%_ } else { _%>
171
+ // Then.onThe<%- startLR%>Generated.onMessageDialog().iCheckState();
172
+ // When.onThe<%- startLR%>Generated.onMessageDialog().iCancel();
115
173
  <%_ } _%>
174
+ // When.onThe<%- startLR%>Generated.onTable("<%- tab.key %>").iSelectRows(0);
175
+ <%_ } else if (item.isCritical || hasParamDialog) { _%>
176
+ <%_ if (!hideFilterBar) { _%>
177
+ // Populate the table so the action below has a row to select.
178
+ When.onThe<%- startLR%>Generated.onFilterBar().iExecuteSearch();
179
+ <%_ } _%>
180
+ <%_ if (item.enabled !== true) { _%>
181
+ When.onThe<%- startLR%>Generated.onTable("<%- tab.key %>").iSelectRows(0);
182
+ <%_ } _%>
183
+ When.onThe<%- startLR%>Generated.onTable("<%- tab.key %>").iExecuteAction({ service: "<%- item.service %>", action: "<%- item.action %>", unbound: <%- item.unbound === true %> });
184
+ <%_ if (hasParamDialog) { _%>
185
+ <%_ item.parameterDialogFields.forEach(function(parameter) { _%>
186
+ Then.onThe<%- startLR%>Generated.onActionDialog().iCheckActionParameterDialogField({ property: "<%- parameter %>" }, undefined, { visible: true });
116
187
  <%_ }); _%>
117
- <%_ if (Object.keys(tab.tableColumns).length > 0) { _%>
188
+ When.onThe<%- startLR%>Generated.onActionDialog().iCancel();
189
+ <%_ } else { _%>
190
+ Then.onThe<%- startLR%>Generated.onMessageDialog().iCheckState();
191
+ When.onThe<%- startLR%>Generated.onMessageDialog().iCancel();
192
+ <%_ } _%>
193
+ <%_ if (item.enabled !== true) { _%>
194
+ // Deselect the row so the following actions start with an empty selection.
195
+ When.onThe<%- startLR%>Generated.onTable("<%- tab.key %>").iSelectRows(0);
196
+ <%_ } _%>
197
+ <%_ } _%>
198
+ <%_ } _%>
199
+ });
200
+
201
+ <%_ } -%>
202
+ <%_ }); -%>
203
+ <%_ if (Object.keys(tab.tableColumns).length > 0) { -%>
204
+ opaTest(<%- JSON.stringify("Check table columns in view " + tab.key) %>, function (_Given: Given, When: When, Then: Then) {
205
+ When.onThe<%- startLR%>Generated.iGoToView({ key: "<%- tab.key %>" });
118
206
  Then.onThe<%- startLR %>Generated.onTable("<%- tab.key %>").iCheckColumns(undefined, <%- JSON.stringify(tab.tableColumns) %>);
207
+ });
208
+
209
+ <%_ } -%>
210
+ <%_ if (tab.textAnnotationColumns && tab.textAnnotationColumns.length > 0) { -%>
211
+ opaTest(<%- JSON.stringify("Check the Sort options for columns with a Text annotation in view " + tab.key) %>, function (_Given: Given, When: When, Then: Then) {
212
+ When.onThe<%- startLR%>Generated.iGoToView({ key: "<%- tab.key %>" });
213
+ <%_ tab.textAnnotationColumns.forEach(function(column) { _%>
214
+ <%_ if (column.columnProperty) { _%>
215
+ When.onThe<%- startLR%>Generated.onTable("<%- tab.key %>").iChangeSortOrder({ name: "<%- column.columnProperty %>" }, SortOrder.Ascending);
216
+ Then.onThe<%- startLR%>Generated.onTable("<%- tab.key %>").iCheckSortOrder({ name: "<%- column.columnProperty %>" }, SortOrder.Ascending, true);
217
+ When.onThe<%- startLR%>Generated.onTable("<%- tab.key %>").iChangeSortOrder({ name: "<%- column.columnProperty %>" }, SortOrder.None);
218
+ <%_ } _%>
219
+ <%_ if (!column.skipTextPropertyTest && !column.textPropertyNotSortable) { _%>
220
+ When.onThe<%- startLR%>Generated.onTable("<%- tab.key %>").iChangeSortOrder({ name: "<%- column.textProperty %>" }, SortOrder.Ascending);
221
+ Then.onThe<%- startLR%>Generated.onTable("<%- tab.key %>").iCheckSortOrder({ name: "<%- column.textProperty %>" }, SortOrder.Ascending, true);
222
+ When.onThe<%- startLR%>Generated.onTable("<%- tab.key %>").iChangeSortOrder({ name: "<%- column.textProperty %>" }, SortOrder.None);
223
+ <%_ } _%>
224
+ <%_ }); -%>
225
+ });
226
+
227
+ <%_ if (tab.columnPersonalizationSupported !== false) { -%>
228
+ opaTest(<%- JSON.stringify("Check the presence of the text columns for columns with a Text annotation in view " + tab.key) %>, function (_Given: Given, When: When, Then: Then) {
229
+ When.onThe<%- startLR%>Generated.iGoToView({ key: "<%- tab.key %>" });
230
+ When.onThe<%- startLR%>Generated.onTable("<%- tab.key %>").iOpenColumnAdaptation();
231
+ <%_ tab.textAnnotationColumns.forEach(function(column) { _%>
232
+ <%_ if (!column.skipTextPropertyTest) { _%>
233
+ When.onThe<%- startLR%>Generated.onTable("<%- tab.key %>").iAddAdaptationColumn({ name: "<%- column.textProperty %>" });
234
+ Then.onThe<%- startLR%>Generated.onTable("<%- tab.key %>").iCheckAdaptationColumn({ name: "<%- column.textProperty %>" });
119
235
  <%_ } _%>
236
+ <%_ }); -%>
237
+ When.onThe<%- startLR%>Generated.onTable("<%- tab.key %>").iConfirmColumnAdaptation();
238
+ });
239
+
240
+ <%_ } -%>
241
+ <%_ } -%>
242
+ opaTest(<%- JSON.stringify("Check table rows in view " + tab.key) %>, function (_Given: Given, When: When, Then: Then) {
243
+ When.onThe<%- startLR%>Generated.iGoToView({ key: "<%- tab.key %>" });
244
+ <%_ if (!hideFilterBar) { -%>
245
+ // Populate the table so the row check has data.
246
+ When.onThe<%- startLR%>Generated.onFilterBar().iExecuteSearch();
247
+ <%_ } -%>
120
248
  Then.onThe<%- startLR%>Generated.onTable("<%- tab.key %>").iCheckRows();
121
249
  <%_ if (tab.contactCardColumns.length > 0) { _%>
122
250
  // Reveal popin details so low-priority (e.g. contact-card) columns become clickable; no-op on grid/analytical tables.
@@ -127,26 +255,44 @@ function journey() {
127
255
  When.onThe<%- startLR %>Generated.onTable("<%- tab.key %>").iClickLink(0, "<%- column.property %>");
128
256
  Then.onThe<%- startLR %>Generated.onDialog().iCheckContactDialog({ controlType: "sap.ui.mdc.link.Panel" });
129
257
  <%_ }); _%>
130
- <%_ }); -%>
131
258
  });
259
+
260
+ <%_ }); -%>
132
261
  <%_ } else { -%>
133
- <%_ if ((toolBarActions && toolBarActions.length > 0 ) || (tableColumns && Object.keys(tableColumns).length > 0)) { -%>
134
- opaTest("Check table columns and actions", function (_Given: Given, <% if (toolBarHasMenu || toolBarHasDialogAction) { %>When: When<% } else { %>_When: When<% } %>, Then: Then) {
135
- <%_ if (toolBarActions && toolBarActions.length > 0) { -%>
136
- <%_ if (createButton.visible && !isALP) { _%>
262
+ <%_ if (createButton.visible && !isALP) { -%>
263
+ opaTest("Check the create button", function (_Given: Given, _When: When, Then: Then) {
137
264
  Then.onThe<%- startLR%>Generated.onTable(defaultTableId).iCheckCreate({ visible: true });
138
- // When.onThe<%- startLR%>Generated.onTable(defaultTableId).iPressCreate();
265
+ // When.onThe<%- startLR%>Generated.onTable(defaultTableId).iExecuteCreate();
266
+ });
267
+
268
+ <%_ } -%>
269
+ <%_ if (deleteButton.visible) { -%>
270
+ <%_ /* deleteButton.enabled = Capabilities Deletable (not current UI state); when deletable, Delete is selection-gated: disabled with no selection, enabled once a row is selected. */ -%>
271
+ <%_ const deleteIsSelectionGated = deleteButton.enabled === true; -%>
272
+ opaTest("Check the delete button", function (_Given: Given, <% if (deleteIsSelectionGated) { %>When: When<% } else { %>_When: When<% } %>, Then: Then) {
273
+ <%_ if (deleteIsSelectionGated) { _%>
274
+ Then.onThe<%- startLR%>Generated.onTable(defaultTableId).iCheckDelete({ visible: true, enabled: false });
275
+ <%_ if (!hideFilterBar) { _%>
276
+ // Populate the table and select a row so Delete becomes enabled.
277
+ When.onThe<%- startLR%>Generated.onFilterBar().iExecuteSearch();
139
278
  <%_ } _%>
140
- <%_ if (deleteButton.visible) { _%>
141
- // When.onThe<%- startLR%>Generated.onTable(defaultTableId).iPressDelete();
279
+ When.onThe<%- startLR%>Generated.onTable(defaultTableId).iSelectRows(0);
280
+ Then.onThe<%- startLR%>Generated.onTable(defaultTableId).iCheckDelete({ visible: true, enabled: true });
281
+ // When.onThe<%- startLR%>Generated.onTable(defaultTableId).iExecuteDelete();
282
+ // Deselect the row so the following actions start with an empty selection.
283
+ When.onThe<%- startLR%>Generated.onTable(defaultTableId).iSelectRows(0);
284
+ <%_ } else { _%>
142
285
  Then.onThe<%- startLR%>Generated.onTable(defaultTableId).iCheckDelete({ visible: true });
286
+ // When.onThe<%- startLR%>Generated.onTable(defaultTableId).iExecuteDelete();
143
287
  <%_ } _%>
144
- <%_ if (!hideFilterBar && toolBarHasDialogAction) { _%>
145
- // Populate the table so the actions below have a row to select.
146
- When.onThe<%- startLR%>Generated.onFilterBar().iExecuteSearch();
147
- <%_ } _%>
148
- <%_ toolBarActions.forEach(function(item) { _%>
149
- <%_ if (item.visible) { _%>
288
+ });
289
+
290
+ <%_ } -%>
291
+ <%_ (toolBarActions || []).forEach(function(item) { -%>
292
+ <%_ if (item.visible) { -%>
293
+ <%_ const hasParamDialog = item.parameterDialogFields && item.parameterDialogFields.length > 0; _%>
294
+ <%_ const usesWhen = (item.menuActions && !item.splitButton) || (!item.menuActions && !item.custom && ((item.selectionEnables && !item.isCritical && !hasParamDialog) || ((item.isCritical || hasParamDialog) && item.enabled !== 'dynamic'))); _%>
295
+ opaTest(<%- JSON.stringify("Check the " + item.label + " action") %>, function (_Given: Given, <% if (usesWhen) { %>When: When<% } else { %>_When: When<% } %>, Then: Then) {
150
296
  <%_ if (item.menuActions) { _%>
151
297
  <%_ if (item.splitButton) { _%>
152
298
  // "<%- item.label %>" is a split menu button (has a default action); its drop-down cannot be opened via the test API, so its menu items are not checked. Pressing it triggers the default action:
@@ -166,13 +312,21 @@ function journey() {
166
312
  <%_ if (item.labelUnresolved) { _%>
167
313
  // TODO: label is an unresolved i18n key; replace with the rendered action text
168
314
  <%_ } _%>
169
- // When.onThe<%- startLR%>Generated.onTable(defaultTableId).iExecuteAction("<%- item.label %>");
170
315
  Then.onThe<%- startLR%>Generated.onTable(defaultTableId).iCheckAction("<%- item.label %>", { visible: true });
316
+ // When.onThe<%- startLR%>Generated.onTable(defaultTableId).iExecuteAction("<%- item.label %>");
171
317
  <%_ } else { _%>
172
- // When.onThe<%- startLR%>Generated.onTable(defaultTableId).iPressAction({ service: "<%- item.service %>", action: "<%- item.action %>", unbound: <%- item.unbound === true %> });
173
318
  Then.onThe<%- startLR%>Generated.onTable(defaultTableId).iCheckAction({ service: "<%- item.service %>", action: "<%- item.action %>", unbound: <%- item.unbound === true %> }, { enabled: <%- item.enabled === true %> });
174
- <%_ const hasParamDialog = item.parameterDialogFields && item.parameterDialogFields.length > 0; _%>
175
- <%_ if ((item.isCritical || hasParamDialog) && item.enabled === 'dynamic') { _%>
319
+ // When.onThe<%- startLR%>Generated.onTable(defaultTableId).iExecuteAction({ service: "<%- item.service %>", action: "<%- item.action %>", unbound: <%- item.unbound === true %> });
320
+ <%_ if (item.selectionEnables && !item.isCritical && !hasParamDialog) { _%>
321
+ <%_ if (!hideFilterBar) { _%>
322
+ // Populate the table and select a row so the action becomes enabled.
323
+ When.onThe<%- startLR%>Generated.onFilterBar().iExecuteSearch();
324
+ <%_ } _%>
325
+ When.onThe<%- startLR%>Generated.onTable(defaultTableId).iSelectRows(0);
326
+ Then.onThe<%- startLR%>Generated.onTable(defaultTableId).iCheckAction({ service: "<%- item.service %>", action: "<%- item.action %>", unbound: <%- item.unbound === true %> }, { enabled: true });
327
+ // Deselect the row so the following actions start with an empty selection.
328
+ When.onThe<%- startLR%>Generated.onTable(defaultTableId).iSelectRows(0);
329
+ <%_ } else if ((item.isCritical || hasParamDialog) && item.enabled === 'dynamic') { _%>
176
330
  // "<%- item.label %>" is conditionally enabled (Core.OperationAvailable path); it may be disabled for the selected row. Uncomment and select a row that enables it to test the <%- hasParamDialog ? 'action parameter dialog' : 'confirmation dialog' %>.
177
331
  <%_ if (!hideFilterBar) { _%>
178
332
  // When.onThe<%- startLR%>Generated.onFilterBar().iExecuteSearch();
@@ -190,6 +344,10 @@ function journey() {
190
344
  <%_ } _%>
191
345
  // When.onThe<%- startLR%>Generated.onTable(defaultTableId).iSelectRows(0);
192
346
  <%_ } else if (item.isCritical || hasParamDialog) { _%>
347
+ <%_ if (!hideFilterBar) { _%>
348
+ // Populate the table so the action below has a row to select.
349
+ When.onThe<%- startLR%>Generated.onFilterBar().iExecuteSearch();
350
+ <%_ } _%>
193
351
  <%_ if (item.enabled !== true) { _%>
194
352
  When.onThe<%- startLR%>Generated.onTable(defaultTableId).iSelectRows(0);
195
353
  <%_ } _%>
@@ -209,41 +367,46 @@ function journey() {
209
367
  <%_ } _%>
210
368
  <%_ } _%>
211
369
  <%_ } _%>
212
- <%_ } _%>
213
- <%_ }); -%>
214
- <%_ } -%>
215
- <%_ if (tableColumns && Object.keys(tableColumns).length > 0) { -%>
370
+ });
371
+
372
+ <%_ } -%>
373
+ <%_ }); -%>
374
+ <%_ if (tableColumns && Object.keys(tableColumns).length > 0) { -%>
375
+ opaTest("Check table columns", function (_Given: Given, _When: When, Then: Then) {
216
376
  Then.onThe<%- startLR %>Generated.onTable(defaultTableId).iCheckColumns(undefined, <%- JSON.stringify(tableColumns) %>);
217
- <%_ } -%>
218
377
  });
378
+
219
379
  <%_ } -%>
220
380
  <%_ if (startLR && textAnnotationColumns && textAnnotationColumns.length > 0) { -%>
221
- opaTest("Check text annotation for columns", function (_Given: Given, When: When, Then: Then) {
381
+ opaTest("Check the Sort options for columns with a Text annotation", function (_Given: Given, When: When, Then: Then) {
222
382
  <%_ textAnnotationColumns.forEach(function(column) { _%>
223
383
  <%_ if (column.columnProperty) { _%>
224
384
  When.onThe<%- startLR%>Generated.onTable(defaultTableId).iChangeSortOrder({ name: "<%- column.columnProperty %>" }, SortOrder.Ascending);
225
385
  Then.onThe<%- startLR%>Generated.onTable(defaultTableId).iCheckSortOrder({ name: "<%- column.columnProperty %>" }, SortOrder.Ascending, true);
226
386
  When.onThe<%- startLR%>Generated.onTable(defaultTableId).iChangeSortOrder({ name: "<%- column.columnProperty %>" }, SortOrder.None);
227
387
  <%_ } _%>
228
- <%_ if (!column.skipTextPropertyTest) { _%>
388
+ <%_ if (!column.skipTextPropertyTest && !column.textPropertyNotSortable) { _%>
229
389
  When.onThe<%- startLR%>Generated.onTable(defaultTableId).iChangeSortOrder({ name: "<%- column.textProperty %>" }, SortOrder.Ascending);
230
390
  Then.onThe<%- startLR%>Generated.onTable(defaultTableId).iCheckSortOrder({ name: "<%- column.textProperty %>" }, SortOrder.Ascending, true);
231
391
  When.onThe<%- startLR%>Generated.onTable(defaultTableId).iChangeSortOrder({ name: "<%- column.textProperty %>" }, SortOrder.None);
232
392
  <%_ } _%>
233
393
  <%_ }); -%>
234
394
  });
395
+
235
396
  <%_ } -%>
236
397
  <%_ if (startLR && textAnnotationColumns && textAnnotationColumns.length > 0 && columnPersonalizationSupported !== false) { -%>
237
- opaTest("Check columns in adaptation dialog", function (_Given: Given, When: When, Then: Then) {
398
+ opaTest("Check the presence of the text columns for columns with a Text annotation", function (_Given: Given, When: When, Then: Then) {
238
399
  When.onThe<%- startLR%>Generated.onTable(defaultTableId).iOpenColumnAdaptation();
239
400
  <%_ textAnnotationColumns.forEach(function(column) { _%>
401
+ <%_ if (!column.skipTextPropertyTest) { _%>
240
402
  When.onThe<%- startLR%>Generated.onTable(defaultTableId).iAddAdaptationColumn({ name: "<%- column.textProperty %>" });
241
403
  Then.onThe<%- startLR%>Generated.onTable(defaultTableId).iCheckAdaptationColumn({ name: "<%- column.textProperty %>" });
404
+ <%_ } _%>
242
405
  <%_ }); -%>
243
406
  When.onThe<%- startLR%>Generated.onTable(defaultTableId).iConfirmColumnAdaptation();
244
407
  });
245
- <%_ } -%>
246
408
 
409
+ <%_ } -%>
247
410
  <%_ if (contactCardColumns.length > 0) { -%>
248
411
  opaTest("Check contact card links", function (_Given: Given, When: When, Then: Then) {
249
412
  // Reveal popin details so low-priority (e.g. contact-card) columns become clickable; no-op on grid/analytical tables.