@sapui5/sap.fe.test 1.102.2 → 1.104.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/package.json +3 -4
- package/src/sap/fe/test/.library +1 -1
- package/src/sap/fe/test/BaseActions.js +103 -97
- package/src/sap/fe/test/BaseArrangements.js +4 -15
- package/src/sap/fe/test/BaseAssertions.js +39 -46
- package/src/sap/fe/test/CollaborationClient.js +5 -5
- package/src/sap/fe/test/CollaborationClient.ts +5 -5
- package/src/sap/fe/test/FeMocks.js +1 -1
- package/src/sap/fe/test/FeMocks.ts +4 -3
- package/src/sap/fe/test/Flexibility.js +115 -162
- package/src/sap/fe/test/JestTemplatingHelper.js +99 -7
- package/src/sap/fe/test/JestTemplatingHelper.ts +91 -14
- package/src/sap/fe/test/JourneyRunner.js +31 -37
- package/src/sap/fe/test/ListReport.js +9 -13
- package/src/sap/fe/test/ObjectPage.js +35 -33
- package/src/sap/fe/test/Shell.js +0 -6
- package/src/sap/fe/test/TemplatePage.js +0 -2
- package/src/sap/fe/test/TemplatingTestUtils.js +20 -20
- package/src/sap/fe/test/UI5MockHelper.js +16 -10
- package/src/sap/fe/test/UI5MockHelper.ts +28 -18
- package/src/sap/fe/test/Utils.js +19 -20
- package/src/sap/fe/test/api/BaseAPI.js +11 -26
- package/src/sap/fe/test/api/ChartActions.js +116 -119
- package/src/sap/fe/test/api/ChartAssertions.js +18 -22
- package/src/sap/fe/test/api/CollaborationAPI.js +6 -6
- package/src/sap/fe/test/api/CollaborationAPI.ts +9 -11
- package/src/sap/fe/test/api/DialogAPI.js +11 -13
- package/src/sap/fe/test/api/DialogActions.js +8 -8
- package/src/sap/fe/test/api/DialogAssertions.js +9 -10
- package/src/sap/fe/test/api/DialogHelper.js +63 -0
- package/src/sap/fe/test/api/DialogMessageActions.js +2 -1
- package/src/sap/fe/test/api/DialogValueHelpActions.js +17 -39
- package/src/sap/fe/test/api/DialogValueHelpAssertions.js +47 -19
- package/src/sap/fe/test/api/FilterBarAPI.js +11 -12
- package/src/sap/fe/test/api/FilterBarActions.js +26 -40
- package/src/sap/fe/test/api/FilterBarAssertions.js +28 -47
- package/src/sap/fe/test/api/FooterActionsBase.js +3 -4
- package/src/sap/fe/test/api/FooterActionsOP.js +6 -10
- package/src/sap/fe/test/api/FooterAssertionsBase.js +5 -10
- package/src/sap/fe/test/api/FooterAssertionsOP.js +8 -13
- package/src/sap/fe/test/api/FormAPI.js +5 -6
- package/src/sap/fe/test/api/FormActions.js +11 -21
- package/src/sap/fe/test/api/FormAssertions.js +14 -20
- package/src/sap/fe/test/api/HeaderAPI.js +12 -27
- package/src/sap/fe/test/api/HeaderActions.js +10 -12
- package/src/sap/fe/test/api/HeaderActionsLR.js +76 -82
- package/src/sap/fe/test/api/HeaderAssertions.js +2 -20
- package/src/sap/fe/test/api/HeaderAssertionsLR.js +5 -8
- package/src/sap/fe/test/api/HeaderLR.js +7 -19
- package/src/sap/fe/test/api/KPICardAssertions.js +18 -37
- package/src/sap/fe/test/api/TableAPI.js +3 -13
- package/src/sap/fe/test/api/TableActions.js +2 -34
- package/src/sap/fe/test/api/TableAssertions.js +1 -24
- package/src/sap/fe/test/builder/FEBuilder.js +71 -75
- package/src/sap/fe/test/builder/MacroFieldBuilder.js +4 -3
- package/src/sap/fe/test/builder/MdcFieldBuilder.js +33 -29
- package/src/sap/fe/test/builder/MdcFilterBarBuilder.js +102 -104
- package/src/sap/fe/test/builder/MdcFilterFieldBuilder.js +9 -7
- package/src/sap/fe/test/builder/MdcTableBuilder.js +8 -4
- package/src/sap/fe/test/builder/VMBuilder.js +39 -55
- package/src/sap/fe/test/internal/ConsoleErrorChecker.js +241 -0
- package/src/sap/fe/test/internal/ConsoleErrorChecker.ts +206 -0
- package/src/sap/fe/test/internal/FEArrangements.js +28 -8
- package/src/sap/fe/test/library.js +3 -2
- package/src/sap/fe/test/library.ts +1 -0
|
@@ -3,110 +3,108 @@
|
|
|
3
3
|
(c) Copyright 2009-2021 SAP SE. All rights reserved
|
|
4
4
|
|
|
5
5
|
*/
|
|
6
|
-
sap.ui.define(
|
|
7
|
-
FEBuilder,
|
|
8
|
-
Utils,
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
) {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
);
|
|
6
|
+
sap.ui.define(
|
|
7
|
+
["./FEBuilder", "sap/fe/test/Utils", "sap/ui/test/OpaBuilder", "sap/fe/test/builder/DialogBuilder"],
|
|
8
|
+
function (FEBuilder, Utils, OpaBuilder, DialogBuilder) {
|
|
9
|
+
"use strict";
|
|
10
|
+
|
|
11
|
+
var FilterBarBuilder = function () {
|
|
12
|
+
return FEBuilder.apply(this, arguments);
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
FilterBarBuilder.create = function (oOpaInstance) {
|
|
16
|
+
return new FilterBarBuilder(oOpaInstance);
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
FilterBarBuilder.prototype = Object.create(FEBuilder.prototype);
|
|
20
|
+
FilterBarBuilder.prototype.constructor = FilterBarBuilder;
|
|
21
|
+
|
|
22
|
+
FilterBarBuilder.createAdaptationDialogBuilder = function (oOpaInstance) {
|
|
23
|
+
return DialogBuilder.create(oOpaInstance).hasAggregation("customHeader");
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
FilterBarBuilder.prototype.hasField = function (vFieldMatcher, mState, bReturnField) {
|
|
27
|
+
var aArguments = Utils.parseArguments([[Array, Object, Function], Object, Boolean], arguments);
|
|
28
|
+
vFieldMatcher = aArguments[0];
|
|
29
|
+
mState = aArguments[1];
|
|
30
|
+
bReturnField = aArguments[2];
|
|
31
|
+
|
|
32
|
+
if (mState) {
|
|
33
|
+
var vStatesMatcher = this.getStatesMatcher(mState);
|
|
34
|
+
if (mState.visible === false) {
|
|
35
|
+
// when checking for not visible, the either no field exists or existing field is not visible (like the provided state)
|
|
36
|
+
return this.hasSome(
|
|
37
|
+
OpaBuilder.Matchers.not(OpaBuilder.Matchers.aggregationMatcher("filterItems", vFieldMatcher)),
|
|
38
|
+
OpaBuilder.Matchers.aggregationMatcher("filterItems", [vStatesMatcher].concat(vFieldMatcher || []))
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
vFieldMatcher = [vStatesMatcher].concat(vFieldMatcher || []);
|
|
43
42
|
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
return this.has(function(oFilterBar) {
|
|
56
|
-
return !oFilterBar.getFilterItems().some(FEBuilder.Matchers.match(fnEditStateMatcher));
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
var aFilterItemsMatchers = [fnEditStateMatcher];
|
|
61
|
-
if (oEditState) {
|
|
62
|
-
aFilterItemsMatchers.push(
|
|
63
|
-
OpaBuilder.Matchers.hasAggregation("contentEdit", OpaBuilder.Matchers.properties("selectedKey", oEditState.id))
|
|
64
|
-
);
|
|
65
|
-
}
|
|
66
|
-
if (mState && Object.keys(mState).length) {
|
|
67
|
-
aFilterItemsMatchers.push(FEBuilder.Matchers.states(mState));
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
return this.hasAggregation("filterItems", aFilterItemsMatchers);
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
FilterBarBuilder.prototype.hasSearchField = function(sSearchText, mState) {
|
|
74
|
-
var aMatchers = [];
|
|
75
|
-
if (mState) {
|
|
76
|
-
if (mState.visible === false) {
|
|
77
|
-
return this.has(function(oFilterBar) {
|
|
78
|
-
return !oFilterBar.getBasicSearchField();
|
|
43
|
+
|
|
44
|
+
return bReturnField
|
|
45
|
+
? this.has(OpaBuilder.Matchers.aggregation("filterItems", vFieldMatcher)).has(FEBuilder.Matchers.atIndex(0))
|
|
46
|
+
: this.has(OpaBuilder.Matchers.aggregationMatcher("filterItems", vFieldMatcher));
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
FilterBarBuilder.prototype.hasEditingStatus = function (oEditState, mState) {
|
|
50
|
+
var fnEditStateMatcher = OpaBuilder.Matchers.resourceBundle("label", "sap.fe.macros", "FILTERBAR_EDITING_STATUS");
|
|
51
|
+
if (mState && "visible" in mState && mState.visible === false) {
|
|
52
|
+
return this.has(function (oFilterBar) {
|
|
53
|
+
return !oFilterBar.getFilterItems().some(FEBuilder.Matchers.match(fnEditStateMatcher));
|
|
79
54
|
});
|
|
80
55
|
}
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
56
|
+
|
|
57
|
+
var aFilterItemsMatchers = [fnEditStateMatcher];
|
|
58
|
+
if (oEditState) {
|
|
59
|
+
aFilterItemsMatchers.push(
|
|
60
|
+
OpaBuilder.Matchers.hasAggregation("contentEdit", OpaBuilder.Matchers.properties("selectedKey", oEditState.id))
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
if (mState && Object.keys(mState).length) {
|
|
64
|
+
aFilterItemsMatchers.push(FEBuilder.Matchers.states(mState));
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
return this.hasAggregation("filterItems", aFilterItemsMatchers);
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
FilterBarBuilder.prototype.hasSearchField = function (sSearchText, mState) {
|
|
71
|
+
var aMatchers = [];
|
|
72
|
+
if (mState) {
|
|
73
|
+
if (mState.visible === false) {
|
|
74
|
+
return this.has(function (oFilterBar) {
|
|
75
|
+
return !oFilterBar.getBasicSearchField();
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
aMatchers.push(FEBuilder.Matchers.states(mState));
|
|
79
|
+
}
|
|
80
|
+
if (sSearchText) {
|
|
81
|
+
aMatchers.push(OpaBuilder.Matchers.properties({ value: sSearchText }));
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
return this.hasAggregation("basicSearchField", aMatchers);
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
FilterBarBuilder.prototype.doChangeEditingStatus = function (vEditState) {
|
|
88
|
+
var fnEditStateMatcher = OpaBuilder.Matchers.resourceBundle("label", "sap.fe.macros", "FILTERBAR_EDITING_STATUS");
|
|
89
|
+
return this.doOnAggregation("filterItems", fnEditStateMatcher, OpaBuilder.Actions.enterText(vEditState.display));
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
FilterBarBuilder.prototype.doChangeSearch = function (sSearchText) {
|
|
93
|
+
return this.doOnAggregation("basicSearchField", OpaBuilder.Actions.enterText(sSearchText || ""));
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
FilterBarBuilder.prototype.doResetSearch = function () {
|
|
97
|
+
return this.doOnAggregation("basicSearchField", OpaBuilder.Actions.press("inner-reset"));
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
FilterBarBuilder.prototype.doSearch = function () {
|
|
101
|
+
return this.doPress("btnSearch");
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
FilterBarBuilder.prototype.doOpenSettings = function () {
|
|
105
|
+
return this.doPress("btnAdapt");
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
return FilterBarBuilder;
|
|
109
|
+
}
|
|
110
|
+
);
|
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
(c) Copyright 2009-2021 SAP SE. All rights reserved
|
|
4
4
|
|
|
5
5
|
*/
|
|
6
|
-
sap.ui.define(["./MdcFieldBuilder", "sap/fe/test/Utils"], function(FieldBuilder, Utils) {
|
|
6
|
+
sap.ui.define(["./MdcFieldBuilder", "sap/fe/test/Utils"], function (FieldBuilder, Utils) {
|
|
7
7
|
"use strict";
|
|
8
8
|
|
|
9
|
-
var FilterFieldBuilder = function() {
|
|
9
|
+
var FilterFieldBuilder = function () {
|
|
10
10
|
return FieldBuilder.apply(this, arguments);
|
|
11
11
|
};
|
|
12
12
|
|
|
13
|
-
FilterFieldBuilder.create = function(oOpaInstance) {
|
|
13
|
+
FilterFieldBuilder.create = function (oOpaInstance) {
|
|
14
14
|
return new FilterFieldBuilder(oOpaInstance);
|
|
15
15
|
};
|
|
16
16
|
|
|
@@ -19,27 +19,29 @@ sap.ui.define(["./MdcFieldBuilder", "sap/fe/test/Utils"], function(FieldBuilder,
|
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
21
|
* Checks for certain condition value(s).
|
|
22
|
+
*
|
|
22
23
|
* @param {string|Array} [vValue] The expected value(s)
|
|
23
24
|
* @param {string} [sOperator] The expected operator
|
|
24
25
|
* @returns {sap.fe.test.builder.FilterFieldBuilder} `this`
|
|
25
26
|
* @public
|
|
26
27
|
* @ui5-restricted
|
|
27
28
|
*/
|
|
28
|
-
FilterFieldBuilder.prototype.hasValue = function(vValue, sOperator) {
|
|
29
|
+
FilterFieldBuilder.prototype.hasValue = function (vValue, sOperator) {
|
|
29
30
|
return FieldBuilder.prototype.hasConditionValues.apply(this, arguments);
|
|
30
31
|
};
|
|
31
32
|
|
|
32
33
|
/**
|
|
33
34
|
* Changes the value of the filter field.
|
|
35
|
+
*
|
|
34
36
|
* @param {string} vValue The new value
|
|
35
|
-
* @param bClearFirst
|
|
37
|
+
* @param {boolean} bClearFirst
|
|
36
38
|
* @returns {sap.fe.test.builder.FilterFieldBuilder} `this`
|
|
37
39
|
* @public
|
|
38
40
|
* @ui5-restricted
|
|
39
41
|
*/
|
|
40
|
-
FilterFieldBuilder.prototype.doChangeValue = function(vValue, bClearFirst) {
|
|
42
|
+
FilterFieldBuilder.prototype.doChangeValue = function (vValue, bClearFirst) {
|
|
41
43
|
if (bClearFirst) {
|
|
42
|
-
this.do(function(oFilterField) {
|
|
44
|
+
this.do(function (oFilterField) {
|
|
43
45
|
oFilterField.setConditions([]);
|
|
44
46
|
});
|
|
45
47
|
}
|
|
@@ -36,23 +36,30 @@ sap.ui.define(
|
|
|
36
36
|
var RowActionType = {
|
|
37
37
|
/**
|
|
38
38
|
* Custom defined Row Action.
|
|
39
|
+
*
|
|
39
40
|
* @public
|
|
40
41
|
*/
|
|
41
42
|
Custom: "Custom",
|
|
42
43
|
|
|
43
44
|
/**
|
|
44
45
|
* Navigation Row Action.
|
|
46
|
+
*
|
|
45
47
|
* @public
|
|
46
48
|
*/
|
|
47
49
|
Navigation: "Navigation",
|
|
48
50
|
|
|
49
51
|
/**
|
|
50
52
|
* Delete Row Action.
|
|
53
|
+
*
|
|
51
54
|
* @public
|
|
52
55
|
*/
|
|
53
56
|
Delete: "Delete"
|
|
54
57
|
};
|
|
55
58
|
|
|
59
|
+
var TableBuilder = function () {
|
|
60
|
+
return FEBuilder.apply(this, arguments).hasType("sap.ui.mdc.Table");
|
|
61
|
+
};
|
|
62
|
+
|
|
56
63
|
function _isGridTable(oMdcTable) {
|
|
57
64
|
return oMdcTable.getType().isA("sap.ui.mdc.table.GridTableType");
|
|
58
65
|
}
|
|
@@ -264,9 +271,6 @@ sap.ui.define(
|
|
|
264
271
|
.execute()
|
|
265
272
|
);
|
|
266
273
|
}
|
|
267
|
-
var TableBuilder = function () {
|
|
268
|
-
return FEBuilder.apply(this, arguments).hasType("sap.ui.mdc.Table");
|
|
269
|
-
};
|
|
270
274
|
|
|
271
275
|
TableBuilder.create = function (oOpaInstance) {
|
|
272
276
|
return new TableBuilder(oOpaInstance);
|
|
@@ -929,7 +933,7 @@ sap.ui.define(
|
|
|
929
933
|
oMdcTable = oTable.getParent(),
|
|
930
934
|
bIsGridTable = _isGridTable(oMdcTable),
|
|
931
935
|
bRowIsSelected = bIsGridTable
|
|
932
|
-
?
|
|
936
|
+
? oMdcTable.getSelectedContexts().includes(oRow.getBindingContext())
|
|
933
937
|
: oRow.getSelected();
|
|
934
938
|
|
|
935
939
|
return bSelected ? bRowIsSelected : !bRowIsSelected;
|
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
(c) Copyright 2009-2021 SAP SE. All rights reserved
|
|
4
4
|
|
|
5
5
|
*/
|
|
6
|
-
sap.ui.define(["./FEBuilder", "sap/ui/test/OpaBuilder", "sap/fe/test/Utils"], function(FEBuilder, OpaBuilder, Utils) {
|
|
6
|
+
sap.ui.define(["./FEBuilder", "sap/ui/test/OpaBuilder", "sap/fe/test/Utils"], function (FEBuilder, OpaBuilder, Utils) {
|
|
7
7
|
"use strict";
|
|
8
8
|
|
|
9
|
-
var VMBuilder = function() {
|
|
9
|
+
var VMBuilder = function () {
|
|
10
10
|
return FEBuilder.apply(this, arguments);
|
|
11
11
|
};
|
|
12
12
|
|
|
13
|
-
VMBuilder.create = function(oOpaInstance) {
|
|
13
|
+
VMBuilder.create = function (oOpaInstance) {
|
|
14
14
|
return new VMBuilder(oOpaInstance);
|
|
15
15
|
};
|
|
16
16
|
|
|
@@ -19,28 +19,29 @@ sap.ui.define(["./FEBuilder", "sap/ui/test/OpaBuilder", "sap/fe/test/Utils"], fu
|
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
21
|
* Saves a variant under given name.
|
|
22
|
+
*
|
|
22
23
|
* @param {string} sVariantName The name of the new variant
|
|
23
|
-
* @param bSetAsDefault
|
|
24
|
-
* @param bApplyAutomatically
|
|
24
|
+
* @param {boolean} bSetAsDefault
|
|
25
|
+
* @param {boolean} bApplyAutomatically
|
|
25
26
|
* @returns {sap.fe.test.builder.VMBuilder} This instance
|
|
26
27
|
* @public
|
|
27
28
|
* @ui5-restricted
|
|
28
29
|
*/
|
|
29
|
-
VMBuilder.prototype.doSaveAs = function(sVariantName, bSetAsDefault, bApplyAutomatically) {
|
|
30
|
+
VMBuilder.prototype.doSaveAs = function (sVariantName, bSetAsDefault, bApplyAutomatically) {
|
|
30
31
|
var vGivenDescription = Utils.formatMessage("Save as variant '{0}'", sVariantName);
|
|
31
|
-
this.description = function(vDescription) {
|
|
32
|
+
this.description = function (vDescription) {
|
|
32
33
|
vGivenDescription = vDescription;
|
|
33
34
|
return this;
|
|
34
35
|
}.bind(this);
|
|
35
36
|
|
|
36
37
|
return this.doPress().success(
|
|
37
|
-
function(oVMControl) {
|
|
38
|
+
function (oVMControl) {
|
|
38
39
|
return FEBuilder.create(this)
|
|
39
40
|
.hasId(oVMControl.getId())
|
|
40
|
-
.doPress("saveas")
|
|
41
|
+
.doPress("vm-saveas")
|
|
41
42
|
.success(
|
|
42
43
|
FEBuilder.create(this)
|
|
43
|
-
.hasId(oVMControl.getId() + "-savedialog")
|
|
44
|
+
.hasId(oVMControl.getId() + "-vm-savedialog")
|
|
44
45
|
.doOnChildren(
|
|
45
46
|
FEBuilder.create(this)
|
|
46
47
|
.hasId(/-name$/)
|
|
@@ -76,24 +77,19 @@ sap.ui.define(["./FEBuilder", "sap/ui/test/OpaBuilder", "sap/fe/test/Utils"], fu
|
|
|
76
77
|
* Saves the current variant.
|
|
77
78
|
*
|
|
78
79
|
* @returns {sap.fe.test.builder.VMBuilder} This instance
|
|
79
|
-
*
|
|
80
80
|
* @public
|
|
81
81
|
* @ui5-restricted
|
|
82
82
|
*/
|
|
83
|
-
VMBuilder.prototype.doSave = function() {
|
|
83
|
+
VMBuilder.prototype.doSave = function () {
|
|
84
84
|
var vGivenDescription = "Save variant";
|
|
85
|
-
this.description = function(vDescription) {
|
|
85
|
+
this.description = function (vDescription) {
|
|
86
86
|
vGivenDescription = vDescription;
|
|
87
87
|
return this;
|
|
88
88
|
}.bind(this);
|
|
89
89
|
|
|
90
90
|
return this.doPress().success(
|
|
91
|
-
function(oVMControl) {
|
|
92
|
-
return FEBuilder.create(this)
|
|
93
|
-
.hasId(oVMControl.getId())
|
|
94
|
-
.doPress("mainsave")
|
|
95
|
-
.description(vGivenDescription)
|
|
96
|
-
.execute();
|
|
91
|
+
function (oVMControl) {
|
|
92
|
+
return FEBuilder.create(this).hasId(oVMControl.getId()).doPress("vm-mainsave").description(vGivenDescription).execute();
|
|
97
93
|
}.bind(this)
|
|
98
94
|
);
|
|
99
95
|
};
|
|
@@ -103,20 +99,19 @@ sap.ui.define(["./FEBuilder", "sap/ui/test/OpaBuilder", "sap/fe/test/Utils"], fu
|
|
|
103
99
|
*
|
|
104
100
|
* @param {string} sVariantName The name of the variant to select
|
|
105
101
|
* @returns {sap.fe.test.builder.VMBuilder} This instance
|
|
106
|
-
*
|
|
107
102
|
* @public
|
|
108
103
|
* @ui5-restricted
|
|
109
104
|
*/
|
|
110
|
-
VMBuilder.prototype.doSelectVariant = function(sVariantName) {
|
|
105
|
+
VMBuilder.prototype.doSelectVariant = function (sVariantName) {
|
|
111
106
|
var vGivenDescription = Utils.formatMessage("Selecting variant '{0}'", sVariantName);
|
|
112
|
-
this.description = function(vDescription) {
|
|
107
|
+
this.description = function (vDescription) {
|
|
113
108
|
vGivenDescription = vDescription;
|
|
114
109
|
return this;
|
|
115
110
|
}.bind(this);
|
|
116
111
|
return this.doPress().success(
|
|
117
|
-
function(oVMControl) {
|
|
112
|
+
function (oVMControl) {
|
|
118
113
|
return FEBuilder.create(this)
|
|
119
|
-
.hasId(oVMControl.getId() + "-list")
|
|
114
|
+
.hasId(oVMControl.getId() + "-vm-list")
|
|
120
115
|
.doOnAggregation("items", OpaBuilder.Matchers.properties({ text: sVariantName }), OpaBuilder.Actions.press())
|
|
121
116
|
.description(vGivenDescription)
|
|
122
117
|
.execute();
|
|
@@ -129,24 +124,23 @@ sap.ui.define(["./FEBuilder", "sap/ui/test/OpaBuilder", "sap/fe/test/Utils"], fu
|
|
|
129
124
|
*
|
|
130
125
|
* @param {string} sVariantName The name of the variant to remove
|
|
131
126
|
* @returns {sap.fe.test.builder.VMBuilder} This instance
|
|
132
|
-
*
|
|
133
127
|
* @public
|
|
134
128
|
* @ui5-restricted
|
|
135
129
|
*/
|
|
136
|
-
VMBuilder.prototype.doRemoveVariant = function(sVariantName) {
|
|
130
|
+
VMBuilder.prototype.doRemoveVariant = function (sVariantName) {
|
|
137
131
|
var vGivenDescription = Utils.formatMessage("Removing variant '{0}'", sVariantName);
|
|
138
|
-
this.description = function(vDescription) {
|
|
132
|
+
this.description = function (vDescription) {
|
|
139
133
|
vGivenDescription = vDescription;
|
|
140
134
|
return this;
|
|
141
135
|
}.bind(this);
|
|
142
136
|
return this.doPress().success(
|
|
143
|
-
function(oVMControl) {
|
|
137
|
+
function (oVMControl) {
|
|
144
138
|
return FEBuilder.create(this)
|
|
145
139
|
.hasId(oVMControl.getId())
|
|
146
|
-
.doPress("manage")
|
|
140
|
+
.doPress("vm-manage")
|
|
147
141
|
.success(
|
|
148
142
|
FEBuilder.create(this)
|
|
149
|
-
.hasId(oVMControl.getId() + "-managementTable")
|
|
143
|
+
.hasId(oVMControl.getId() + "-vm-managementTable")
|
|
150
144
|
.doOnChildren(
|
|
151
145
|
FEBuilder.create(this)
|
|
152
146
|
.hasType("sap.m.ColumnListItem")
|
|
@@ -162,7 +156,7 @@ sap.ui.define(["./FEBuilder", "sap/ui/test/OpaBuilder", "sap/fe/test/Utils"], fu
|
|
|
162
156
|
)
|
|
163
157
|
.doOnChildren(
|
|
164
158
|
FEBuilder.create(this)
|
|
165
|
-
.hasId(/-managementsave$/)
|
|
159
|
+
.hasId(/-vm-managementsave$/)
|
|
166
160
|
.hasType("sap.m.Button")
|
|
167
161
|
.doPress()
|
|
168
162
|
)
|
|
@@ -178,39 +172,34 @@ sap.ui.define(["./FEBuilder", "sap/ui/test/OpaBuilder", "sap/fe/test/Utils"], fu
|
|
|
178
172
|
*
|
|
179
173
|
* @param {string} sVariantName The name of the variant to be set as default
|
|
180
174
|
* @returns {sap.fe.test.builder.VMBuilder} `this` instance
|
|
181
|
-
*
|
|
182
175
|
* @public
|
|
183
176
|
* @ui5-restricted
|
|
184
177
|
*/
|
|
185
|
-
VMBuilder.prototype.doSetVariantAsDefault = function(sVariantName) {
|
|
178
|
+
VMBuilder.prototype.doSetVariantAsDefault = function (sVariantName) {
|
|
186
179
|
var vGivenDescription = Utils.formatMessage("Setting variant '{0}' as default", sVariantName);
|
|
187
|
-
this.description = function(vDescription) {
|
|
180
|
+
this.description = function (vDescription) {
|
|
188
181
|
vGivenDescription = vDescription;
|
|
189
182
|
return this;
|
|
190
183
|
}.bind(this);
|
|
191
184
|
return this.doPress().success(
|
|
192
|
-
function(oVMControl) {
|
|
185
|
+
function (oVMControl) {
|
|
193
186
|
return FEBuilder.create(this)
|
|
194
187
|
.hasId(oVMControl.getId())
|
|
195
|
-
.doPress("manage")
|
|
188
|
+
.doPress("vm-manage")
|
|
196
189
|
.success(
|
|
197
190
|
FEBuilder.create(this)
|
|
198
|
-
.hasId(oVMControl.getId() + "-managementTable")
|
|
191
|
+
.hasId(oVMControl.getId() + "-vm-managementTable")
|
|
199
192
|
.doOnChildren(
|
|
200
193
|
FEBuilder.create(this)
|
|
201
194
|
.hasType("sap.m.ColumnListItem")
|
|
202
195
|
.hasAggregationProperties("cells", { value: sVariantName })
|
|
203
|
-
.doOnChildren(
|
|
204
|
-
FEBuilder.create(this)
|
|
205
|
-
.hasType("sap.m.RadioButton")
|
|
206
|
-
.doPress()
|
|
207
|
-
)
|
|
196
|
+
.doOnChildren(FEBuilder.create(this).hasType("sap.m.RadioButton").doPress())
|
|
208
197
|
)
|
|
209
198
|
.description(vGivenDescription)
|
|
210
199
|
)
|
|
211
200
|
.success(
|
|
212
201
|
FEBuilder.create(this)
|
|
213
|
-
.hasId(oVMControl.getId() + "-managementsave")
|
|
202
|
+
.hasId(oVMControl.getId() + "-vm-managementsave")
|
|
214
203
|
.hasType("sap.m.Button")
|
|
215
204
|
.doPress()
|
|
216
205
|
)
|
|
@@ -223,39 +212,34 @@ sap.ui.define(["./FEBuilder", "sap/ui/test/OpaBuilder", "sap/fe/test/Utils"], fu
|
|
|
223
212
|
* Resets the default variant to Standard.
|
|
224
213
|
*
|
|
225
214
|
* @returns {sap.fe.test.builder.VMBuilder} `this` instance
|
|
226
|
-
*
|
|
227
215
|
* @public
|
|
228
216
|
* @ui5-restricted
|
|
229
217
|
*/
|
|
230
|
-
VMBuilder.prototype.doResetDefaultVariant = function() {
|
|
218
|
+
VMBuilder.prototype.doResetDefaultVariant = function () {
|
|
231
219
|
var vGivenDescription = Utils.formatMessage("Resetting default variant ");
|
|
232
|
-
this.description = function(vDescription) {
|
|
220
|
+
this.description = function (vDescription) {
|
|
233
221
|
vGivenDescription = vDescription;
|
|
234
222
|
return this;
|
|
235
223
|
}.bind(this);
|
|
236
224
|
return this.doPress().success(
|
|
237
|
-
function(oVMControl) {
|
|
225
|
+
function (oVMControl) {
|
|
238
226
|
return FEBuilder.create(this)
|
|
239
227
|
.hasId(oVMControl.getId())
|
|
240
|
-
.doPress("manage")
|
|
228
|
+
.doPress("vm-manage")
|
|
241
229
|
.success(
|
|
242
230
|
FEBuilder.create(this)
|
|
243
|
-
.hasId(oVMControl.getId() + "-managementTable")
|
|
231
|
+
.hasId(oVMControl.getId() + "-vm-managementTable")
|
|
244
232
|
.doOnChildren(
|
|
245
233
|
FEBuilder.create(this)
|
|
246
234
|
.hasType("sap.m.ColumnListItem")
|
|
247
235
|
.hasAggregationProperties("cells", { text: "SAP" })
|
|
248
|
-
.doOnChildren(
|
|
249
|
-
FEBuilder.create(this)
|
|
250
|
-
.hasType("sap.m.RadioButton")
|
|
251
|
-
.doPress()
|
|
252
|
-
)
|
|
236
|
+
.doOnChildren(FEBuilder.create(this).hasType("sap.m.RadioButton").doPress())
|
|
253
237
|
)
|
|
254
238
|
.description(vGivenDescription)
|
|
255
239
|
)
|
|
256
240
|
.success(
|
|
257
241
|
FEBuilder.create(this)
|
|
258
|
-
.hasId(oVMControl.getId() + "-managementsave")
|
|
242
|
+
.hasId(oVMControl.getId() + "-vm-managementsave")
|
|
259
243
|
.hasType("sap.m.Button")
|
|
260
244
|
.doPress()
|
|
261
245
|
)
|