@sapui5/sap.fe.test 1.101.1 → 1.102.2
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/package.json +1 -1
- package/src/sap/fe/test/.library +1 -1
- package/src/sap/fe/test/CollaborationClient.js +77 -0
- package/src/sap/fe/test/CollaborationClient.ts +105 -0
- package/src/sap/fe/test/FeMocks.js +1 -1
- package/src/sap/fe/test/FeMocks.ts +6 -2
- package/src/sap/fe/test/JestTemplatingHelper.js +51 -22
- package/src/sap/fe/test/JestTemplatingHelper.ts +46 -19
- package/src/sap/fe/test/ListReport.js +7 -15
- package/src/sap/fe/test/LocationUtil.js +12 -16
- package/src/sap/fe/test/ObjectPage.js +38 -6
- package/src/sap/fe/test/Shell.js +94 -34
- package/src/sap/fe/test/TemplatePage.js +14 -0
- package/src/sap/fe/test/UI5MockHelper.js +99 -18
- package/src/sap/fe/test/UI5MockHelper.ts +81 -14
- package/src/sap/fe/test/api/CollaborationAPI.js +215 -0
- package/src/sap/fe/test/api/CollaborationAPI.ts +240 -0
- package/src/sap/fe/test/api/DialogMassEditActions.js +115 -0
- package/src/sap/fe/test/api/DialogMassEditAssertions.js +174 -0
- package/src/sap/fe/test/api/DialogType.js +11 -2
- package/src/sap/fe/test/api/HeaderAssertions.js +76 -41
- package/src/sap/fe/test/api/TableAPI.js +30 -34
- package/src/sap/fe/test/api/TableActions.js +1 -1
- package/src/sap/fe/test/api/TableAssertions.js +51 -46
- package/src/sap/fe/test/builder/MacroFieldBuilder.js +161 -156
- package/src/sap/fe/test/builder/MdcTableBuilder.js +89 -12
- package/src/sap/fe/test/library.js +1 -1
- package/src/sap/fe/test/massEdit.js +0 -62
|
@@ -14,7 +14,7 @@ sap.ui.define(
|
|
|
14
14
|
"sap/ui/test/actions/Action",
|
|
15
15
|
"sap/ui/core/SortOrder"
|
|
16
16
|
],
|
|
17
|
-
function(BaseAPI, Utils, FEBuilder, TableBuilder, DialogBuilder, OpaBuilder, Action, SortOrder) {
|
|
17
|
+
function (BaseAPI, Utils, FEBuilder, TableBuilder, DialogBuilder, OpaBuilder, Action, SortOrder) {
|
|
18
18
|
"use strict";
|
|
19
19
|
|
|
20
20
|
/**
|
|
@@ -38,7 +38,7 @@ sap.ui.define(
|
|
|
38
38
|
* @hideconstructor
|
|
39
39
|
* @public
|
|
40
40
|
*/
|
|
41
|
-
var TableAPI = function(oTableBuilder, vTableDescription) {
|
|
41
|
+
var TableAPI = function (oTableBuilder, vTableDescription) {
|
|
42
42
|
if (!Utils.isOfType(oTableBuilder, TableBuilder)) {
|
|
43
43
|
throw new Error("oTableBuilder parameter must be an TableBuilder instance");
|
|
44
44
|
}
|
|
@@ -47,13 +47,13 @@ sap.ui.define(
|
|
|
47
47
|
TableAPI.prototype = Object.create(BaseAPI.prototype);
|
|
48
48
|
TableAPI.prototype.constructor = TableAPI;
|
|
49
49
|
|
|
50
|
-
TableAPI.createRowMatchers = function(vRowValues, mRowState, vAdditionalMatchers, vEmptyCells) {
|
|
50
|
+
TableAPI.createRowMatchers = function (vRowValues, mRowState, vAdditionalMatchers, vEmptyCells) {
|
|
51
51
|
var aArguments = Utils.parseArguments([[Object, Number], Object, [Array, Function], Array], arguments),
|
|
52
52
|
aRowMatchers = [];
|
|
53
53
|
if (Utils.isOfType(aArguments[0], Object)) {
|
|
54
54
|
aRowMatchers.push(TableBuilder.Row.Matchers.cellValues(aArguments[0]));
|
|
55
55
|
} else if (Utils.isOfType(aArguments[0], Number)) {
|
|
56
|
-
aRowMatchers.push(function(oRow) {
|
|
56
|
+
aRowMatchers.push(function (oRow) {
|
|
57
57
|
var oRowParent = oRow.getParent(),
|
|
58
58
|
sParentAggregation = oRow.sParentAggregationName;
|
|
59
59
|
return oRowParent && sParentAggregation
|
|
@@ -73,7 +73,7 @@ sap.ui.define(
|
|
|
73
73
|
return aRowMatchers;
|
|
74
74
|
};
|
|
75
75
|
|
|
76
|
-
TableAPI.prototype.createGroupRowMatchers = function(iLevel, sTitle) {
|
|
76
|
+
TableAPI.prototype.createGroupRowMatchers = function (iLevel, sTitle) {
|
|
77
77
|
return [TableBuilder.Row.Matchers.visualGroup(iLevel, sTitle)];
|
|
78
78
|
};
|
|
79
79
|
|
|
@@ -84,7 +84,7 @@ sap.ui.define(
|
|
|
84
84
|
*
|
|
85
85
|
* @public
|
|
86
86
|
*/
|
|
87
|
-
TableAPI.prototype.iOpenColumnAdaptation = function() {
|
|
87
|
+
TableAPI.prototype.iOpenColumnAdaptation = function () {
|
|
88
88
|
var oTableBuilder = this.getBuilder();
|
|
89
89
|
return this.prepareResult(
|
|
90
90
|
oTableBuilder
|
|
@@ -103,7 +103,7 @@ sap.ui.define(
|
|
|
103
103
|
*
|
|
104
104
|
* @public
|
|
105
105
|
*/
|
|
106
|
-
TableAPI.prototype.iConfirmColumnAdaptation = function() {
|
|
106
|
+
TableAPI.prototype.iConfirmColumnAdaptation = function () {
|
|
107
107
|
return this.prepareResult(
|
|
108
108
|
TableBuilder.createAdaptationDialogBuilder(this.getOpaInstance())
|
|
109
109
|
.doPressFooterButton(OpaBuilder.Matchers.resourceBundle("text", "sap.ui.mdc", "p13nDialog.OK"))
|
|
@@ -121,7 +121,7 @@ sap.ui.define(
|
|
|
121
121
|
*
|
|
122
122
|
* @public
|
|
123
123
|
*/
|
|
124
|
-
TableAPI.prototype.iOpenColumnSorting = function() {
|
|
124
|
+
TableAPI.prototype.iOpenColumnSorting = function () {
|
|
125
125
|
var oTableBuilder = this.getBuilder();
|
|
126
126
|
return this.prepareResult(
|
|
127
127
|
oTableBuilder
|
|
@@ -138,7 +138,7 @@ sap.ui.define(
|
|
|
138
138
|
*
|
|
139
139
|
* @public
|
|
140
140
|
*/
|
|
141
|
-
TableAPI.prototype.iConfirmColumnSorting = function() {
|
|
141
|
+
TableAPI.prototype.iConfirmColumnSorting = function () {
|
|
142
142
|
return this.prepareResult(
|
|
143
143
|
TableBuilder.createSortingDialogBuilder(this.getOpaInstance())
|
|
144
144
|
.doPressFooterButton(OpaBuilder.Matchers.resourceBundle("text", "sap.ui.mdc", "p13nDialog.OK"))
|
|
@@ -156,7 +156,7 @@ sap.ui.define(
|
|
|
156
156
|
*
|
|
157
157
|
* @public
|
|
158
158
|
*/
|
|
159
|
-
TableAPI.prototype.iOpenFilterDialog = function() {
|
|
159
|
+
TableAPI.prototype.iOpenFilterDialog = function () {
|
|
160
160
|
var oTableBuilder = this.getBuilder();
|
|
161
161
|
return this.prepareResult(
|
|
162
162
|
oTableBuilder
|
|
@@ -173,7 +173,7 @@ sap.ui.define(
|
|
|
173
173
|
*
|
|
174
174
|
* @public
|
|
175
175
|
*/
|
|
176
|
-
TableAPI.prototype.iConfirmFilterDialog = function() {
|
|
176
|
+
TableAPI.prototype.iConfirmFilterDialog = function () {
|
|
177
177
|
return this.prepareResult(
|
|
178
178
|
TableBuilder.createFilteringDialogBuilder(this.getOpaInstance())
|
|
179
179
|
.doPressFooterButton(OpaBuilder.Matchers.resourceBundle("text", "sap.ui.mdc", "p13nDialog.OK"))
|
|
@@ -203,7 +203,7 @@ sap.ui.define(
|
|
|
203
203
|
*
|
|
204
204
|
* @ui5-restricted
|
|
205
205
|
*/
|
|
206
|
-
TableAPI.prototype.personalization = function(
|
|
206
|
+
TableAPI.prototype.personalization = function (
|
|
207
207
|
vColumnIdentifier,
|
|
208
208
|
mState,
|
|
209
209
|
vActions,
|
|
@@ -218,9 +218,7 @@ sap.ui.define(
|
|
|
218
218
|
),
|
|
219
219
|
oBuilder = FEBuilder.create(this.getOpaInstance()),
|
|
220
220
|
bDialogOpen,
|
|
221
|
-
oAdaptColumnBuilder = FEBuilder.create(this.getOpaInstance())
|
|
222
|
-
.hasType("sap.m.ColumnListItem")
|
|
223
|
-
.isDialogElement();
|
|
221
|
+
oAdaptColumnBuilder = FEBuilder.create(this.getOpaInstance()).hasType("sap.m.ColumnListItem").isDialogElement();
|
|
224
222
|
|
|
225
223
|
oDialogBuilder = aArguments[4];
|
|
226
224
|
fnOpenDialog = aArguments[5];
|
|
@@ -255,7 +253,7 @@ sap.ui.define(
|
|
|
255
253
|
sDescription = aArguments[3];
|
|
256
254
|
return this.prepareResult(
|
|
257
255
|
oBuilder
|
|
258
|
-
.success(function() {
|
|
256
|
+
.success(function () {
|
|
259
257
|
bDialogOpen = FEBuilder.controlsExist(oDialogBuilder);
|
|
260
258
|
if (!bDialogOpen) {
|
|
261
259
|
fnOpenDialog();
|
|
@@ -263,7 +261,7 @@ sap.ui.define(
|
|
|
263
261
|
}
|
|
264
262
|
return oDialogBuilder
|
|
265
263
|
.has(OpaBuilder.Matchers.children(oAdaptColumnBuilder))
|
|
266
|
-
.has(function(aFoundAdaptationColumns) {
|
|
264
|
+
.has(function (aFoundAdaptationColumns) {
|
|
267
265
|
if (bCheckForNotVisible) {
|
|
268
266
|
return aFoundAdaptationColumns.length === 0;
|
|
269
267
|
}
|
|
@@ -296,7 +294,7 @@ sap.ui.define(
|
|
|
296
294
|
*
|
|
297
295
|
* @ui5-restricted
|
|
298
296
|
*/
|
|
299
|
-
TableAPI.prototype.sortingPersonalization = function(
|
|
297
|
+
TableAPI.prototype.sortingPersonalization = function (
|
|
300
298
|
vColumnIdentifier,
|
|
301
299
|
mState,
|
|
302
300
|
vActions,
|
|
@@ -311,13 +309,9 @@ sap.ui.define(
|
|
|
311
309
|
),
|
|
312
310
|
oBuilder = FEBuilder.create(this.getOpaInstance()),
|
|
313
311
|
bDialogOpen,
|
|
314
|
-
oAdaptColumnBuilder = FEBuilder.create(this.getOpaInstance())
|
|
315
|
-
.hasType("sap.m.CustomListItem")
|
|
316
|
-
.isDialogElement(),
|
|
312
|
+
oAdaptColumnBuilder = FEBuilder.create(this.getOpaInstance()).hasType("sap.m.CustomListItem").isDialogElement(),
|
|
317
313
|
oNoneColumnMatcher = OpaBuilder.Matchers.childrenMatcher(
|
|
318
|
-
OpaBuilder.create()
|
|
319
|
-
.hasType("sap.m.Select")
|
|
320
|
-
.hasProperties({ selectedKey: "$_none" })
|
|
314
|
+
OpaBuilder.create().hasType("sap.m.ComboBox").hasProperties({ placeholder: "Sort by" })
|
|
321
315
|
),
|
|
322
316
|
oTargetColumnMatcher;
|
|
323
317
|
|
|
@@ -329,29 +323,31 @@ sap.ui.define(
|
|
|
329
323
|
if (Utils.isOfType(vColumnIdentifier, String)) {
|
|
330
324
|
oTargetColumnMatcher = OpaBuilder.Matchers.childrenMatcher(
|
|
331
325
|
OpaBuilder.create(this.getOpaInstance())
|
|
332
|
-
.hasType("sap.m.
|
|
333
|
-
.has(function(oSelectControl) {
|
|
334
|
-
return oSelectControl.getSelectedItem()
|
|
326
|
+
.hasType("sap.m.ComboBox")
|
|
327
|
+
.has(function (oSelectControl) {
|
|
328
|
+
return oSelectControl.getSelectedItem()
|
|
329
|
+
? oSelectControl.getSelectedItem().getText() === vColumnIdentifier
|
|
330
|
+
: false;
|
|
335
331
|
})
|
|
336
332
|
);
|
|
337
333
|
} else {
|
|
338
334
|
oTargetColumnMatcher = OpaBuilder.Matchers.childrenMatcher(
|
|
339
335
|
OpaBuilder.create(this.getOpaInstance())
|
|
340
|
-
.hasType("sap.m.
|
|
336
|
+
.hasType("sap.m.ComboBox")
|
|
341
337
|
.hasProperties({ selectedKey: vColumnIdentifier.name })
|
|
342
338
|
);
|
|
343
339
|
}
|
|
344
340
|
|
|
345
341
|
oDialogBuilder
|
|
346
342
|
.has(OpaBuilder.Matchers.children(oAdaptColumnBuilder))
|
|
347
|
-
.has(function(aCustomListItems) {
|
|
343
|
+
.has(function (aCustomListItems) {
|
|
348
344
|
var aMatchingListItems = OpaBuilder.Matchers.filter(oTargetColumnMatcher)(aCustomListItems);
|
|
349
345
|
if (aMatchingListItems.length) {
|
|
350
346
|
return aMatchingListItems;
|
|
351
347
|
}
|
|
352
348
|
return OpaBuilder.Matchers.filter(oNoneColumnMatcher)(aCustomListItems);
|
|
353
349
|
})
|
|
354
|
-
.has(function(aFoundAdaptationColumns) {
|
|
350
|
+
.has(function (aFoundAdaptationColumns) {
|
|
355
351
|
if (bCheckForNotVisible) {
|
|
356
352
|
return aFoundAdaptationColumns.length === 0;
|
|
357
353
|
}
|
|
@@ -367,7 +363,7 @@ sap.ui.define(
|
|
|
367
363
|
oDialogBuilder.hasChildren(
|
|
368
364
|
OpaBuilder.create()
|
|
369
365
|
.hasType("sap.m.SegmentedButton")
|
|
370
|
-
.has(function(oSegmentedButton) {
|
|
366
|
+
.has(function (oSegmentedButton) {
|
|
371
367
|
if (sSortOrder === SortOrder.None) {
|
|
372
368
|
return !oSegmentedButton.enabled;
|
|
373
369
|
}
|
|
@@ -386,7 +382,7 @@ sap.ui.define(
|
|
|
386
382
|
sDescription = aArguments[3];
|
|
387
383
|
return this.prepareResult(
|
|
388
384
|
oBuilder
|
|
389
|
-
.success(function() {
|
|
385
|
+
.success(function () {
|
|
390
386
|
bDialogOpen = FEBuilder.controlsExist(oDialogBuilder);
|
|
391
387
|
if (!bDialogOpen) {
|
|
392
388
|
fnOpenDialog();
|
|
@@ -410,7 +406,7 @@ sap.ui.define(
|
|
|
410
406
|
*
|
|
411
407
|
* @ui5-restricted
|
|
412
408
|
*/
|
|
413
|
-
TableAPI.prototype.columnAdaptation = function(vColumnIdentifier, mState, vActions, sDescription) {
|
|
409
|
+
TableAPI.prototype.columnAdaptation = function (vColumnIdentifier, mState, vActions, sDescription) {
|
|
414
410
|
return this.personalization(
|
|
415
411
|
vColumnIdentifier,
|
|
416
412
|
mState,
|
|
@@ -435,7 +431,7 @@ sap.ui.define(
|
|
|
435
431
|
*
|
|
436
432
|
* @ui5-restricted
|
|
437
433
|
*/
|
|
438
|
-
TableAPI.prototype.columnSorting = function(vColumnIdentifier, mState, vActions, sDescription) {
|
|
434
|
+
TableAPI.prototype.columnSorting = function (vColumnIdentifier, mState, vActions, sDescription) {
|
|
439
435
|
return this.sortingPersonalization(
|
|
440
436
|
vColumnIdentifier,
|
|
441
437
|
mState,
|
|
@@ -682,7 +682,7 @@ sap.ui.define(
|
|
|
682
682
|
var oOpaInstance = this.getOpaInstance(),
|
|
683
683
|
aActions = [],
|
|
684
684
|
fnSelectSortingColumnAction = function (oColumnListItem) {
|
|
685
|
-
var oChildBuilder = OpaBuilder.create(oOpaInstance).hasType("sap.m.
|
|
685
|
+
var oChildBuilder = OpaBuilder.create(oOpaInstance).hasType("sap.m.ComboBox"),
|
|
686
686
|
vControls = OpaBuilder.Matchers.children(oChildBuilder)(oColumnListItem),
|
|
687
687
|
fnFindItem = Utils.isOfType(vColumnIdentifier, String)
|
|
688
688
|
? function (oItem) {
|
|
@@ -14,7 +14,7 @@ sap.ui.define(
|
|
|
14
14
|
"sap/ui/core/SortOrder",
|
|
15
15
|
"./APIHelper"
|
|
16
16
|
],
|
|
17
|
-
function(TableAPI, Utils, OpaBuilder, FEBuilder, TableBuilder, FilterFieldBuilder, SortOrder, APIHelper) {
|
|
17
|
+
function (TableAPI, Utils, OpaBuilder, FEBuilder, TableBuilder, FilterFieldBuilder, SortOrder, APIHelper) {
|
|
18
18
|
"use strict";
|
|
19
19
|
|
|
20
20
|
/**
|
|
@@ -29,7 +29,7 @@ sap.ui.define(
|
|
|
29
29
|
* @hideconstructor
|
|
30
30
|
* @public
|
|
31
31
|
*/
|
|
32
|
-
var TableAssertions = function(oBuilderInstance, vTableDescription) {
|
|
32
|
+
var TableAssertions = function (oBuilderInstance, vTableDescription) {
|
|
33
33
|
return TableAPI.call(this, oBuilderInstance, vTableDescription);
|
|
34
34
|
};
|
|
35
35
|
TableAssertions.prototype = Object.create(TableAPI.prototype);
|
|
@@ -44,7 +44,7 @@ sap.ui.define(
|
|
|
44
44
|
*
|
|
45
45
|
* @public
|
|
46
46
|
*/
|
|
47
|
-
TableAssertions.prototype.iCheckState = function(mState) {
|
|
47
|
+
TableAssertions.prototype.iCheckState = function (mState) {
|
|
48
48
|
var oTableBuilder = this.getBuilder();
|
|
49
49
|
return this.prepareResult(
|
|
50
50
|
oTableBuilder
|
|
@@ -74,7 +74,7 @@ sap.ui.define(
|
|
|
74
74
|
*
|
|
75
75
|
* @public
|
|
76
76
|
*/
|
|
77
|
-
TableAssertions.prototype.iCheckRows = function(mRowValues, iExpectedNumberOfRows, mState, vEmptyColumns) {
|
|
77
|
+
TableAssertions.prototype.iCheckRows = function (mRowValues, iExpectedNumberOfRows, mState, vEmptyColumns) {
|
|
78
78
|
var aArguments = Utils.parseArguments([Object, Number, Object, Array], arguments),
|
|
79
79
|
iNumberOfRows = aArguments[1],
|
|
80
80
|
aRowMatcher = TableAPI.createRowMatchers(aArguments[0], aArguments[2], undefined, aArguments[3]),
|
|
@@ -83,7 +83,7 @@ sap.ui.define(
|
|
|
83
83
|
// the order of the matchers matters here
|
|
84
84
|
if (aRowMatcher.length) {
|
|
85
85
|
// if matchers are defined, first match rows, then check number of results
|
|
86
|
-
oTableBuilder.hasRows(aRowMatcher, true).has(function(aRows) {
|
|
86
|
+
oTableBuilder.hasRows(aRowMatcher, true).has(function (aRows) {
|
|
87
87
|
return Utils.isOfType(iNumberOfRows, Number) ? aRows.length === iNumberOfRows : aRows.length > 0;
|
|
88
88
|
});
|
|
89
89
|
} else {
|
|
@@ -124,7 +124,7 @@ sap.ui.define(
|
|
|
124
124
|
*
|
|
125
125
|
* @public
|
|
126
126
|
*/
|
|
127
|
-
TableAssertions.prototype.iCheckCreationRow = function(mRowValues, mState) {
|
|
127
|
+
TableAssertions.prototype.iCheckCreationRow = function (mRowValues, mState) {
|
|
128
128
|
var oTableBuilder = this.getBuilder();
|
|
129
129
|
return this.prepareResult(
|
|
130
130
|
oTableBuilder
|
|
@@ -156,7 +156,7 @@ sap.ui.define(
|
|
|
156
156
|
*
|
|
157
157
|
* @public
|
|
158
158
|
*/
|
|
159
|
-
TableAssertions.prototype.iCheckQuickFilterItems = function(iExpectedNumberOfItems) {
|
|
159
|
+
TableAssertions.prototype.iCheckQuickFilterItems = function (iExpectedNumberOfItems) {
|
|
160
160
|
return this.prepareResult(
|
|
161
161
|
this.getBuilder()
|
|
162
162
|
.hasQuickFilterItems(iExpectedNumberOfItems)
|
|
@@ -183,7 +183,7 @@ sap.ui.define(
|
|
|
183
183
|
*
|
|
184
184
|
* @public
|
|
185
185
|
*/
|
|
186
|
-
TableAssertions.prototype.iCheckColumns = function(iExpectedNumberOfColumns, mColumnStateMap) {
|
|
186
|
+
TableAssertions.prototype.iCheckColumns = function (iExpectedNumberOfColumns, mColumnStateMap) {
|
|
187
187
|
var aArguments = Utils.parseArguments([Number, Object], arguments),
|
|
188
188
|
mColumns = aArguments[1],
|
|
189
189
|
iNumberOfColumns = aArguments[0],
|
|
@@ -232,7 +232,7 @@ sap.ui.define(
|
|
|
232
232
|
*
|
|
233
233
|
* @public
|
|
234
234
|
*/
|
|
235
|
-
TableAssertions.prototype.iCheckCells = function(vRowValues, mColumnStateMap) {
|
|
235
|
+
TableAssertions.prototype.iCheckCells = function (vRowValues, mColumnStateMap) {
|
|
236
236
|
var mRows = arguments.length > 1 ? arguments[0] : undefined,
|
|
237
237
|
mColumns = arguments.length > 1 ? arguments[1] : arguments[0],
|
|
238
238
|
aRowMatcher = TableAPI.createRowMatchers(mRows, TableBuilder.Row.Matchers.cellProperties(mColumns)),
|
|
@@ -262,7 +262,7 @@ sap.ui.define(
|
|
|
262
262
|
*
|
|
263
263
|
* @public
|
|
264
264
|
*/
|
|
265
|
-
TableAssertions.prototype.iCheckAction = function(vActionIdentifier, mState) {
|
|
265
|
+
TableAssertions.prototype.iCheckAction = function (vActionIdentifier, mState) {
|
|
266
266
|
var oTableBuilder = this.getBuilder(),
|
|
267
267
|
vActionMatcher = this.createActionMatcher(vActionIdentifier),
|
|
268
268
|
vAggregationMatcher = FEBuilder.Matchers.deepAggregationMatcher("actions/action", [
|
|
@@ -301,7 +301,7 @@ sap.ui.define(
|
|
|
301
301
|
*
|
|
302
302
|
* @public
|
|
303
303
|
*/
|
|
304
|
-
TableAssertions.prototype.iCheckMenuAction = function(vAction) {
|
|
304
|
+
TableAssertions.prototype.iCheckMenuAction = function (vAction) {
|
|
305
305
|
return this.prepareResult(APIHelper.createMenuActionCheckBuilder(vAction).execute());
|
|
306
306
|
};
|
|
307
307
|
|
|
@@ -313,7 +313,7 @@ sap.ui.define(
|
|
|
313
313
|
*
|
|
314
314
|
* @public
|
|
315
315
|
*/
|
|
316
|
-
TableAssertions.prototype.iCheckDelete = function(mState) {
|
|
316
|
+
TableAssertions.prototype.iCheckDelete = function (mState) {
|
|
317
317
|
return this.iCheckAction({ service: "StandardAction", action: "Delete", unbound: true }, mState);
|
|
318
318
|
};
|
|
319
319
|
|
|
@@ -326,7 +326,7 @@ sap.ui.define(
|
|
|
326
326
|
*
|
|
327
327
|
* @public
|
|
328
328
|
*/
|
|
329
|
-
TableAssertions.prototype.iCheckSearchField = function(sSearchText, mState) {
|
|
329
|
+
TableAssertions.prototype.iCheckSearchField = function (sSearchText, mState) {
|
|
330
330
|
var aArguments = Utils.parseArguments([String, Object], arguments),
|
|
331
331
|
oTableBuilder = this.getBuilder();
|
|
332
332
|
return this.prepareResult(
|
|
@@ -352,7 +352,7 @@ sap.ui.define(
|
|
|
352
352
|
*
|
|
353
353
|
* @public
|
|
354
354
|
*/
|
|
355
|
-
TableAssertions.prototype.iCheckCreate = function(mState) {
|
|
355
|
+
TableAssertions.prototype.iCheckCreate = function (mState) {
|
|
356
356
|
return this.iCheckAction({ service: "StandardAction", action: "Create", unbound: true }, mState);
|
|
357
357
|
};
|
|
358
358
|
|
|
@@ -363,7 +363,7 @@ sap.ui.define(
|
|
|
363
363
|
*
|
|
364
364
|
* @public
|
|
365
365
|
*/
|
|
366
|
-
TableAssertions.prototype.iCheckPaste = function() {
|
|
366
|
+
TableAssertions.prototype.iCheckPaste = function () {
|
|
367
367
|
return this._iCheckTableProvidedAction("Paste");
|
|
368
368
|
};
|
|
369
369
|
|
|
@@ -375,11 +375,11 @@ sap.ui.define(
|
|
|
375
375
|
*
|
|
376
376
|
* @public
|
|
377
377
|
*/
|
|
378
|
-
TableAssertions.prototype.iCheckFullScreen = function(mState) {
|
|
378
|
+
TableAssertions.prototype.iCheckFullScreen = function (mState) {
|
|
379
379
|
return this.iCheckAction({ service: "StandardAction", action: "FullScreen", unbound: true }, mState);
|
|
380
380
|
};
|
|
381
381
|
|
|
382
|
-
TableAssertions.prototype._iCheckTableProvidedAction = function(sProvidedAction) {
|
|
382
|
+
TableAssertions.prototype._iCheckTableProvidedAction = function (sProvidedAction) {
|
|
383
383
|
var oTableBuilder = this.getBuilder();
|
|
384
384
|
return this.prepareResult(
|
|
385
385
|
oTableBuilder["has" + sProvidedAction]()
|
|
@@ -397,7 +397,7 @@ sap.ui.define(
|
|
|
397
397
|
*
|
|
398
398
|
* @public
|
|
399
399
|
*/
|
|
400
|
-
TableAssertions.prototype.iCheckColumnAdaptation = function() {
|
|
400
|
+
TableAssertions.prototype.iCheckColumnAdaptation = function () {
|
|
401
401
|
return this._iCheckTableProvidedAction("ColumnAdaptation");
|
|
402
402
|
};
|
|
403
403
|
|
|
@@ -408,7 +408,7 @@ sap.ui.define(
|
|
|
408
408
|
*
|
|
409
409
|
* @public
|
|
410
410
|
*/
|
|
411
|
-
TableAssertions.prototype.iCheckColumnSorting = function() {
|
|
411
|
+
TableAssertions.prototype.iCheckColumnSorting = function () {
|
|
412
412
|
this.iOpenColumnSorting();
|
|
413
413
|
TableBuilder.createSortingDialogBuilder(this.getOpaInstance()).execute();
|
|
414
414
|
return this.iConfirmColumnSorting();
|
|
@@ -421,7 +421,7 @@ sap.ui.define(
|
|
|
421
421
|
*
|
|
422
422
|
* @public
|
|
423
423
|
*/
|
|
424
|
-
TableAssertions.prototype.iCheckColumnFiltering = function() {
|
|
424
|
+
TableAssertions.prototype.iCheckColumnFiltering = function () {
|
|
425
425
|
this.iOpenFilterDialog();
|
|
426
426
|
TableBuilder.createFilteringDialogBuilder(this.getOpaInstance()).execute();
|
|
427
427
|
return this.iConfirmFilterDialog();
|
|
@@ -435,7 +435,7 @@ sap.ui.define(
|
|
|
435
435
|
*
|
|
436
436
|
* @public
|
|
437
437
|
*/
|
|
438
|
-
TableAssertions.prototype.iCheckExport = function() {
|
|
438
|
+
TableAssertions.prototype.iCheckExport = function () {
|
|
439
439
|
return this._iCheckTableProvidedAction("ColumnExport");
|
|
440
440
|
};
|
|
441
441
|
|
|
@@ -447,7 +447,7 @@ sap.ui.define(
|
|
|
447
447
|
*
|
|
448
448
|
* @public
|
|
449
449
|
*/
|
|
450
|
-
TableAssertions.prototype.iCheckQuickFilter = function(mState) {
|
|
450
|
+
TableAssertions.prototype.iCheckQuickFilter = function (mState) {
|
|
451
451
|
var oTableBuilder = this.getBuilder();
|
|
452
452
|
return this.prepareResult(
|
|
453
453
|
oTableBuilder
|
|
@@ -470,7 +470,7 @@ sap.ui.define(
|
|
|
470
470
|
*
|
|
471
471
|
* @public
|
|
472
472
|
*/
|
|
473
|
-
TableAssertions.prototype.iCheckColumnAdaptationDialog = function() {
|
|
473
|
+
TableAssertions.prototype.iCheckColumnAdaptationDialog = function () {
|
|
474
474
|
var oAdaptationDialogBuilder = TableBuilder.createAdaptationDialogBuilder(this.getOpaInstance());
|
|
475
475
|
return this.prepareResult(
|
|
476
476
|
oAdaptationDialogBuilder
|
|
@@ -488,7 +488,7 @@ sap.ui.define(
|
|
|
488
488
|
*
|
|
489
489
|
* @public
|
|
490
490
|
*/
|
|
491
|
-
TableAssertions.prototype.iCheckAdaptationColumn = function(vColumnIdentifier, mState) {
|
|
491
|
+
TableAssertions.prototype.iCheckAdaptationColumn = function (vColumnIdentifier, mState) {
|
|
492
492
|
return this.columnAdaptation(
|
|
493
493
|
vColumnIdentifier,
|
|
494
494
|
mState,
|
|
@@ -512,7 +512,7 @@ sap.ui.define(
|
|
|
512
512
|
*
|
|
513
513
|
* @public
|
|
514
514
|
*/
|
|
515
|
-
TableAssertions.prototype.iCheckSortOrder = function(vColumnIdentifier, sSortOrder, bCheckPersonalization) {
|
|
515
|
+
TableAssertions.prototype.iCheckSortOrder = function (vColumnIdentifier, sSortOrder, bCheckPersonalization) {
|
|
516
516
|
var aArguments = Utils.parseArguments([[String, Object], String, Boolean], arguments);
|
|
517
517
|
sSortOrder = aArguments[1] || SortOrder.Ascending;
|
|
518
518
|
bCheckPersonalization = aArguments[2];
|
|
@@ -536,12 +536,7 @@ sap.ui.define(
|
|
|
536
536
|
mColumnDefinition[Utils.isOfType(vColumnIdentifier, Object) ? vColumnIdentifier.name : vColumnIdentifier] = {
|
|
537
537
|
sortOrder: sSortOrder
|
|
538
538
|
};
|
|
539
|
-
return this.prepareResult(
|
|
540
|
-
this.getBuilder()
|
|
541
|
-
.hasColumns(mColumnDefinition)
|
|
542
|
-
.description(sDescription)
|
|
543
|
-
.execute()
|
|
544
|
-
);
|
|
539
|
+
return this.prepareResult(this.getBuilder().hasColumns(mColumnDefinition).description(sDescription).execute());
|
|
545
540
|
};
|
|
546
541
|
|
|
547
542
|
/**
|
|
@@ -553,7 +548,7 @@ sap.ui.define(
|
|
|
553
548
|
*
|
|
554
549
|
* @public
|
|
555
550
|
*/
|
|
556
|
-
TableAssertions.prototype.iCheckFilterField = function(vColumnIdentifier, mState) {
|
|
551
|
+
TableAssertions.prototype.iCheckFilterField = function (vColumnIdentifier, mState) {
|
|
557
552
|
var oFilterFieldBuilder = FilterFieldBuilder.create(this.getOpaInstance())
|
|
558
553
|
.isDialogElement()
|
|
559
554
|
.hasType("sap.ui.mdc.FilterField")
|
|
@@ -574,9 +569,9 @@ sap.ui.define(
|
|
|
574
569
|
fnCloseDialog = this.iConfirmFilterDialog.bind(this);
|
|
575
570
|
|
|
576
571
|
if (bCheckForNotVisible) {
|
|
577
|
-
oFilterFieldBuilder.check(function(aFoundFilterFields) {
|
|
572
|
+
oFilterFieldBuilder.check(function (aFoundFilterFields) {
|
|
578
573
|
// every field should not match name/fieldPath
|
|
579
|
-
return aFoundFilterFields.every(function(oFilterField) {
|
|
574
|
+
return aFoundFilterFields.every(function (oFilterField) {
|
|
580
575
|
return OpaBuilder.Matchers.not(oFilterFieldMatcher)(oFilterField);
|
|
581
576
|
});
|
|
582
577
|
});
|
|
@@ -589,7 +584,7 @@ sap.ui.define(
|
|
|
589
584
|
|
|
590
585
|
return this.prepareResult(
|
|
591
586
|
FEBuilder.create(this.getOpaInstance())
|
|
592
|
-
.success(function() {
|
|
587
|
+
.success(function () {
|
|
593
588
|
bDialogOpen = FEBuilder.controlsExist(oFilterFieldBuilder);
|
|
594
589
|
if (!bDialogOpen) {
|
|
595
590
|
fnOpenDialog();
|
|
@@ -608,17 +603,11 @@ sap.ui.define(
|
|
|
608
603
|
*
|
|
609
604
|
* @public
|
|
610
605
|
*/
|
|
611
|
-
TableAssertions.prototype.iCheckMessageStrip = function(mProperty) {
|
|
606
|
+
TableAssertions.prototype.iCheckMessageStrip = function (mProperty) {
|
|
612
607
|
var oTableBuilder = this.getBuilder();
|
|
613
608
|
return this.prepareResult(
|
|
614
609
|
oTableBuilder
|
|
615
|
-
.has(
|
|
616
|
-
OpaBuilder.Matchers.childrenMatcher(
|
|
617
|
-
FEBuilder.create(this)
|
|
618
|
-
.hasType("sap.m.MessageStrip")
|
|
619
|
-
.hasProperties(mProperty)
|
|
620
|
-
)
|
|
621
|
-
)
|
|
610
|
+
.has(OpaBuilder.Matchers.childrenMatcher(FEBuilder.create(this).hasType("sap.m.MessageStrip").hasProperties(mProperty)))
|
|
622
611
|
.description(
|
|
623
612
|
Utils.formatMessage(
|
|
624
613
|
"Checking table '{0}' having a MessageStrip with text ='{1}' and type ='{2}'",
|
|
@@ -631,6 +620,22 @@ sap.ui.define(
|
|
|
631
620
|
);
|
|
632
621
|
};
|
|
633
622
|
|
|
623
|
+
/**
|
|
624
|
+
* Checks if the focus is on a table.
|
|
625
|
+
* @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
|
|
626
|
+
*
|
|
627
|
+
* @public
|
|
628
|
+
*/
|
|
629
|
+
TableAssertions.prototype.iSeeFocusOnHeader = function () {
|
|
630
|
+
var oTableBuilder = this.getBuilder();
|
|
631
|
+
return this.prepareResult(
|
|
632
|
+
oTableBuilder
|
|
633
|
+
.hasHeaderFocused()
|
|
634
|
+
.description(Utils.formatMessage("Checking focus on table '{0}' ", this.getIdentifier()))
|
|
635
|
+
.execute()
|
|
636
|
+
);
|
|
637
|
+
};
|
|
638
|
+
|
|
634
639
|
/**
|
|
635
640
|
* Checks if a given column supports grouping.
|
|
636
641
|
* If <code>iExpectedNumber</code> and <code>sFieldLabel</code> are not provided, we just check that the column header has a group icon.
|
|
@@ -642,7 +647,7 @@ sap.ui.define(
|
|
|
642
647
|
* @param {string} sFieldLabel The target field to group on in case of a complex property
|
|
643
648
|
* @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
|
|
644
649
|
*/
|
|
645
|
-
TableAssertions.prototype.iCheckGroupByColumn = function(vColumnIdentifier, iExpectedNumber, sFieldLabel) {
|
|
650
|
+
TableAssertions.prototype.iCheckGroupByColumn = function (vColumnIdentifier, iExpectedNumber, sFieldLabel) {
|
|
646
651
|
var oTableBuilder = this.getBuilder(),
|
|
647
652
|
vColumn = Utils.isOfType(vColumnIdentifier, Object) ? vColumnIdentifier.name : vColumnIdentifier;
|
|
648
653
|
return this.prepareResult(
|
|
@@ -672,7 +677,7 @@ sap.ui.define(
|
|
|
672
677
|
* @param {string} sFieldLabel The target field to aggregate on in case of a complex property
|
|
673
678
|
* @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
|
|
674
679
|
*/
|
|
675
|
-
TableAssertions.prototype.iCheckAggregationColumn = function(vColumnIdentifier, iExpectedNumber, sFieldLabel) {
|
|
680
|
+
TableAssertions.prototype.iCheckAggregationColumn = function (vColumnIdentifier, iExpectedNumber, sFieldLabel) {
|
|
676
681
|
var oTableBuilder = this.getBuilder(),
|
|
677
682
|
vColumn = Utils.isOfType(vColumnIdentifier, Object) ? vColumnIdentifier.name : vColumnIdentifier;
|
|
678
683
|
return this.prepareResult(
|
|
@@ -691,7 +696,7 @@ sap.ui.define(
|
|
|
691
696
|
);
|
|
692
697
|
};
|
|
693
698
|
|
|
694
|
-
TableAssertions.prototype.iCheckTitle = function(sTitle) {
|
|
699
|
+
TableAssertions.prototype.iCheckTitle = function (sTitle) {
|
|
695
700
|
var oTableBuilder = this.getBuilder();
|
|
696
701
|
|
|
697
702
|
return this.prepareResult(
|