@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.
@@ -3,177 +3,182 @@
3
3
  (c) Copyright 2009-2021 SAP SE. All rights reserved
4
4
 
5
5
  */
6
- sap.ui.define(["./FEBuilder", "./MdcFieldBuilder", "sap/ui/test/OpaBuilder", "sap/fe/test/Utils"], function(
7
- FEBuilder,
8
- FieldBuilder,
9
- OpaBuilder,
10
- Utils
11
- ) {
12
- "use strict";
6
+ sap.ui.define(
7
+ ["./FEBuilder", "./MdcFieldBuilder", "sap/ui/test/OpaBuilder", "sap/fe/test/Utils"],
8
+ function (FEBuilder, FieldBuilder, OpaBuilder, Utils) {
9
+ "use strict";
13
10
 
14
- function _getValueMatcher(oControl, vExpectedValue) {
15
- if (oControl.isA("sap.ui.mdc.Field")) {
16
- return FieldBuilder.Matchers.value(vExpectedValue);
17
- }
18
- if (oControl.isA("sap.ui.unified.Currency")) {
19
- return OpaBuilder.Matchers.properties({ stringValue: vExpectedValue.stringValue, currency: vExpectedValue.description });
20
- }
21
- var sExpectedValue = vExpectedValue;
22
- // we should avoid using the value description syntax when using non MDC controls but this is a workaround to have it working
23
- if (vExpectedValue.value) {
24
- sExpectedValue = vExpectedValue.description
25
- ? vExpectedValue.description + " (" + vExpectedValue.value + ")"
26
- : vExpectedValue.value;
27
- }
28
- if (oControl.isA("sap.m.InputBase")) {
29
- return OpaBuilder.Matchers.properties({ value: sExpectedValue });
30
- }
31
- if (oControl.isA("sap.m.ObjectIdentifier")) {
32
- return OpaBuilder.Matchers.properties({ title: sExpectedValue });
11
+ function _getValueMatcher(oControl, vExpectedValue) {
12
+ if (oControl.isA("sap.ui.mdc.Field")) {
13
+ return FieldBuilder.Matchers.value(vExpectedValue);
14
+ }
15
+ if (oControl.isA("sap.ui.unified.Currency")) {
16
+ return OpaBuilder.Matchers.properties({ stringValue: vExpectedValue.stringValue, currency: vExpectedValue.description });
17
+ }
18
+ var sExpectedValue = vExpectedValue;
19
+ // we should avoid using the value description syntax when using non MDC controls but this is a workaround to have it working
20
+ if (vExpectedValue.value) {
21
+ sExpectedValue = vExpectedValue.description
22
+ ? vExpectedValue.description + " (" + vExpectedValue.value + ")"
23
+ : vExpectedValue.value;
24
+ }
25
+ if (oControl.isA("sap.m.InputBase")) {
26
+ return OpaBuilder.Matchers.properties({ value: sExpectedValue });
27
+ }
28
+ if (oControl.isA("sap.m.ObjectIdentifier")) {
29
+ return OpaBuilder.Matchers.properties({ title: sExpectedValue });
30
+ }
31
+ return OpaBuilder.Matchers.properties({ text: sExpectedValue });
33
32
  }
34
- return OpaBuilder.Matchers.properties({ text: sExpectedValue });
35
- }
36
33
 
37
- function _getStateMatcher(oControl, sName, vValue) {
38
- if (oControl.isA("sap.ui.mdc.Field")) {
39
- return FieldBuilder.Matchers.state(sName, vValue);
34
+ function _getStateMatcher(oControl, sName, vValue) {
35
+ if (oControl.isA("sap.ui.mdc.Field")) {
36
+ return FieldBuilder.Matchers.state(sName, vValue);
37
+ } else if (sName === "lockedBy") {
38
+ return function (oControl) {
39
+ var oMatcher = OpaBuilder.Matchers.childrenMatcher(
40
+ FEBuilder.create(this).hasType("sap.m.Avatar").hasProperties({ initials: vValue })
41
+ );
42
+ return FEBuilder.Matchers.match(oMatcher)(oControl);
43
+ };
44
+ }
45
+ return FEBuilder.Matchers.state(sName, vValue);
40
46
  }
41
- return FEBuilder.Matchers.state(sName, vValue);
42
- }
43
47
 
44
- function _getMainControls(oContent) {
45
- if (oContent.isA("sap.fe.macros.FieldAPI")) {
46
- return _getMainControls(oContent.getContent());
47
- }
48
+ function _getMainControls(oContent) {
49
+ if (oContent.isA("sap.fe.macros.FieldAPI")) {
50
+ return _getMainControls(oContent.getContent());
51
+ }
48
52
 
49
- if (oContent.isA("sap.fe.core.controls.FormElementWrapper")) {
50
- // we need to do this to be able to retrieve the child of the FormElementWrapper when its child is not visible
51
- return _getMainControls(oContent.getContent());
52
- }
53
- if (oContent.isA("sap.fe.core.controls.FileWrapper")) {
54
- return _getMainControls(oContent.getAvatar());
55
- }
56
- if (oContent.isA("sap.fe.core.controls.FieldWrapper")) {
57
- if (oContent.getEditMode() === "Display") {
58
- return _getMainControls(oContent.getContentDisplay());
59
- } else {
60
- return _getMainControls(oContent.getContentEdit()[0]);
53
+ if (oContent.isA("sap.fe.core.controls.FormElementWrapper")) {
54
+ // we need to do this to be able to retrieve the child of the FormElementWrapper when its child is not visible
55
+ return _getMainControls(oContent.getContent());
61
56
  }
62
- }
63
- if (oContent.isA("sap.fe.core.controls.ConditionalWrapper")) {
64
- var oLink = oContent.getCondition() ? oContent.getContentTrue() : oContent.getContentFalse();
65
- return _getMainControls(oLink);
57
+ if (oContent.isA("sap.fe.core.controls.FileWrapper")) {
58
+ return _getMainControls(oContent.getAvatar());
59
+ }
60
+ if (oContent.isA("sap.fe.core.controls.FieldWrapper")) {
61
+ if (oContent.getEditMode() === "Display") {
62
+ return _getMainControls(oContent.getContentDisplay());
63
+ } else {
64
+ return _getMainControls(oContent.getContentEdit()[0]);
65
+ }
66
+ }
67
+ if (oContent.isA("sap.fe.core.controls.ConditionalWrapper")) {
68
+ var oLink = oContent.getCondition() ? oContent.getContentTrue() : oContent.getContentFalse();
69
+ return _getMainControls(oLink);
70
+ }
71
+
72
+ return oContent.isA("sap.ui.mdc.Field") ||
73
+ oContent.isA("sap.m.Text") ||
74
+ oContent.isA("sap.m.ExpandableText") ||
75
+ oContent.isA("sap.m.Label") ||
76
+ oContent.isA("sap.m.CheckBox") ||
77
+ oContent.isA("sap.m.Link") ||
78
+ oContent.isA("sap.m.ObjectStatus") ||
79
+ oContent.isA("sap.m.InputBase") ||
80
+ oContent.isA("sap.m.Avatar") ||
81
+ oContent.isA("sap.ui.unified.Currency") ||
82
+ oContent.isA("sap.m.ObjectIdentifier") ||
83
+ oContent.isA("sap.m.RatingIndicator") ||
84
+ oContent.isA("sap.m.ProgressIndicator")
85
+ ? [oContent]
86
+ : OpaBuilder.Matchers.children(
87
+ OpaBuilder.create().hasSome(
88
+ FEBuilder.Matchers.state("controlType", "sap.ui.mdc.Field"),
89
+ FEBuilder.Matchers.state("controlType", "sap.m.Text"),
90
+ FEBuilder.Matchers.state("controlType", "sap.m.ExpandableText"),
91
+ FEBuilder.Matchers.state("controlType", "sap.m.Label"),
92
+ FEBuilder.Matchers.state("controlType", "sap.m.Link"),
93
+ FEBuilder.Matchers.state("controlType", "sap.m.ObjectStatus"),
94
+ FEBuilder.Matchers.state("controlType", "sap.m.InputBase"),
95
+ FEBuilder.Matchers.state("controlType", "sap.m.Avatar"),
96
+ FEBuilder.Matchers.state("controlType", "sap.ui.unified.Currency"),
97
+ FEBuilder.Matchers.state("controlType", "sap.m.ObjectIdentifier"),
98
+ FEBuilder.Matchers.state("controlType", "sap.m.RatingIndicator"),
99
+ FEBuilder.Matchers.state("controlType", "sap.m.ProgressIndicator")
100
+ )
101
+ )(oContent);
66
102
  }
67
103
 
68
- return oContent.isA("sap.ui.mdc.Field") ||
69
- oContent.isA("sap.m.Text") ||
70
- oContent.isA("sap.m.ExpandableText") ||
71
- oContent.isA("sap.m.Label") ||
72
- oContent.isA("sap.m.CheckBox") ||
73
- oContent.isA("sap.m.Link") ||
74
- oContent.isA("sap.m.ObjectStatus") ||
75
- oContent.isA("sap.m.InputBase") ||
76
- oContent.isA("sap.m.Avatar") ||
77
- oContent.isA("sap.ui.unified.Currency") ||
78
- oContent.isA("sap.m.ObjectIdentifier") ||
79
- oContent.isA("sap.m.RatingIndicator") ||
80
- oContent.isA("sap.m.ProgressIndicator")
81
- ? [oContent]
82
- : OpaBuilder.Matchers.children(
83
- OpaBuilder.create().hasSome(
84
- FEBuilder.Matchers.state("controlType", "sap.ui.mdc.Field"),
85
- FEBuilder.Matchers.state("controlType", "sap.m.Text"),
86
- FEBuilder.Matchers.state("controlType", "sap.m.ExpandableText"),
87
- FEBuilder.Matchers.state("controlType", "sap.m.Label"),
88
- FEBuilder.Matchers.state("controlType", "sap.m.Link"),
89
- FEBuilder.Matchers.state("controlType", "sap.m.ObjectStatus"),
90
- FEBuilder.Matchers.state("controlType", "sap.m.InputBase"),
91
- FEBuilder.Matchers.state("controlType", "sap.m.Avatar"),
92
- FEBuilder.Matchers.state("controlType", "sap.ui.unified.Currency"),
93
- FEBuilder.Matchers.state("controlType", "sap.m.ObjectIdentifier"),
94
- FEBuilder.Matchers.state("controlType", "sap.m.RatingIndicator"),
95
- FEBuilder.Matchers.state("controlType", "sap.m.ProgressIndicator")
96
- )
97
- )(oContent);
98
- }
104
+ var MacroFieldBuilder = function () {
105
+ return FEBuilder.apply(this, arguments);
106
+ };
99
107
 
100
- var MacroFieldBuilder = function() {
101
- return FEBuilder.apply(this, arguments);
102
- };
108
+ MacroFieldBuilder.create = function (oOpaInstance) {
109
+ return new MacroFieldBuilder(oOpaInstance);
110
+ };
103
111
 
104
- MacroFieldBuilder.create = function(oOpaInstance) {
105
- return new MacroFieldBuilder(oOpaInstance);
106
- };
112
+ MacroFieldBuilder.prototype = Object.create(FEBuilder.prototype);
113
+ MacroFieldBuilder.prototype.constructor = MacroFieldBuilder;
107
114
 
108
- MacroFieldBuilder.prototype = Object.create(FEBuilder.prototype);
109
- MacroFieldBuilder.prototype.constructor = MacroFieldBuilder;
115
+ /**
116
+ * Returns the state matcher for the MdcField control.
117
+ * @param mState
118
+ * @returns {*}
119
+ * @protected
120
+ */
121
+ MacroFieldBuilder.prototype.getStatesMatcher = function (mState) {
122
+ return MacroFieldBuilder.Matchers.states(mState);
123
+ };
110
124
 
111
- /**
112
- * Returns the state matcher for the MdcField control.
113
- * @param mState
114
- * @returns {*}
115
- * @protected
116
- */
117
- MacroFieldBuilder.prototype.getStatesMatcher = function(mState) {
118
- return MacroFieldBuilder.Matchers.states(mState);
119
- };
125
+ MacroFieldBuilder.prototype.hasValue = function (vValue) {
126
+ // silently ignore undefined argument for convenience
127
+ if (vValue === undefined) {
128
+ return this;
129
+ }
130
+ return this.has(MacroFieldBuilder.Matchers.value(vValue));
131
+ };
120
132
 
121
- MacroFieldBuilder.prototype.hasValue = function(vValue) {
122
- // silently ignore undefined argument for convenience
123
- if (vValue === undefined) {
124
- return this;
125
- }
126
- return this.has(MacroFieldBuilder.Matchers.value(vValue));
127
- };
133
+ MacroFieldBuilder.prototype.do = function (vAction) {
134
+ // whenever an action is performed on a MacroField we want it to be perform on its main control
135
+ this.has(function (vControls) {
136
+ if (!vControls) {
137
+ return null;
138
+ }
139
+ if (!Array.isArray(vControls)) {
140
+ vControls = [vControls];
141
+ }
142
+ return vControls.reduce(function (aMainControls, vControl) {
143
+ return aMainControls.concat(_getMainControls(vControl));
144
+ }, []);
145
+ });
146
+ return FEBuilder.prototype.do.call(this, OpaBuilder.Actions.executor(vAction));
147
+ };
128
148
 
129
- MacroFieldBuilder.prototype.do = function(vAction) {
130
- // whenever an action is performed on a MacroField we want it to be perform on its main control
131
- this.has(function(vControls) {
132
- if (!vControls) {
133
- return null;
134
- }
135
- if (!Array.isArray(vControls)) {
136
- vControls = [vControls];
137
- }
138
- return vControls.reduce(function(aMainControls, vControl) {
139
- return aMainControls.concat(_getMainControls(vControl));
140
- }, []);
141
- });
142
- return FEBuilder.prototype.do.call(this, OpaBuilder.Actions.executor(vAction));
143
- };
149
+ MacroFieldBuilder.prototype.doOpenValueHelp = function () {
150
+ return this.do(function (oControl) {
151
+ if (oControl.isA("sap.ui.mdc.Field")) {
152
+ FEBuilder.Actions.keyboardShortcut("F4", "input")(oControl);
153
+ }
154
+ });
155
+ };
144
156
 
145
- MacroFieldBuilder.prototype.doOpenValueHelp = function() {
146
- return this.do(function(oControl) {
147
- if (oControl.isA("sap.ui.mdc.Field")) {
148
- FEBuilder.Actions.keyboardShortcut("F4", "input")(oControl);
157
+ MacroFieldBuilder.Matchers = {
158
+ value: function (vExpectedValue) {
159
+ return function (oControl) {
160
+ var aMainControls = _getMainControls(oControl);
161
+ return aMainControls.some(function (oMainControl) {
162
+ return OpaBuilder.Matchers.match(_getValueMatcher(oMainControl, vExpectedValue))(oMainControl);
163
+ });
164
+ };
165
+ },
166
+ empty: function (oControl) {
167
+ return oControl.getVisible() === false;
168
+ },
169
+ state: function (sName, vValue) {
170
+ return function (oControl) {
171
+ var aMainControls = [oControl].concat(_getMainControls(oControl));
172
+ return aMainControls.some(function (oMainControl) {
173
+ return OpaBuilder.Matchers.match(_getStateMatcher(oMainControl, sName, vValue))(oMainControl);
174
+ });
175
+ };
176
+ },
177
+ states: function (mStateMap) {
178
+ return FEBuilder.Matchers.states(mStateMap, MacroFieldBuilder.Matchers.state);
149
179
  }
150
- });
151
- };
152
-
153
- MacroFieldBuilder.Matchers = {
154
- value: function(vExpectedValue) {
155
- return function(oControl) {
156
- var aMainControls = _getMainControls(oControl);
157
- return aMainControls.some(function(oMainControl) {
158
- return OpaBuilder.Matchers.match(_getValueMatcher(oMainControl, vExpectedValue))(oMainControl);
159
- });
160
- };
161
- },
162
- empty: function(oControl) {
163
- return oControl.getVisible() === false;
164
- },
165
- state: function(sName, vValue) {
166
- return function(oControl) {
167
- var aMainControls = [oControl].concat(_getMainControls(oControl));
168
- return aMainControls.some(function(oMainControl) {
169
- return OpaBuilder.Matchers.match(_getStateMatcher(oMainControl, sName, vValue))(oMainControl);
170
- });
171
- };
172
- },
173
- states: function(mStateMap) {
174
- return FEBuilder.Matchers.states(mStateMap, MacroFieldBuilder.Matchers.state);
175
- }
176
- };
180
+ };
177
181
 
178
- return MacroFieldBuilder;
179
- });
182
+ return MacroFieldBuilder;
183
+ }
184
+ );
@@ -12,6 +12,7 @@ sap.ui.define(
12
12
  "./OverflowToolbarBuilder",
13
13
  "./DialogBuilder",
14
14
  "sap/fe/test/Utils",
15
+ "sap/fe/test/api/APIHelper",
15
16
  "sap/ui/test/matchers/Interactable",
16
17
  "sap/ui/core/SortOrder",
17
18
  "sap/ui/test/actions/EnterText"
@@ -24,6 +25,7 @@ sap.ui.define(
24
25
  OverflowToolbarBuilder,
25
26
  DialogBuilder,
26
27
  Utils,
28
+ APIHelper,
27
29
  Interactable,
28
30
  SortOrder,
29
31
  EnterText
@@ -203,6 +205,65 @@ sap.ui.define(
203
205
  return oWrapper;
204
206
  }
205
207
 
208
+ function _showHideDetailsOnTableToolbar(bShowDetails) {
209
+ var sStateToPress;
210
+ if (bShowDetails !== undefined) {
211
+ sStateToPress = bShowDetails ? "showDetails" : "hideDetails";
212
+ }
213
+ OpaBuilder.create()
214
+ .hasType("sap.m.SegmentedButton")
215
+ .hasId(/-showHideDetails$/)
216
+ .check(function (oSegmentedButton) {
217
+ if (bShowDetails === undefined) {
218
+ sStateToPress = oSegmentedButton[0].getSelectedKey() === "showDetails" ? "hideDetails" : "showDetails";
219
+ }
220
+ return true;
221
+ })
222
+ .success(function (oSegmButtonControl) {
223
+ return FEBuilder.create()
224
+ .hasType("sap.m.SegmentedButton")
225
+ .hasId(/-showHideDetails$/)
226
+ .doOnAggregation("items", OpaBuilder.Matchers.properties({ key: sStateToPress }), OpaBuilder.Actions.press())
227
+ .execute();
228
+ })
229
+ .execute();
230
+ }
231
+ function _showHideDetailsOnOverflow(bShowDetails) {
232
+ var oRb = Opa5.getWindow().sap.ui.getCore().getLibraryResourceBundle("sap.ui.mdc"),
233
+ sExpectedText;
234
+ if (bShowDetails !== undefined) {
235
+ sExpectedText = bShowDetails ? oRb.getText("table.SHOWDETAILS_TEXT") : oRb.getText("table.HIDEDETAILS_TEXT");
236
+ }
237
+ return (
238
+ OpaBuilder.create()
239
+ .hasType("sap.m.Select")
240
+ .hasId(/-showHideDetails-select$/)
241
+ // .has(OpaBuilder.Matchers.ancestor(oMdcTable))
242
+ .check(function (oSelectItem) {
243
+ if (bShowDetails === undefined) {
244
+ sExpectedText =
245
+ oSelectItem[0].getSelectedItem().getText() === oRb.getText("table.SHOWDETAILS_TEXT")
246
+ ? oRb.getText("table.HIDEDETAILS_TEXT")
247
+ : oRb.getText("table.SHOWDETAILS_TEXT");
248
+ }
249
+ return true;
250
+ })
251
+ .doPress()
252
+ .success(function (oSegmButtonControl) {
253
+ return FEBuilder.create()
254
+ .hasType("sap.m.SelectList")
255
+ .isDialogElement(true)
256
+ .has(function (oSelectListItem) {
257
+ return true;
258
+ })
259
+ .has(APIHelper.createMenuAndListActionMatcher(sExpectedText, true))
260
+ .doPress()
261
+ .description(Utils.formatMessage("Executing action '{0}' from currently open selection list", sExpectedText))
262
+ .execute();
263
+ })
264
+ .execute()
265
+ );
266
+ }
206
267
  var TableBuilder = function () {
207
268
  return FEBuilder.apply(this, arguments).hasType("sap.ui.mdc.Table");
208
269
  };
@@ -529,6 +590,19 @@ sap.ui.define(
529
590
  });
530
591
  };
531
592
 
593
+ TableBuilder.prototype.hasHeaderFocused = function () {
594
+ return this.has(function (oTable) {
595
+ var oTestCore = Opa5.getWindow().sap.ui.getCore(),
596
+ sFocusedEltId = oTestCore.getCurrentFocusedControlId(),
597
+ oInnerTable = _getInnerTable(oTable);
598
+ if (_isGridTable(oTable)) {
599
+ return oInnerTable.getColumns()[0].getId() === sFocusedEltId;
600
+ } else {
601
+ return oInnerTable.getId() === sFocusedEltId;
602
+ }
603
+ });
604
+ };
605
+
532
606
  TableBuilder.prototype.hasQuickFilterItems = function (iNumberOfItems) {
533
607
  return this.has(function (oTable) {
534
608
  var oQuickFilter = oTable.getQuickFilter();
@@ -605,19 +679,22 @@ sap.ui.define(
605
679
  if (_isGridTable(oMdcTable)) {
606
680
  return;
607
681
  }
608
- var oRb = Opa5.getWindow().sap.ui.getCore().getLibraryResourceBundle("sap.ui.mdc"),
609
- sExpectedText;
610
- if (bShowDetails !== undefined) {
611
- sExpectedText = bShowDetails ? oRb.getText("table.SHOWDETAILS_TEXT") : oRb.getText("table.HIDEDETAILS_TEXT");
612
- }
613
- return OpaBuilder.create()
614
- .hasType("sap.m.Button")
682
+ OpaBuilder.create()
683
+ .hasType("sap.m.SegmentedButton")
615
684
  .hasId(/-showHideDetails$/)
616
- .has(OpaBuilder.Matchers.ancestor(oMdcTable))
617
- .doConditional(function (oButton) {
618
- // only press button if currently in expected state
619
- return !sExpectedText || oButton.getText() === sExpectedText;
620
- }, OpaBuilder.Actions.press())
685
+ .doConditional(
686
+ OpaBuilder.Matchers.childrenMatcher(OpaBuilder.create(this).hasType("sap.m.Select"), true),
687
+ function (oItem) {
688
+ // in the overflow
689
+ _showHideDetailsOnOverflow(bShowDetails);
690
+ return true;
691
+ },
692
+ function (oItem) {
693
+ // on the table toolbar
694
+ _showHideDetailsOnTableToolbar(bShowDetails);
695
+ return true;
696
+ }
697
+ )
621
698
  .execute();
622
699
  });
623
700
  };
@@ -20,7 +20,7 @@ sap.ui.define(["sap/ui/core/Core", "sap/ui/core/library"], function (Core, _libr
20
20
  interfaces: [],
21
21
  controls: [],
22
22
  elements: [],
23
- version: "1.101.1",
23
+ version: "1.102.2",
24
24
  noLibraryCSS: true
25
25
  });
26
26
  return thisLib;
@@ -1,62 +0,0 @@
1
- /*
2
- * ! SAP UI development toolkit for HTML5 (SAPUI5)
3
- (c) Copyright 2009-2021 SAP SE. All rights reserved
4
-
5
- */
6
- sap.ui.define(
7
- [],
8
- function() {
9
- "use strict";
10
-
11
- var MassEditRuntime = {
12
- handleMassEditChange: function(oSource, value) {
13
- var aParams = oSource && oSource.getSelectedKey() && oSource.getSelectedKey().split("/");
14
- var oDialog =
15
- oSource &&
16
- oSource
17
- .getParent()
18
- .getParent()
19
- .getParent()
20
- .getParent();
21
- var oFieldsInfoData = oDialog && oDialog.getModel("fieldsInfo").getData();
22
- var oDataObject;
23
- if (aParams[0] === "Default") {
24
- oDataObject = { keyValue: aParams[1], value: aParams[0] };
25
- } else if (aParams[0] === "ClearFieldValue") {
26
- oDataObject = { keyValue: aParams[1], value: "" };
27
- } else if (!aParams) {
28
- var sPropertyName = oSource.getId().substring(oSource.getId().lastIndexOf(":") + 1);
29
- oDataObject = {
30
- keyValue: sPropertyName,
31
- value: value
32
- };
33
- } else {
34
- var aRelatedField =
35
- aParams[0] &&
36
- oFieldsInfoData.values &&
37
- oFieldsInfoData.values[aParams[0]].filter(function(oFieldData) {
38
- return oFieldData.text === oSource.getValue();
39
- });
40
- oDataObject =
41
- aRelatedField && aRelatedField[0] && aRelatedField[0].textInfo
42
- ? { keyValue: aParams[0], value: aRelatedField[0].textInfo.value }
43
- : { keyValue: aParams[0], value: oSource.getValue() };
44
- }
45
- var bExistingElementindex = false;
46
- for (var i = 0; i < oFieldsInfoData.results.length; i++) {
47
- if (oFieldsInfoData.results[i].keyValue === oDataObject.keyValue) {
48
- bExistingElementindex = i;
49
- }
50
- }
51
- if (bExistingElementindex !== false) {
52
- oFieldsInfoData.results[bExistingElementindex] = oDataObject;
53
- } else {
54
- oFieldsInfoData.results.push(oDataObject);
55
- }
56
- }
57
- };
58
-
59
- return MassEditRuntime;
60
- },
61
- /* bExport= */ true
62
- );