@sap-ux/ui5-test-writer 1.16.2 → 1.17.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.
- package/dist/types.d.ts +13 -3
- package/dist/utils/actionUtils.d.ts +1 -0
- package/dist/utils/actionUtils.js +5 -3
- package/dist/utils/listReportUtils.d.ts +9 -19
- package/dist/utils/listReportUtils.js +31 -38
- package/dist/utils/tableUtils.js +7 -4
- package/package.json +1 -1
- package/templates/v4/1.148/integration/ListReportJourney.js +71 -36
- package/templates/v4/1.148/integration/ListReportJourney.ts +70 -37
- package/templates/v4/1.152/integration/ListReportJourney.js +165 -34
- package/templates/v4/1.152/integration/ListReportJourney.ts +167 -39
- package/templates/v4/1.84/integration/ListReportJourney.js +21 -25
- package/templates/v4/1.84/integration/ListReportJourney.ts +19 -25
- package/templates/v4/latest/integration/ListReportJourney.js +177 -38
- package/templates/v4/latest/integration/ListReportJourney.ts +178 -42
|
@@ -20,11 +20,6 @@ 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";
|
|
@@ -89,34 +84,134 @@ function journey() {
|
|
|
89
84
|
// });
|
|
90
85
|
|
|
91
86
|
<%_ if (tabs && tabs.length > 0) { -%>
|
|
92
|
-
|
|
93
|
-
|
|
87
|
+
<%_ tabs.forEach(function(tab) { -%>
|
|
88
|
+
/// View "<%- tab.key %>" ///
|
|
89
|
+
<%_ if (tab.createButton.visible && !isALP) { -%>
|
|
90
|
+
opaTest(<%- JSON.stringify("Check the create button in view " + tab.key) %>, function (_Given: Given, When: When, Then: Then) {
|
|
94
91
|
When.onThe<%- startLR%>Generated.iGoToView({ key: "<%- tab.key %>" });
|
|
95
|
-
<%_ if (tab.createButton.visible && !isALP) { _%>
|
|
96
92
|
Then.onThe<%- startLR%>Generated.onTable("<%- tab.key %>").iCheckCreate({ visible: true });
|
|
97
|
-
// When.onThe<%- startLR%>Generated.onTable("<%- tab.key %>").
|
|
93
|
+
// When.onThe<%- startLR%>Generated.onTable("<%- tab.key %>").iExecuteCreate();
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
<%_ } -%>
|
|
97
|
+
<%_ if (tab.deleteButton.visible) { -%>
|
|
98
|
+
opaTest(<%- JSON.stringify("Check the delete button in view " + tab.key) %>, function (_Given: Given, When: When, Then: Then) {
|
|
99
|
+
When.onThe<%- startLR%>Generated.iGoToView({ key: "<%- tab.key %>" });
|
|
100
|
+
<%_ const deleteIsSelectionGated = tab.deleteButton.enabled === true; _%>
|
|
101
|
+
<%_ if (deleteIsSelectionGated) { _%>
|
|
102
|
+
Then.onThe<%- startLR%>Generated.onTable("<%- tab.key %>").iCheckDelete({ visible: true, enabled: false });
|
|
103
|
+
<%_ if (!hideFilterBar) { _%>
|
|
104
|
+
// Populate the table and select a row so Delete becomes enabled.
|
|
105
|
+
When.onThe<%- startLR%>Generated.onFilterBar().iExecuteSearch();
|
|
98
106
|
<%_ } _%>
|
|
99
|
-
|
|
100
|
-
|
|
107
|
+
When.onThe<%- startLR%>Generated.onTable("<%- tab.key %>").iSelectRows(0);
|
|
108
|
+
Then.onThe<%- startLR%>Generated.onTable("<%- tab.key %>").iCheckDelete({ visible: true, enabled: true });
|
|
109
|
+
// When.onThe<%- startLR%>Generated.onTable("<%- tab.key %>").iExecuteDelete();
|
|
110
|
+
// Deselect the row so the following actions start with an empty selection.
|
|
111
|
+
When.onThe<%- startLR%>Generated.onTable("<%- tab.key %>").iSelectRows(0);
|
|
112
|
+
<%_ } else { _%>
|
|
101
113
|
Then.onThe<%- startLR%>Generated.onTable("<%- tab.key %>").iCheckDelete({ visible: true });
|
|
114
|
+
// When.onThe<%- startLR%>Generated.onTable("<%- tab.key %>").iExecuteDelete();
|
|
102
115
|
<%_ } _%>
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
116
|
+
});
|
|
117
|
+
|
|
118
|
+
<%_ } -%>
|
|
119
|
+
<%_ tab.toolBarActions.forEach(function(item) { -%>
|
|
120
|
+
<%_ if (item.visible) { -%>
|
|
121
|
+
opaTest(<%- JSON.stringify("Check the " + item.label + " action in view " + tab.key) %>, function (_Given: Given, When: When, Then: Then) {
|
|
122
|
+
When.onThe<%- startLR%>Generated.iGoToView({ key: "<%- tab.key %>" });
|
|
123
|
+
<%_ if (item.menuActions) { _%>
|
|
124
|
+
<%_ if (item.splitButton) { _%>
|
|
125
|
+
// "<%- 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:
|
|
126
|
+
Then.onThe<%- startLR%>Generated.onTable("<%- tab.key %>").iCheckAction("<%- item.label %>");
|
|
127
|
+
// When.onThe<%- startLR%>Generated.onTable("<%- tab.key %>").iExecuteAction("<%- item.label %>");
|
|
128
|
+
<%_ } else { _%>
|
|
129
|
+
Then.onThe<%- startLR%>Generated.onTable("<%- tab.key %>").iCheckAction("<%- item.label %>");
|
|
130
|
+
When.onThe<%- startLR%>Generated.onTable("<%- tab.key %>").iExecuteAction("<%- item.label %>");
|
|
131
|
+
<%_ item.menuActions.forEach(function(menuAction) { _%>
|
|
132
|
+
<%_ if (menuAction.visible) { _%>
|
|
133
|
+
Then.onThe<%- startLR%>Generated.onTable("<%- tab.key %>").iCheckMenuAction("<%- menuAction.label %>");
|
|
134
|
+
// When.onThe<%- startLR%>Generated.onTable("<%- tab.key %>").iExecuteMenuAction("<%- menuAction.label %>");
|
|
135
|
+
<%_ } _%>
|
|
136
|
+
<%_ }); _%>
|
|
137
|
+
<%_ } _%>
|
|
138
|
+
<%_ } else if (item.custom) { _%>
|
|
106
139
|
<%_ if (item.labelUnresolved) { _%>
|
|
107
140
|
// TODO: label is an unresolved i18n key; replace with the rendered action text
|
|
108
141
|
<%_ } _%>
|
|
109
|
-
// When.onThe<%- startLR%>Generated.onTable("<%- tab.key %>").iPressAction("<%- item.label %>");
|
|
110
142
|
Then.onThe<%- startLR%>Generated.onTable("<%- tab.key %>").iCheckAction("<%- item.label %>", { visible: true });
|
|
143
|
+
// When.onThe<%- startLR%>Generated.onTable("<%- tab.key %>").iExecuteAction("<%- item.label %>");
|
|
111
144
|
<%_ } else { _%>
|
|
112
|
-
|
|
145
|
+
<%_ const hasParamDialog = item.parameterDialogFields && item.parameterDialogFields.length > 0; _%>
|
|
113
146
|
Then.onThe<%- startLR%>Generated.onTable("<%- tab.key %>").iCheckAction({ service: "<%- item.service %>", action: "<%- item.action %>", unbound: <%- item.unbound === true %> }, { enabled: <%- item.enabled === true %> });
|
|
147
|
+
// When.onThe<%- startLR%>Generated.onTable("<%- tab.key %>").iExecuteAction({ service: "<%- item.service %>", action: "<%- item.action %>", unbound: <%- item.unbound === true %> });
|
|
148
|
+
<%_ if (item.selectionEnables && !item.isCritical && !hasParamDialog) { _%>
|
|
149
|
+
<%_ if (!hideFilterBar) { _%>
|
|
150
|
+
// Populate the table and select a row so the action becomes enabled.
|
|
151
|
+
When.onThe<%- startLR%>Generated.onFilterBar().iExecuteSearch();
|
|
152
|
+
<%_ } _%>
|
|
153
|
+
When.onThe<%- startLR%>Generated.onTable("<%- tab.key %>").iSelectRows(0);
|
|
154
|
+
Then.onThe<%- startLR%>Generated.onTable("<%- tab.key %>").iCheckAction({ service: "<%- item.service %>", action: "<%- item.action %>", unbound: <%- item.unbound === true %> }, { enabled: true });
|
|
155
|
+
// Deselect the row so the following actions start with an empty selection.
|
|
156
|
+
When.onThe<%- startLR%>Generated.onTable("<%- tab.key %>").iSelectRows(0);
|
|
157
|
+
<%_ } else if ((item.isCritical || hasParamDialog) && item.enabled === 'dynamic') { _%>
|
|
158
|
+
// "<%- 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' %>.
|
|
159
|
+
<%_ if (!hideFilterBar) { _%>
|
|
160
|
+
// When.onThe<%- startLR%>Generated.onFilterBar().iExecuteSearch();
|
|
161
|
+
<%_ } _%>
|
|
162
|
+
// When.onThe<%- startLR%>Generated.onTable("<%- tab.key %>").iSelectRows(0);
|
|
163
|
+
// When.onThe<%- startLR%>Generated.onTable("<%- tab.key %>").iExecuteAction({ service: "<%- item.service %>", action: "<%- item.action %>", unbound: <%- item.unbound === true %> });
|
|
164
|
+
<%_ if (hasParamDialog) { _%>
|
|
165
|
+
<%_ item.parameterDialogFields.forEach(function(parameter) { _%>
|
|
166
|
+
// Then.onThe<%- startLR%>Generated.onActionDialog().iCheckActionParameterDialogField({ property: "<%- parameter %>" }, undefined, { visible: true });
|
|
167
|
+
<%_ }); _%>
|
|
168
|
+
// When.onThe<%- startLR%>Generated.onActionDialog().iCancel();
|
|
169
|
+
<%_ } else { _%>
|
|
170
|
+
// Then.onThe<%- startLR%>Generated.onMessageDialog().iCheckState();
|
|
171
|
+
// When.onThe<%- startLR%>Generated.onMessageDialog().iCancel();
|
|
172
|
+
<%_ } _%>
|
|
173
|
+
// When.onThe<%- startLR%>Generated.onTable("<%- tab.key %>").iSelectRows(0);
|
|
174
|
+
<%_ } else if (item.isCritical || hasParamDialog) { _%>
|
|
175
|
+
<%_ if (!hideFilterBar) { _%>
|
|
176
|
+
// Populate the table so the action below has a row to select.
|
|
177
|
+
When.onThe<%- startLR%>Generated.onFilterBar().iExecuteSearch();
|
|
114
178
|
<%_ } _%>
|
|
179
|
+
<%_ if (item.enabled !== true) { _%>
|
|
180
|
+
When.onThe<%- startLR%>Generated.onTable("<%- tab.key %>").iSelectRows(0);
|
|
115
181
|
<%_ } _%>
|
|
182
|
+
When.onThe<%- startLR%>Generated.onTable("<%- tab.key %>").iExecuteAction({ service: "<%- item.service %>", action: "<%- item.action %>", unbound: <%- item.unbound === true %> });
|
|
183
|
+
<%_ if (hasParamDialog) { _%>
|
|
184
|
+
<%_ item.parameterDialogFields.forEach(function(parameter) { _%>
|
|
185
|
+
Then.onThe<%- startLR%>Generated.onActionDialog().iCheckActionParameterDialogField({ property: "<%- parameter %>" }, undefined, { visible: true });
|
|
116
186
|
<%_ }); _%>
|
|
117
|
-
|
|
118
|
-
|
|
187
|
+
When.onThe<%- startLR%>Generated.onActionDialog().iCancel();
|
|
188
|
+
<%_ } else { _%>
|
|
189
|
+
Then.onThe<%- startLR%>Generated.onMessageDialog().iCheckState();
|
|
190
|
+
When.onThe<%- startLR%>Generated.onMessageDialog().iCancel();
|
|
191
|
+
<%_ } _%>
|
|
192
|
+
<%_ if (item.enabled !== true) { _%>
|
|
193
|
+
// Deselect the row so the following actions start with an empty selection.
|
|
194
|
+
When.onThe<%- startLR%>Generated.onTable("<%- tab.key %>").iSelectRows(0);
|
|
119
195
|
<%_ } _%>
|
|
196
|
+
<%_ } _%>
|
|
197
|
+
<%_ } _%>
|
|
198
|
+
});
|
|
199
|
+
|
|
200
|
+
<%_ } -%>
|
|
201
|
+
<%_ }); -%>
|
|
202
|
+
<%_ if (Object.keys(tab.tableColumns).length > 0) { -%>
|
|
203
|
+
opaTest(<%- JSON.stringify("Check table columns in view " + tab.key) %>, function (_Given: Given, When: When, Then: Then) {
|
|
204
|
+
When.onThe<%- startLR%>Generated.iGoToView({ key: "<%- tab.key %>" });
|
|
205
|
+
Then.onThe<%- startLR %>Generated.onTable("<%- tab.key %>").iCheckColumns(undefined, <%- JSON.stringify(tab.tableColumns) %>);
|
|
206
|
+
});
|
|
207
|
+
|
|
208
|
+
<%_ } -%>
|
|
209
|
+
opaTest(<%- JSON.stringify("Check table rows in view " + tab.key) %>, function (_Given: Given, When: When, Then: Then) {
|
|
210
|
+
When.onThe<%- startLR%>Generated.iGoToView({ key: "<%- tab.key %>" });
|
|
211
|
+
<%_ if (!hideFilterBar) { -%>
|
|
212
|
+
// Populate the table so the row check has data.
|
|
213
|
+
When.onThe<%- startLR%>Generated.onFilterBar().iExecuteSearch();
|
|
214
|
+
<%_ } -%>
|
|
120
215
|
Then.onThe<%- startLR%>Generated.onTable("<%- tab.key %>").iCheckRows();
|
|
121
216
|
<%_ if (tab.contactCardColumns.length > 0) { _%>
|
|
122
217
|
// Reveal popin details so low-priority (e.g. contact-card) columns become clickable; no-op on grid/analytical tables.
|
|
@@ -127,26 +222,44 @@ function journey() {
|
|
|
127
222
|
When.onThe<%- startLR %>Generated.onTable("<%- tab.key %>").iClickLink(0, "<%- column.property %>");
|
|
128
223
|
Then.onThe<%- startLR %>Generated.onDialog().iCheckContactDialog({ controlType: "sap.ui.mdc.link.Panel" });
|
|
129
224
|
<%_ }); _%>
|
|
130
|
-
<%_ }); -%>
|
|
131
225
|
});
|
|
226
|
+
|
|
227
|
+
<%_ }); -%>
|
|
132
228
|
<%_ } else { -%>
|
|
133
|
-
<%_ if (
|
|
134
|
-
opaTest("Check
|
|
135
|
-
<%_ if (toolBarActions && toolBarActions.length > 0) { -%>
|
|
136
|
-
<%_ if (createButton.visible && !isALP) { _%>
|
|
229
|
+
<%_ if (createButton.visible && !isALP) { -%>
|
|
230
|
+
opaTest("Check the create button", function (_Given: Given, _When: When, Then: Then) {
|
|
137
231
|
Then.onThe<%- startLR%>Generated.onTable(defaultTableId).iCheckCreate({ visible: true });
|
|
138
|
-
// When.onThe<%- startLR%>Generated.onTable(defaultTableId).
|
|
232
|
+
// When.onThe<%- startLR%>Generated.onTable(defaultTableId).iExecuteCreate();
|
|
233
|
+
});
|
|
234
|
+
|
|
235
|
+
<%_ } -%>
|
|
236
|
+
<%_ if (deleteButton.visible) { -%>
|
|
237
|
+
<%_ /* deleteButton.enabled = Capabilities Deletable (not current UI state); when deletable, Delete is selection-gated: disabled with no selection, enabled once a row is selected. */ -%>
|
|
238
|
+
<%_ const deleteIsSelectionGated = deleteButton.enabled === true; -%>
|
|
239
|
+
opaTest("Check the delete button", function (_Given: Given, <% if (deleteIsSelectionGated) { %>When: When<% } else { %>_When: When<% } %>, Then: Then) {
|
|
240
|
+
<%_ if (deleteIsSelectionGated) { _%>
|
|
241
|
+
Then.onThe<%- startLR%>Generated.onTable(defaultTableId).iCheckDelete({ visible: true, enabled: false });
|
|
242
|
+
<%_ if (!hideFilterBar) { _%>
|
|
243
|
+
// Populate the table and select a row so Delete becomes enabled.
|
|
244
|
+
When.onThe<%- startLR%>Generated.onFilterBar().iExecuteSearch();
|
|
139
245
|
<%_ } _%>
|
|
140
|
-
|
|
141
|
-
|
|
246
|
+
When.onThe<%- startLR%>Generated.onTable(defaultTableId).iSelectRows(0);
|
|
247
|
+
Then.onThe<%- startLR%>Generated.onTable(defaultTableId).iCheckDelete({ visible: true, enabled: true });
|
|
248
|
+
// When.onThe<%- startLR%>Generated.onTable(defaultTableId).iExecuteDelete();
|
|
249
|
+
// Deselect the row so the following actions start with an empty selection.
|
|
250
|
+
When.onThe<%- startLR%>Generated.onTable(defaultTableId).iSelectRows(0);
|
|
251
|
+
<%_ } else { _%>
|
|
142
252
|
Then.onThe<%- startLR%>Generated.onTable(defaultTableId).iCheckDelete({ visible: true });
|
|
253
|
+
// When.onThe<%- startLR%>Generated.onTable(defaultTableId).iExecuteDelete();
|
|
143
254
|
<%_ } _%>
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
255
|
+
});
|
|
256
|
+
|
|
257
|
+
<%_ } -%>
|
|
258
|
+
<%_ (toolBarActions || []).forEach(function(item) { -%>
|
|
259
|
+
<%_ if (item.visible) { -%>
|
|
260
|
+
<%_ const hasParamDialog = item.parameterDialogFields && item.parameterDialogFields.length > 0; _%>
|
|
261
|
+
<%_ const usesWhen = (item.menuActions && !item.splitButton) || (!item.menuActions && !item.custom && ((item.selectionEnables && !item.isCritical && !hasParamDialog) || ((item.isCritical || hasParamDialog) && item.enabled !== 'dynamic'))); _%>
|
|
262
|
+
opaTest(<%- JSON.stringify("Check the " + item.label + " action") %>, function (_Given: Given, <% if (usesWhen) { %>When: When<% } else { %>_When: When<% } %>, Then: Then) {
|
|
150
263
|
<%_ if (item.menuActions) { _%>
|
|
151
264
|
<%_ if (item.splitButton) { _%>
|
|
152
265
|
// "<%- 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 +279,21 @@ function journey() {
|
|
|
166
279
|
<%_ if (item.labelUnresolved) { _%>
|
|
167
280
|
// TODO: label is an unresolved i18n key; replace with the rendered action text
|
|
168
281
|
<%_ } _%>
|
|
169
|
-
// When.onThe<%- startLR%>Generated.onTable(defaultTableId).iExecuteAction("<%- item.label %>");
|
|
170
282
|
Then.onThe<%- startLR%>Generated.onTable(defaultTableId).iCheckAction("<%- item.label %>", { visible: true });
|
|
283
|
+
// When.onThe<%- startLR%>Generated.onTable(defaultTableId).iExecuteAction("<%- item.label %>");
|
|
171
284
|
<%_ } else { _%>
|
|
172
|
-
// When.onThe<%- startLR%>Generated.onTable(defaultTableId).iPressAction({ service: "<%- item.service %>", action: "<%- item.action %>", unbound: <%- item.unbound === true %> });
|
|
173
285
|
Then.onThe<%- startLR%>Generated.onTable(defaultTableId).iCheckAction({ service: "<%- item.service %>", action: "<%- item.action %>", unbound: <%- item.unbound === true %> }, { enabled: <%- item.enabled === true %> });
|
|
174
|
-
|
|
175
|
-
<%_ if (
|
|
286
|
+
// When.onThe<%- startLR%>Generated.onTable(defaultTableId).iExecuteAction({ service: "<%- item.service %>", action: "<%- item.action %>", unbound: <%- item.unbound === true %> });
|
|
287
|
+
<%_ if (item.selectionEnables && !item.isCritical && !hasParamDialog) { _%>
|
|
288
|
+
<%_ if (!hideFilterBar) { _%>
|
|
289
|
+
// Populate the table and select a row so the action becomes enabled.
|
|
290
|
+
When.onThe<%- startLR%>Generated.onFilterBar().iExecuteSearch();
|
|
291
|
+
<%_ } _%>
|
|
292
|
+
When.onThe<%- startLR%>Generated.onTable(defaultTableId).iSelectRows(0);
|
|
293
|
+
Then.onThe<%- startLR%>Generated.onTable(defaultTableId).iCheckAction({ service: "<%- item.service %>", action: "<%- item.action %>", unbound: <%- item.unbound === true %> }, { enabled: true });
|
|
294
|
+
// Deselect the row so the following actions start with an empty selection.
|
|
295
|
+
When.onThe<%- startLR%>Generated.onTable(defaultTableId).iSelectRows(0);
|
|
296
|
+
<%_ } else if ((item.isCritical || hasParamDialog) && item.enabled === 'dynamic') { _%>
|
|
176
297
|
// "<%- 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
298
|
<%_ if (!hideFilterBar) { _%>
|
|
178
299
|
// When.onThe<%- startLR%>Generated.onFilterBar().iExecuteSearch();
|
|
@@ -190,6 +311,10 @@ function journey() {
|
|
|
190
311
|
<%_ } _%>
|
|
191
312
|
// When.onThe<%- startLR%>Generated.onTable(defaultTableId).iSelectRows(0);
|
|
192
313
|
<%_ } else if (item.isCritical || hasParamDialog) { _%>
|
|
314
|
+
<%_ if (!hideFilterBar) { _%>
|
|
315
|
+
// Populate the table so the action below has a row to select.
|
|
316
|
+
When.onThe<%- startLR%>Generated.onFilterBar().iExecuteSearch();
|
|
317
|
+
<%_ } _%>
|
|
193
318
|
<%_ if (item.enabled !== true) { _%>
|
|
194
319
|
When.onThe<%- startLR%>Generated.onTable(defaultTableId).iSelectRows(0);
|
|
195
320
|
<%_ } _%>
|
|
@@ -209,21 +334,32 @@ function journey() {
|
|
|
209
334
|
<%_ } _%>
|
|
210
335
|
<%_ } _%>
|
|
211
336
|
<%_ } _%>
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
337
|
+
});
|
|
338
|
+
|
|
339
|
+
<%_ } -%>
|
|
340
|
+
<%_ }); -%>
|
|
341
|
+
<%_ if (tableColumns && Object.keys(tableColumns).length > 0) { -%>
|
|
342
|
+
opaTest("Check table columns", function (_Given: Given, _When: When, Then: Then) {
|
|
216
343
|
Then.onThe<%- startLR %>Generated.onTable(defaultTableId).iCheckColumns(undefined, <%- JSON.stringify(tableColumns) %>);
|
|
217
|
-
<%_ } -%>
|
|
218
344
|
});
|
|
345
|
+
|
|
219
346
|
<%_ } -%>
|
|
220
347
|
<%_ if (startLR && textAnnotationColumns && textAnnotationColumns.length > 0) { -%>
|
|
221
348
|
opaTest("Check text annotation for columns", function (_Given: Given, When: When, Then: Then) {
|
|
222
349
|
<%_ textAnnotationColumns.forEach(function(column) { _%>
|
|
350
|
+
<%_ if (column.columnProperty) { _%>
|
|
351
|
+
When.onThe<%- startLR%>Generated.onTable(defaultTableId).iChangeSortOrder({ name: "<%- column.columnProperty %>" }, SortOrder.Ascending);
|
|
352
|
+
Then.onThe<%- startLR%>Generated.onTable(defaultTableId).iCheckSortOrder({ name: "<%- column.columnProperty %>" }, SortOrder.Ascending, true);
|
|
353
|
+
When.onThe<%- startLR%>Generated.onTable(defaultTableId).iChangeSortOrder({ name: "<%- column.columnProperty %>" }, SortOrder.None);
|
|
354
|
+
<%_ } _%>
|
|
355
|
+
<%_ if (!column.skipTextPropertyTest) { _%>
|
|
223
356
|
When.onThe<%- startLR%>Generated.onTable(defaultTableId).iChangeSortOrder({ name: "<%- column.textProperty %>" }, SortOrder.Ascending);
|
|
224
357
|
Then.onThe<%- startLR%>Generated.onTable(defaultTableId).iCheckSortOrder({ name: "<%- column.textProperty %>" }, SortOrder.Ascending, true);
|
|
358
|
+
When.onThe<%- startLR%>Generated.onTable(defaultTableId).iChangeSortOrder({ name: "<%- column.textProperty %>" }, SortOrder.None);
|
|
359
|
+
<%_ } _%>
|
|
225
360
|
<%_ }); -%>
|
|
226
361
|
});
|
|
362
|
+
|
|
227
363
|
<%_ } -%>
|
|
228
364
|
<%_ if (startLR && textAnnotationColumns && textAnnotationColumns.length > 0 && columnPersonalizationSupported !== false) { -%>
|
|
229
365
|
opaTest("Check columns in adaptation dialog", function (_Given: Given, When: When, Then: Then) {
|
|
@@ -234,8 +370,8 @@ function journey() {
|
|
|
234
370
|
<%_ }); -%>
|
|
235
371
|
When.onThe<%- startLR%>Generated.onTable(defaultTableId).iConfirmColumnAdaptation();
|
|
236
372
|
});
|
|
237
|
-
<%_ } -%>
|
|
238
373
|
|
|
374
|
+
<%_ } -%>
|
|
239
375
|
<%_ if (contactCardColumns.length > 0) { -%>
|
|
240
376
|
opaTest("Check contact card links", function (_Given: Given, When: When, Then: Then) {
|
|
241
377
|
// Reveal popin details so low-priority (e.g. contact-card) columns become clickable; no-op on grid/analytical tables.
|