@openui5/sap.ui.mdc 1.92.0 → 1.95.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/.reuse/dep5 +1 -6
- package/THIRDPARTY.txt +4 -10
- package/package.json +4 -4
- package/src/sap/ui/mdc/.library +1 -1
- package/src/sap/ui/mdc/ActionToolbar.js +1 -1
- package/src/sap/ui/mdc/AggregationBaseDelegate.js +2 -1
- package/src/sap/ui/mdc/Chart.js +14 -6
- package/src/sap/ui/mdc/ChartDelegate.js +1 -1
- package/src/sap/ui/mdc/ChartNew.js +104 -32
- package/src/sap/ui/mdc/Control.js +1 -1
- package/src/sap/ui/mdc/Element.js +2 -2
- package/src/sap/ui/mdc/Field.js +15 -2
- package/src/sap/ui/mdc/FilterBar.js +11 -1
- package/src/sap/ui/mdc/FilterField.js +28 -4
- package/src/sap/ui/mdc/Link.js +2 -2
- package/src/sap/ui/mdc/MultiValueField.js +406 -0
- package/src/sap/ui/mdc/Table.js +166 -102
- package/src/sap/ui/mdc/TableDelegate.js +30 -21
- package/src/sap/ui/mdc/ValueHelp.js +1459 -0
- package/src/sap/ui/mdc/ValueHelpDelegate.js +41 -0
- package/src/sap/ui/mdc/chart/ToolbarHandler.js +233 -223
- package/src/sap/ui/mdc/chartNew/ChartSelectionDetailsNew.js +1 -1
- package/src/sap/ui/mdc/chartNew/ChartToolbarNew.js +9 -18
- package/src/sap/ui/mdc/chartNew/ChartTypeButtonNew.js +1 -1
- package/src/sap/ui/mdc/chartNew/DrillStackHandlerNew.js +1 -1
- package/src/sap/ui/mdc/chartNew/ItemNew.js +1 -1
- package/src/sap/ui/mdc/chartNew/PropertyHelperNew.js +1 -1
- package/src/sap/ui/mdc/condition/Condition.js +2 -2
- package/src/sap/ui/mdc/condition/ConditionConverter.js +1 -1
- package/src/sap/ui/mdc/condition/ConditionModel.js +1 -1
- package/src/sap/ui/mdc/condition/FilterConverter.js +27 -15
- package/src/sap/ui/mdc/condition/FilterOperatorUtil.js +15 -9
- package/src/sap/ui/mdc/condition/Operator.js +13 -8
- package/src/sap/ui/mdc/condition/RangeOperator.js +3 -6
- package/src/sap/ui/mdc/designtime/filterbar/FilterBar.designtime.js +1 -0
- package/src/sap/ui/mdc/enum/SelectType.js +43 -0
- package/src/sap/ui/mdc/field/BoolFieldHelp.js +1 -1
- package/src/sap/ui/mdc/field/ConditionFieldHelp.js +5 -4
- package/src/sap/ui/mdc/field/ConditionType.js +69 -33
- package/src/sap/ui/mdc/field/ConditionsType.js +4 -3
- package/src/sap/ui/mdc/field/CustomFieldHelp.js +1 -1
- package/src/sap/ui/mdc/field/CustomFieldInfo.js +1 -1
- package/src/sap/ui/mdc/field/DefineConditionPanel.js +38 -24
- package/src/sap/ui/mdc/field/FieldBase.js +106 -42
- package/src/sap/ui/mdc/field/FieldBaseDelegate.js +25 -2
- package/src/sap/ui/mdc/field/FieldHelpBase.js +64 -4
- package/src/sap/ui/mdc/field/FieldInfoBase.js +1 -1
- package/src/sap/ui/mdc/field/FieldInput.js +1 -1
- package/src/sap/ui/mdc/field/FieldInputRenderUtil.js +1 -1
- package/src/sap/ui/mdc/field/FieldMultiInput.js +1 -1
- package/src/sap/ui/mdc/field/FieldValueHelp.js +55 -33
- package/src/sap/ui/mdc/field/FieldValueHelpContentWrapperBase.js +1 -1
- package/src/sap/ui/mdc/field/FieldValueHelpMTableWrapper.js +1 -1
- package/src/sap/ui/mdc/field/FieldValueHelpMdcTableWrapper.js +52 -32
- package/src/sap/ui/mdc/field/FieldValueHelpTableWrapperBase.js +8 -10
- package/src/sap/ui/mdc/field/FieldValueHelpUITableWrapper.js +2 -1
- package/src/sap/ui/mdc/field/InParameter.js +1 -1
- package/src/sap/ui/mdc/field/ListFieldHelp.js +3 -3
- package/src/sap/ui/mdc/field/ListFieldHelpItem.js +1 -1
- package/src/sap/ui/mdc/field/MultiValueFieldDelegate.js +49 -0
- package/src/sap/ui/mdc/field/MultiValueFieldItem.js +70 -0
- package/src/sap/ui/mdc/field/OutParameter.js +1 -1
- package/src/sap/ui/mdc/field/ValueHelpPanel.js +1 -1
- package/src/sap/ui/mdc/field/content/ContentFactory.js +2 -2
- package/src/sap/ui/mdc/filterbar/FilterBarBase.js +146 -76
- package/src/sap/ui/mdc/filterbar/PropertyHelper.js +52 -0
- package/src/sap/ui/mdc/filterbar/p13n/AdaptationFilterBar.js +4 -20
- package/src/sap/ui/mdc/filterbar/p13n/FilterGroupLayout.js +9 -3
- package/src/sap/ui/mdc/filterbar/vh/FilterBar.js +1 -1
- package/src/sap/ui/mdc/filterbar/vh/GenericFilterBarDelegate.js +55 -39
- package/src/sap/ui/mdc/flexibility/AggregateFlex.js +31 -22
- package/src/sap/ui/mdc/flexibility/AggregationConfigFlex.js +33 -29
- package/src/sap/ui/mdc/flexibility/Chart.flexibility.js +10 -5
- package/src/sap/ui/mdc/flexibility/ChartItemFlex.js +18 -6
- package/src/sap/ui/mdc/flexibility/ColumnFlex.js +15 -4
- package/src/sap/ui/mdc/flexibility/ConditionFlex.js +92 -79
- package/src/sap/ui/mdc/flexibility/FilterBar.flexibility.js +1 -1
- package/src/sap/ui/mdc/flexibility/FilterItemFlex.js +1 -1
- package/src/sap/ui/mdc/flexibility/GroupFlex.js +70 -52
- package/src/sap/ui/mdc/flexibility/ItemBaseFlex.js +184 -115
- package/src/sap/ui/mdc/flexibility/Panel.flexibility.js +59 -41
- package/src/sap/ui/mdc/flexibility/SortFlex.js +72 -54
- package/src/sap/ui/mdc/flp/FlpLinkDelegate.js +2 -1
- package/src/sap/ui/mdc/library.js +618 -7
- package/src/sap/ui/mdc/link/ContactDetails.js +1 -1
- package/src/sap/ui/mdc/link/ContactDetailsAddressItem.js +1 -1
- package/src/sap/ui/mdc/link/ContactDetailsEmailItem.js +1 -1
- package/src/sap/ui/mdc/link/ContactDetailsItem.js +1 -1
- package/src/sap/ui/mdc/link/ContactDetailsPhoneItem.js +1 -1
- package/src/sap/ui/mdc/link/Factory.js +1 -1
- package/src/sap/ui/mdc/link/FakeFlpConnector.js +1 -1
- package/src/sap/ui/mdc/link/LinkItem.js +1 -1
- package/src/sap/ui/mdc/link/Panel.js +1 -1
- package/src/sap/ui/mdc/link/PanelItem.js +1 -1
- package/src/sap/ui/mdc/link/PanelListItem.js +1 -1
- package/src/sap/ui/mdc/link/SelectionDialog.js +1 -1
- package/src/sap/ui/mdc/link/SelectionDialogItem.js +1 -1
- package/src/sap/ui/mdc/link/SemanticObjectMapping.js +1 -1
- package/src/sap/ui/mdc/link/SemanticObjectMappingItem.js +1 -1
- package/src/sap/ui/mdc/link/SemanticObjectUnavailableAction.js +1 -1
- package/src/sap/ui/mdc/messagebundle.properties +20 -8
- package/src/sap/ui/mdc/messagebundle_ar.properties +16 -6
- package/src/sap/ui/mdc/messagebundle_bg.properties +15 -5
- package/src/sap/ui/mdc/messagebundle_ca.properties +15 -5
- package/src/sap/ui/mdc/messagebundle_cs.properties +17 -7
- package/src/sap/ui/mdc/messagebundle_cy.properties +15 -5
- package/src/sap/ui/mdc/messagebundle_da.properties +15 -5
- package/src/sap/ui/mdc/messagebundle_de.properties +23 -13
- package/src/sap/ui/mdc/messagebundle_el.properties +16 -6
- package/src/sap/ui/mdc/messagebundle_en.properties +14 -4
- package/src/sap/ui/mdc/messagebundle_en_GB.properties +15 -5
- package/src/sap/ui/mdc/messagebundle_en_US_sappsd.properties +12 -4
- package/src/sap/ui/mdc/messagebundle_en_US_saprigi.properties +3 -1
- package/src/sap/ui/mdc/messagebundle_en_US_saptrc.properties +12 -4
- package/src/sap/ui/mdc/messagebundle_es.properties +40 -30
- package/src/sap/ui/mdc/messagebundle_es_MX.properties +15 -5
- package/src/sap/ui/mdc/messagebundle_et.properties +15 -5
- package/src/sap/ui/mdc/messagebundle_fi.properties +16 -6
- package/src/sap/ui/mdc/messagebundle_fr.properties +27 -17
- package/src/sap/ui/mdc/messagebundle_fr_CA.properties +15 -5
- package/src/sap/ui/mdc/messagebundle_hi.properties +13 -3
- package/src/sap/ui/mdc/messagebundle_hr.properties +15 -5
- package/src/sap/ui/mdc/messagebundle_hu.properties +16 -6
- package/src/sap/ui/mdc/messagebundle_id.properties +14 -4
- package/src/sap/ui/mdc/messagebundle_it.properties +38 -28
- package/src/sap/ui/mdc/messagebundle_iw.properties +15 -5
- package/src/sap/ui/mdc/messagebundle_ja.properties +16 -6
- package/src/sap/ui/mdc/messagebundle_kk.properties +15 -5
- package/src/sap/ui/mdc/messagebundle_ko.properties +13 -3
- package/src/sap/ui/mdc/messagebundle_lt.properties +15 -5
- package/src/sap/ui/mdc/messagebundle_lv.properties +15 -5
- package/src/sap/ui/mdc/messagebundle_ms.properties +13 -3
- package/src/sap/ui/mdc/messagebundle_nl.properties +16 -6
- package/src/sap/ui/mdc/messagebundle_no.properties +22 -12
- package/src/sap/ui/mdc/messagebundle_pl.properties +19 -9
- package/src/sap/ui/mdc/messagebundle_pt.properties +15 -5
- package/src/sap/ui/mdc/messagebundle_pt_PT.properties +14 -4
- package/src/sap/ui/mdc/messagebundle_ro.properties +18 -8
- package/src/sap/ui/mdc/messagebundle_ru.properties +15 -5
- package/src/sap/ui/mdc/messagebundle_sh.properties +15 -5
- package/src/sap/ui/mdc/messagebundle_sk.properties +16 -6
- package/src/sap/ui/mdc/messagebundle_sl.properties +15 -5
- package/src/sap/ui/mdc/messagebundle_sv.properties +16 -6
- package/src/sap/ui/mdc/messagebundle_th.properties +19 -9
- package/src/sap/ui/mdc/messagebundle_tr.properties +15 -5
- package/src/sap/ui/mdc/messagebundle_uk.properties +16 -6
- package/src/sap/ui/mdc/messagebundle_vi.properties +15 -5
- package/src/sap/ui/mdc/messagebundle_zh_CN.properties +13 -3
- package/src/sap/ui/mdc/messagebundle_zh_TW.properties +13 -3
- package/src/sap/ui/mdc/mixin/AdaptationMixin.js +1 -1
- package/src/sap/ui/mdc/mixin/DelegateMixin.js +2 -2
- package/src/sap/ui/mdc/mixin/FilterIntegrationMixin.js +28 -16
- package/src/sap/ui/mdc/mixin/PromiseMixin.js +94 -0
- package/src/sap/ui/mdc/odata/json/FilterBarDelegate.js +9 -8
- package/src/sap/ui/mdc/odata/v4/ChartDelegate.js +5 -5
- package/src/sap/ui/mdc/odata/v4/ChartPropertyHelperNew.js +1 -1
- package/src/sap/ui/mdc/odata/v4/FieldBaseDelegate.js +9 -0
- package/src/sap/ui/mdc/odata/v4/FilterBarDelegate.js +88 -80
- package/src/sap/ui/mdc/odata/v4/TableDelegate.js +37 -10
- package/src/sap/ui/mdc/odata/v4/TypeUtil.js +17 -0
- package/src/sap/ui/mdc/odata/v4/ValueHelpDelegate.js +94 -0
- package/src/sap/ui/mdc/odata/v4/util/DelegateUtil.js +45 -53
- package/src/sap/ui/mdc/odata/v4/vizChart/ChartDelegateNew.js +302 -179
- package/src/sap/ui/mdc/p13n/DefaultProviderRegistry.js +1 -1
- package/src/sap/ui/mdc/p13n/Engine.js +21 -16
- package/src/sap/ui/mdc/p13n/P13nBuilder.js +5 -59
- package/src/sap/ui/mdc/p13n/PropertyHelper.js +1 -1
- package/src/sap/ui/mdc/p13n/UIManager.js +1 -1
- package/src/sap/ui/mdc/p13n/modification/ModificationHandler.js +130 -53
- package/src/sap/ui/mdc/p13n/panels/BasePanel.js +16 -7
- package/src/sap/ui/mdc/p13n/panels/GroupPanel.js +1 -1
- package/src/sap/ui/mdc/p13n/panels/ListView.js +58 -2
- package/src/sap/ui/mdc/p13n/panels/QueryPanel.js +17 -10
- package/src/sap/ui/mdc/p13n/panels/SortQueryPanel.js +6 -1
- package/src/sap/ui/mdc/p13n/panels/Wrapper.js +1 -1
- package/src/sap/ui/mdc/p13n/subcontroller/BaseController.js +1 -1
- package/src/sap/ui/mdc/p13n/subcontroller/ColumnController.js +10 -11
- package/src/sap/ui/mdc/p13n/subcontroller/FilterController.js +13 -1
- package/src/sap/ui/mdc/p13n/subcontroller/GroupController.js +1 -1
- package/src/sap/ui/mdc/p13n/subcontroller/SortController.js +11 -2
- package/src/sap/ui/mdc/table/Column.js +21 -4
- package/src/sap/ui/mdc/table/CreationRow.js +1 -1
- package/src/sap/ui/mdc/table/PropertyHelper.js +176 -4
- package/src/sap/ui/mdc/table/ResponsiveTableType.js +11 -1
- package/src/sap/ui/mdc/table/RowSettings.js +1 -1
- package/src/sap/ui/mdc/table/TableSettings.js +4 -49
- package/src/sap/ui/mdc/table/V4AnalyticsPropertyHelper.js +1 -1
- package/src/sap/ui/mdc/themes/base/FieldBase.less +4 -0
- package/src/sap/ui/mdc/themes/base/FilterBar.less +2 -2
- package/src/sap/ui/mdc/themes/base/GroupView.less +2 -2
- package/src/sap/ui/mdc/themes/base/ListView.less +2 -2
- package/src/sap/ui/mdc/themes/base/ValueHelpDialog.less +56 -21
- package/src/sap/ui/mdc/ui/Container.js +3 -3
- package/src/sap/ui/mdc/ui/ContainerItem.js +2 -2
- package/src/sap/ui/mdc/util/Common.js +26 -0
- package/src/sap/ui/mdc/util/FilterUtil.js +68 -16
- package/src/sap/ui/mdc/util/IdentifierUtil.js +4 -0
- package/src/sap/ui/mdc/util/PromiseCache.js +266 -0
- package/src/sap/ui/mdc/util/PropertyHelper.js +27 -2
- package/src/sap/ui/mdc/valuehelp/Dialog.js +475 -0
- package/src/sap/ui/mdc/valuehelp/Popover.js +346 -0
- package/src/sap/ui/mdc/valuehelp/base/Container.js +440 -0
- package/src/sap/ui/mdc/valuehelp/base/Content.js +442 -0
- package/src/sap/ui/mdc/valuehelp/base/DialogTab.js +96 -0
- package/src/sap/ui/mdc/valuehelp/base/FilterableListContent.js +537 -0
- package/src/sap/ui/mdc/valuehelp/base/ListContent.js +105 -0
- package/src/sap/ui/mdc/valuehelp/content/Bool.js +232 -0
- package/src/sap/ui/mdc/valuehelp/content/Conditions.js +250 -0
- package/src/sap/ui/mdc/valuehelp/content/FixedList.js +504 -0
- package/src/sap/ui/mdc/valuehelp/content/MDCTable.js +619 -0
- package/src/sap/ui/mdc/valuehelp/content/MTable.js +881 -0
- package/test/sap/ui/mdc/testutils/opa/TestLibrary.js +2 -2
- package/test/sap/ui/mdc/testutils/opa/filterbar/Actions.js +250 -0
- package/test/sap/ui/mdc/testutils/opa/filterbar/Assertions.js +91 -0
- package/test/sap/ui/mdc/testutils/opa/filterbar/TestObjects.js +137 -0
- package/test/sap/ui/mdc/testutils/opa/filterbar/Util.js +25 -0
- package/test/sap/ui/mdc/testutils/opa/p13n/Actions.js +256 -94
- package/test/sap/ui/mdc/testutils/opa/p13n/Util.js +2 -1
- package/test/sap/ui/mdc/testutils/opa/p13n/{waitForP13nButtonWithParentAndIcon.js → waitForP13nButtonWithMatchers.js} +5 -18
- package/test/sap/ui/mdc/testutils/opa/table/TestObjects.js +0 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* ${copyright}
|
|
3
3
|
*/
|
|
4
|
-
|
|
5
4
|
sap.ui.define([
|
|
6
5
|
"sap/ui/test/Opa5",
|
|
7
|
-
"test-resources/sap/ui/mdc/testutils/opa/table/TestObjects"
|
|
6
|
+
"test-resources/sap/ui/mdc/testutils/opa/table/TestObjects",
|
|
7
|
+
"test-resources/sap/ui/mdc/testutils/opa/filterbar/TestObjects"
|
|
8
8
|
], function() {
|
|
9
9
|
"use strict";
|
|
10
10
|
});
|
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* ${copyright}
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
sap.ui.define([
|
|
6
|
+
"sap/ui/test/Opa5",
|
|
7
|
+
"sap/ui/test/matchers/Matcher",
|
|
8
|
+
"sap/ui/test/matchers/Properties",
|
|
9
|
+
"sap/ui/test/matchers/Ancestor",
|
|
10
|
+
"sap/ui/test/matchers/Descendant",
|
|
11
|
+
"sap/ui/test/matchers/PropertyStrictEquals",
|
|
12
|
+
"sap/ui/test/actions/Press",
|
|
13
|
+
"sap/ui/test/actions/EnterText",
|
|
14
|
+
"./Util",
|
|
15
|
+
"../p13n/Actions",
|
|
16
|
+
"../p13n/Util"
|
|
17
|
+
], function(
|
|
18
|
+
Opa5,
|
|
19
|
+
Matcher,
|
|
20
|
+
Properties,
|
|
21
|
+
Ancestor,
|
|
22
|
+
Descendant,
|
|
23
|
+
PropertyStrictEquals,
|
|
24
|
+
Press,
|
|
25
|
+
EnterText,
|
|
26
|
+
FilterBarUtil,
|
|
27
|
+
p13nActions,
|
|
28
|
+
p13nUtil
|
|
29
|
+
) {
|
|
30
|
+
"use strict";
|
|
31
|
+
|
|
32
|
+
var iEnterFilterValue = function(oGroupViewItem, mSettings) {
|
|
33
|
+
// Get sap.m.Panel of GroupViewItem
|
|
34
|
+
this.waitFor({
|
|
35
|
+
controlType: "sap.m.Panel",
|
|
36
|
+
matchers: new Ancestor(oGroupViewItem, true),
|
|
37
|
+
success: function(aPanels) {
|
|
38
|
+
var oGroupPanel = aPanels[0];
|
|
39
|
+
// Get the expand button for the panel
|
|
40
|
+
this.waitFor({
|
|
41
|
+
controlType: "sap.m.Button",
|
|
42
|
+
matchers: new Ancestor(oGroupPanel, true),
|
|
43
|
+
success: function(aButtons) {
|
|
44
|
+
var oButton = aButtons[0];
|
|
45
|
+
// click on expand button
|
|
46
|
+
if (!oGroupPanel.getExpanded()) {
|
|
47
|
+
new Press().executeOn(oButton);
|
|
48
|
+
}
|
|
49
|
+
this.waitFor({
|
|
50
|
+
controlType: "sap.m.Toolbar",
|
|
51
|
+
matchers: new Ancestor(oGroupPanel, true),
|
|
52
|
+
success: function(aToolbars) {
|
|
53
|
+
var oToolbar = aToolbars[0];
|
|
54
|
+
// Get label of the GroupViewItem
|
|
55
|
+
this.waitFor({
|
|
56
|
+
controlType: "sap.m.Label",
|
|
57
|
+
matchers: new Ancestor(oToolbar, true),
|
|
58
|
+
success: function(aToolbarLabels) {
|
|
59
|
+
var oToolbarLabel = aToolbarLabels[0];
|
|
60
|
+
this.waitFor({
|
|
61
|
+
controlType: "sap.m.List",
|
|
62
|
+
matchers: new Ancestor(oGroupPanel, true),
|
|
63
|
+
success: function(aLists) {
|
|
64
|
+
var oList = aLists[0];
|
|
65
|
+
// Get CustomListItems inside the GroupViewItem panel
|
|
66
|
+
this.waitFor({
|
|
67
|
+
controlType: "sap.m.CustomListItem",
|
|
68
|
+
matchers: new Ancestor(oList, true),
|
|
69
|
+
actions: function(oFilterItem) {
|
|
70
|
+
this.waitFor({
|
|
71
|
+
controlType: "sap.m.Label",
|
|
72
|
+
matchers: new Ancestor(oFilterItem, false),
|
|
73
|
+
success: function(aFilterFieldLabels) {
|
|
74
|
+
var oFilterFieldLabel = aFilterFieldLabels[0];
|
|
75
|
+
var sLabelFor = oFilterFieldLabel.getLabelFor();
|
|
76
|
+
this.waitFor({
|
|
77
|
+
controlType: "sap.ui.mdc.filterbar.p13n.FilterGroupLayout",
|
|
78
|
+
id: sLabelFor,
|
|
79
|
+
success: function(oFilterGroupLayout) {
|
|
80
|
+
this.waitFor({
|
|
81
|
+
controlType: "sap.ui.mdc.FilterField",
|
|
82
|
+
matchers: function(oFilterField) {
|
|
83
|
+
if (mSettings[oToolbarLabel.getText()]) {
|
|
84
|
+
return oFilterField === oFilterGroupLayout._oFilterField;
|
|
85
|
+
}
|
|
86
|
+
return false;
|
|
87
|
+
},
|
|
88
|
+
actions: function (oFilterField) {
|
|
89
|
+
var oSettings = mSettings[oToolbarLabel.getText()];
|
|
90
|
+
if (oSettings.label === oFilterFieldLabel.getText()) {
|
|
91
|
+
oSettings.values.forEach(function(oValue) {
|
|
92
|
+
this.waitFor({
|
|
93
|
+
controlType: "sap.ui.mdc.field.FieldMultiInput",
|
|
94
|
+
matchers: new Ancestor(oFilterField),
|
|
95
|
+
actions: new EnterText({
|
|
96
|
+
text: oValue,
|
|
97
|
+
clearTextFirst: false,
|
|
98
|
+
pressEnterKey: true
|
|
99
|
+
})
|
|
100
|
+
});
|
|
101
|
+
}.bind(this));
|
|
102
|
+
}
|
|
103
|
+
}.bind(this)
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
}.bind(this),
|
|
110
|
+
// close group panel
|
|
111
|
+
success: function() {
|
|
112
|
+
if (oGroupPanel.getExpanded()) {
|
|
113
|
+
new Press().executeOn(oButton);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
return {
|
|
130
|
+
iExpectSearch: function(oFilterBar) {
|
|
131
|
+
var sFilterBarId = typeof oFilterBar === "string" ? oFilterBar : oFilterBar.getId();
|
|
132
|
+
var sText = FilterBarUtil.texts.go;
|
|
133
|
+
return this.waitFor({
|
|
134
|
+
id: sFilterBarId,
|
|
135
|
+
success: function(oFilterBarInstance) {
|
|
136
|
+
Opa5.assert.ok(oFilterBarInstance, "Found FilterBar.");
|
|
137
|
+
if (!oFilterBarInstance.getLiveMode()) {
|
|
138
|
+
this.waitFor({
|
|
139
|
+
controlType: "sap.m.Button",
|
|
140
|
+
matchers: [
|
|
141
|
+
new Ancestor(oFilterBarInstance, false),
|
|
142
|
+
new PropertyStrictEquals({
|
|
143
|
+
name: "text",
|
|
144
|
+
value: sText
|
|
145
|
+
})
|
|
146
|
+
],
|
|
147
|
+
actions: new Press(),
|
|
148
|
+
errorMessage: "No '" + sText + "' button found on the FilterBar."
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
});
|
|
153
|
+
},
|
|
154
|
+
iEnterFilterValue: function(oFilterBar, mSettings) {
|
|
155
|
+
var sIcon = p13nUtil.icons.group;
|
|
156
|
+
return p13nActions.iOpenThePersonalizationDialog.call(this, oFilterBar, {
|
|
157
|
+
success: function(oP13nDialog) {
|
|
158
|
+
this.waitFor({
|
|
159
|
+
controlType: "sap.m.Button",
|
|
160
|
+
matchers: [
|
|
161
|
+
new Ancestor(oP13nDialog, false),
|
|
162
|
+
new PropertyStrictEquals({
|
|
163
|
+
name: "icon",
|
|
164
|
+
value: sIcon
|
|
165
|
+
})
|
|
166
|
+
],
|
|
167
|
+
actions: new Press(),
|
|
168
|
+
success: function() {
|
|
169
|
+
this.waitFor({
|
|
170
|
+
controlType: "sap.ui.mdc.p13n.panels.GroupView",
|
|
171
|
+
matchers: new Ancestor(oP13nDialog, false),
|
|
172
|
+
success: function(aGroupViews) {
|
|
173
|
+
var oGroupView = aGroupViews[0];
|
|
174
|
+
this.waitFor({
|
|
175
|
+
controlType: "sap.m.VBox",
|
|
176
|
+
matchers: new Ancestor(oGroupView, true),
|
|
177
|
+
success: function(aVBoxes) {
|
|
178
|
+
var oVBox = aVBoxes[0];
|
|
179
|
+
this.waitFor({
|
|
180
|
+
controlType: "sap.m.List",
|
|
181
|
+
matchers: new Ancestor(oVBox, true),
|
|
182
|
+
success: function(aLists) {
|
|
183
|
+
var oList = aLists[0];
|
|
184
|
+
this.waitFor({
|
|
185
|
+
controlType: "sap.m.CustomListItem",
|
|
186
|
+
matchers: function(oCustomListItem) {
|
|
187
|
+
var bAncestor = new Ancestor(oList, true)(oCustomListItem);
|
|
188
|
+
|
|
189
|
+
return bAncestor && Object.keys(mSettings).includes(oCustomListItem.getContent()[0].getHeaderToolbar().getContent()[0].getText());
|
|
190
|
+
},
|
|
191
|
+
actions: function(oGroupViewItem) {
|
|
192
|
+
iEnterFilterValue.call(this, oGroupViewItem, mSettings);
|
|
193
|
+
}.bind(this),
|
|
194
|
+
success: function() {
|
|
195
|
+
p13nActions.iPressTheOKButtonOnTheDialog.call(this, oP13nDialog);
|
|
196
|
+
}
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
});
|
|
204
|
+
},
|
|
205
|
+
errorMessage: "No button with icon '" + sIcon + "' found on P13nDialog"
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
});
|
|
209
|
+
},
|
|
210
|
+
iClearFilterValue: function(oFilterBar, sFilterLabel) {
|
|
211
|
+
var sFilterBarId = typeof oFilterBar === "string" ? oFilterBar : oFilterBar.getId();
|
|
212
|
+
return this.waitFor({
|
|
213
|
+
id: sFilterBarId,
|
|
214
|
+
success: function(oFilterBarInstance) {
|
|
215
|
+
this.waitFor({
|
|
216
|
+
controlType: "sap.ui.mdc.FilterField",
|
|
217
|
+
matchers: [
|
|
218
|
+
new PropertyStrictEquals({
|
|
219
|
+
name: "label",
|
|
220
|
+
value: sFilterLabel
|
|
221
|
+
}),
|
|
222
|
+
new Ancestor(oFilterBarInstance, true)
|
|
223
|
+
],
|
|
224
|
+
success: function(aFilterFields) {
|
|
225
|
+
var oFilterField = aFilterFields[0];
|
|
226
|
+
this.waitFor({
|
|
227
|
+
controlType: "sap.m.Token",
|
|
228
|
+
matchers: new Ancestor(oFilterField, false),
|
|
229
|
+
actions: function(oToken) {
|
|
230
|
+
this.waitFor({
|
|
231
|
+
controlType: "sap.ui.core.Icon",
|
|
232
|
+
matchers: [
|
|
233
|
+
new Ancestor(oToken),
|
|
234
|
+
new PropertyStrictEquals({
|
|
235
|
+
name: "src",
|
|
236
|
+
value: FilterBarUtil.icons.decline
|
|
237
|
+
})
|
|
238
|
+
],
|
|
239
|
+
actions: new Press()
|
|
240
|
+
});
|
|
241
|
+
}.bind(this)
|
|
242
|
+
});
|
|
243
|
+
}
|
|
244
|
+
});
|
|
245
|
+
}
|
|
246
|
+
});
|
|
247
|
+
}
|
|
248
|
+
};
|
|
249
|
+
|
|
250
|
+
});
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* ${copyright}
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
sap.ui.define([
|
|
6
|
+
"sap/ui/test/Opa5",
|
|
7
|
+
"sap/ui/test/matchers/Matcher",
|
|
8
|
+
"sap/ui/test/matchers/Properties",
|
|
9
|
+
"sap/ui/test/matchers/Ancestor",
|
|
10
|
+
"sap/ui/test/matchers/Descendant",
|
|
11
|
+
"sap/ui/test/matchers/PropertyStrictEquals"
|
|
12
|
+
], function(
|
|
13
|
+
Opa5,
|
|
14
|
+
Matcher,
|
|
15
|
+
Properties,
|
|
16
|
+
Ancestor,
|
|
17
|
+
Descendant,
|
|
18
|
+
PropertyStrictEquals
|
|
19
|
+
) {
|
|
20
|
+
"use strict";
|
|
21
|
+
|
|
22
|
+
//var oMDCBundle = sap.ui.getCore().getLibraryResourceBundle("sap.ui.mdc");
|
|
23
|
+
|
|
24
|
+
var iShouldSeeFilterField = function(oFilterBarInstance, sLabel, aExpectedConditions) {
|
|
25
|
+
var vMatchers;
|
|
26
|
+
|
|
27
|
+
if (aExpectedConditions) {
|
|
28
|
+
vMatchers = function(oFilterField) {
|
|
29
|
+
var bLabelCorrect = oFilterField.getLabel() === sLabel;
|
|
30
|
+
var bAncestor = new Ancestor(oFilterBarInstance, true)(oFilterField);
|
|
31
|
+
var aFilterFieldConditions = oFilterField.getConditions();
|
|
32
|
+
var bConditionsCorrect = aFilterFieldConditions.length === aExpectedConditions.length;
|
|
33
|
+
|
|
34
|
+
if (bConditionsCorrect) {
|
|
35
|
+
bConditionsCorrect = aFilterFieldConditions.every(function(oFilterFieldCondition) {
|
|
36
|
+
return aExpectedConditions.some(function(oExpectedCondition) {
|
|
37
|
+
var bOperator = oFilterFieldCondition.operator === oExpectedCondition.operator;
|
|
38
|
+
var bValues;
|
|
39
|
+
|
|
40
|
+
bValues = oFilterFieldCondition.values.every(function(oFilterFieldConditionValue) {
|
|
41
|
+
return oExpectedCondition.values.includes(oFilterFieldConditionValue);
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
return bOperator && bValues;
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
return bLabelCorrect && bAncestor && bConditionsCorrect;
|
|
50
|
+
};
|
|
51
|
+
} else {
|
|
52
|
+
vMatchers = [
|
|
53
|
+
new Ancestor(oFilterBarInstance, true),
|
|
54
|
+
new PropertyStrictEquals({
|
|
55
|
+
name: "label",
|
|
56
|
+
value: sLabel
|
|
57
|
+
})
|
|
58
|
+
];
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
this.waitFor({
|
|
63
|
+
controlType: "sap.ui.mdc.FilterField",
|
|
64
|
+
matchers: vMatchers,
|
|
65
|
+
success: function(aFilterFields) {
|
|
66
|
+
Opa5.assert.ok(aFilterFields.length === 1, "The FilterField labeled as '" + sLabel + "' found");
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
return {
|
|
72
|
+
iShouldSeeFilters: function(oFilterBar, vSettings) {
|
|
73
|
+
var sFilterBarId = typeof oFilterBar === "string" ? oFilterBar : oFilterBar.getId();
|
|
74
|
+
return this.waitFor({
|
|
75
|
+
id: sFilterBarId,
|
|
76
|
+
success: function(oFilterBarInstance) {
|
|
77
|
+
if (Array.isArray(vSettings)) {
|
|
78
|
+
vSettings.forEach(function(sLabel) {
|
|
79
|
+
iShouldSeeFilterField.call(this, oFilterBarInstance, sLabel);
|
|
80
|
+
}.bind(this));
|
|
81
|
+
} else {
|
|
82
|
+
for (var sLabel in vSettings) {
|
|
83
|
+
iShouldSeeFilterField.call(this, oFilterBarInstance, sLabel, vSettings[sLabel]);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
});
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* ${copyright}
|
|
3
|
+
*/
|
|
4
|
+
sap.ui.define([
|
|
5
|
+
"sap/ui/test/Opa5",
|
|
6
|
+
"./Actions",
|
|
7
|
+
"./Assertions",
|
|
8
|
+
"../p13n/Actions"
|
|
9
|
+
], function(
|
|
10
|
+
Opa5,
|
|
11
|
+
filterBarActions,
|
|
12
|
+
filterBarAssertions,
|
|
13
|
+
p13nActions
|
|
14
|
+
) {
|
|
15
|
+
"use strict";
|
|
16
|
+
|
|
17
|
+
Opa5.createPageObjects({
|
|
18
|
+
onFilterBar: {
|
|
19
|
+
actions: {
|
|
20
|
+
/**
|
|
21
|
+
* OPA5 test action
|
|
22
|
+
* <ol>
|
|
23
|
+
* <li>
|
|
24
|
+
* Opens the personalization dialog of the given <code>FilterBar</code>.
|
|
25
|
+
* </li>
|
|
26
|
+
* <li>
|
|
27
|
+
* Navigates to the "Group" tab.
|
|
28
|
+
* </li>
|
|
29
|
+
* <li>
|
|
30
|
+
* Opens all groups and selects / deselects all <code>FilterFields</code> depending on <code>oSettings</code>. Only the labels defined in <code>oSettings</code> will be selected, others will be deselected.
|
|
31
|
+
* </li>
|
|
32
|
+
* <li>
|
|
33
|
+
* Closes the personalization dialog.
|
|
34
|
+
* </li>
|
|
35
|
+
* </ol>
|
|
36
|
+
* @param {sap.ui.core.Control | String} oFilterBar Instance / ID of the <code>FilterBar</code> that is filtered
|
|
37
|
+
* @param {Object} oSettings Map containing the settings for the filter personalization. Key is the label of the given group in the <code>FilterBar</code> personalization dialog, and value is an array containing the labels of the <code>FilterField</code>
|
|
38
|
+
* @returns
|
|
39
|
+
*/
|
|
40
|
+
iPersonalizeFilter: function(oFilterBar, oSettings) {
|
|
41
|
+
return p13nActions.iPersonalizeFilterBar.call(this, oFilterBar, oSettings);
|
|
42
|
+
},
|
|
43
|
+
/**
|
|
44
|
+
* OPA5 test action
|
|
45
|
+
* <ol>
|
|
46
|
+
* <li>
|
|
47
|
+
* Opens the personalization dialog of the given <code>FilterBar</code>.
|
|
48
|
+
* </li>
|
|
49
|
+
* <li>
|
|
50
|
+
* Presses the reset personalization button.
|
|
51
|
+
* </li>
|
|
52
|
+
* <li>
|
|
53
|
+
* Confirms the reset dialog.
|
|
54
|
+
* </li>
|
|
55
|
+
* <li>
|
|
56
|
+
* Closes the personalization dialog.
|
|
57
|
+
* </li>
|
|
58
|
+
* </ol>
|
|
59
|
+
* @param {sap.ui.core.Control | String} oFilterBar Instance / ID of the <code>FilterBar</code>
|
|
60
|
+
* @returns
|
|
61
|
+
*/
|
|
62
|
+
iResetThePersonalization: function(oFilterBar) {
|
|
63
|
+
return p13nActions.iResetThePersonalization.call(this, oFilterBar);
|
|
64
|
+
},
|
|
65
|
+
/**
|
|
66
|
+
* OPA5 test action
|
|
67
|
+
* Presses the apply filters button of the <code>FilterBar</code>.
|
|
68
|
+
* @param {sap.ui.core.Control | String} oFilterBar Instance / ID of the <code>FilterBar</code>
|
|
69
|
+
* @returns
|
|
70
|
+
*/
|
|
71
|
+
iExpectSearch: function(oFilterBar) {
|
|
72
|
+
return filterBarActions.iExpectSearch.call(this, oFilterBar);
|
|
73
|
+
},
|
|
74
|
+
/**
|
|
75
|
+
* OPA5 test action
|
|
76
|
+
* <ol>
|
|
77
|
+
* <li>
|
|
78
|
+
* Opens the personalization dialog of the given <code>FilterBar</code>.
|
|
79
|
+
* </li>
|
|
80
|
+
* <li>
|
|
81
|
+
* Navigates to the "Group" tab.
|
|
82
|
+
* </li>
|
|
83
|
+
* <li>
|
|
84
|
+
* Opens the given groups and enters all values in the <code>FilterFields</code> depending on <code>oSettings</code>.
|
|
85
|
+
* </li>
|
|
86
|
+
* <li>
|
|
87
|
+
* Closes the personalization dialog.
|
|
88
|
+
* </li>
|
|
89
|
+
* </ol>
|
|
90
|
+
* @param {sap.ui.core.Control | String} oFilterBar Instance / ID of the <code>FilterBar</code>
|
|
91
|
+
* @param {String} sFilterLabel Label of the <code>FilterField</code>
|
|
92
|
+
* @param {Object} mSettings Map containing the settings for the filter values. Key is the label of the given group in the <code>FilterBar</code> personalization dialog, and value is an object containing the label of the <code>FilterField</code> and the values that are entered
|
|
93
|
+
* @returns
|
|
94
|
+
*/
|
|
95
|
+
iEnterFilterValue: function(oFilterBar, mSettings) {
|
|
96
|
+
return filterBarActions.iEnterFilterValue.call(this, oFilterBar, mSettings);
|
|
97
|
+
},
|
|
98
|
+
/**
|
|
99
|
+
* OPA5 test action
|
|
100
|
+
* Clears all values of a <code>FilterField</code> with a given label on the <code>FilterBar</code>.
|
|
101
|
+
* @param {sap.ui.core.Control | String} oFilterBar Instance / ID of the <code>FilterBar</code>
|
|
102
|
+
* @param {String} sFilterLabel Label of the <code>FilterField</code>
|
|
103
|
+
* @returns
|
|
104
|
+
*/
|
|
105
|
+
iClearFilterValue: function(oFilterBar, sFilterLabel) {
|
|
106
|
+
return filterBarActions.iClearFilterValue.call(this, oFilterBar, sFilterLabel);
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
assertions: {
|
|
110
|
+
/**
|
|
111
|
+
* OPA5 test action
|
|
112
|
+
* Checks if given <code>FilterFields</code> are displayed on a given <code>FilterBar</code>.
|
|
113
|
+
* Depending on the <code>vSettings</code> type this function can be used in two different ways:
|
|
114
|
+
* <ul>
|
|
115
|
+
* <li>
|
|
116
|
+
* <code>vSettings</code> is an array of strings:
|
|
117
|
+
* Checks if all given strings are labels for <code>FilterFields</code> on a given <code>FilterBar</code>.
|
|
118
|
+
* </li>
|
|
119
|
+
* <li>
|
|
120
|
+
* <code>vSettings</code> is an object:
|
|
121
|
+
* Checks for each key in the object if there is a label for a <code>FilterFields</code> of a given <code>FilterBar</code>.
|
|
122
|
+
* The value of that key is an array containing objects with the operators and values that are expected for the given <code>FilterFields</code>.
|
|
123
|
+
* If the value is an empty array, the given <code>FilterFields</code> doesn't have a value.
|
|
124
|
+
* </li>
|
|
125
|
+
* </ul>
|
|
126
|
+
* @param {sap.ui.core.Control | String} oFilterBar Instance / ID of the <code>FilterBar</code>
|
|
127
|
+
* @param {String[] | Object} vSettings
|
|
128
|
+
* @returns
|
|
129
|
+
*/
|
|
130
|
+
iShouldSeeFilters: function(oFilterBar, vSettings) {
|
|
131
|
+
return filterBarAssertions.iShouldSeeFilters.call(this, oFilterBar, vSettings);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
});
|
|
136
|
+
|
|
137
|
+
});
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* ! ${copyright}
|
|
3
|
+
*/
|
|
4
|
+
sap.ui.define([
|
|
5
|
+
], function() {
|
|
6
|
+
"use strict";
|
|
7
|
+
|
|
8
|
+
var oMDCBundle = sap.ui.getCore().getLibraryResourceBundle("sap.ui.mdc");
|
|
9
|
+
//var oMBundle = sap.ui.getCore().getLibraryResourceBundle("sap.m");
|
|
10
|
+
|
|
11
|
+
var Util = {
|
|
12
|
+
|
|
13
|
+
texts: {
|
|
14
|
+
go: oMDCBundle.getText("filterbar.GO")
|
|
15
|
+
},
|
|
16
|
+
|
|
17
|
+
icons: {
|
|
18
|
+
decline: "sap-icon://decline",
|
|
19
|
+
valueHelp: "sap-icon://value-help"
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
return Util;
|
|
25
|
+
});
|