@openui5/sap.ui.mdc 1.93.3 → 1.96.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/.reuse/dep5 +6 -11
- package/THIRDPARTY.txt +10 -16
- package/package.json +4 -4
- package/src/sap/ui/mdc/.library +1 -1
- package/src/sap/ui/mdc/ActionToolbar.js +236 -334
- package/src/sap/ui/mdc/AggregationBaseDelegate.js +2 -1
- package/src/sap/ui/mdc/Chart.js +150 -22
- package/src/sap/ui/mdc/ChartDelegateNew.js +15 -0
- package/src/sap/ui/mdc/ChartNew.js +107 -66
- package/src/sap/ui/mdc/Control.js +4 -3
- package/src/sap/ui/mdc/Element.js +5 -4
- package/src/sap/ui/mdc/Field.js +2 -2
- package/src/sap/ui/mdc/FilterBar.js +1 -10
- 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 +1 -1
- package/src/sap/ui/mdc/Table.js +160 -79
- package/src/sap/ui/mdc/TableDelegate.js +20 -3
- package/src/sap/ui/mdc/ValueHelp.js +1474 -0
- package/src/sap/ui/mdc/ValueHelpDelegate.js +147 -0
- package/src/sap/ui/mdc/actiontoolbar/ActionToolbarAction.js +49 -104
- package/src/sap/ui/mdc/chart/DimensionItem.js +3 -3
- package/src/sap/ui/mdc/chart/Item.js +2 -3
- package/src/sap/ui/mdc/chart/MeasureItem.js +2 -2
- package/src/sap/ui/mdc/chart/SelectionDetailsActions.js +21 -2
- package/src/sap/ui/mdc/chart/ToolbarHandler.js +237 -225
- package/src/sap/ui/mdc/chartNew/ChartSelectionDetailsNew.js +1 -1
- package/src/sap/ui/mdc/chartNew/ChartToolbarNew.js +14 -10
- package/src/sap/ui/mdc/chartNew/ChartTypeButtonNew.js +1 -1
- package/src/sap/ui/mdc/chartNew/DrillStackHandlerNew.js +12 -10
- package/src/sap/ui/mdc/chartNew/ItemNew.js +0 -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 +1 -1
- package/src/sap/ui/mdc/condition/FilterOperatorUtil.js +13 -7
- package/src/sap/ui/mdc/condition/Operator.js +4 -4
- package/src/sap/ui/mdc/condition/RangeOperator.js +1 -1
- package/src/sap/ui/mdc/designtime/actiontoolbar/ActionToolbar.designtime.js +43 -0
- package/src/sap/ui/mdc/designtime/chart/ChartNew.designtime.js +91 -0
- package/src/sap/ui/mdc/designtime/filterbar/FilterBar.designtime.js +20 -0
- package/src/sap/ui/mdc/designtime/filterbar/FilterBarBase.designtime.js +31 -0
- package/src/sap/ui/mdc/designtime/table/Table.designtime.js +5 -0
- package/src/sap/ui/mdc/enum/ContentMode.js +25 -4
- 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 +1 -1
- package/src/sap/ui/mdc/field/ConditionType.js +19 -4
- package/src/sap/ui/mdc/field/ConditionsType.js +5 -4
- 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 -14
- package/src/sap/ui/mdc/field/FieldBase.js +92 -41
- package/src/sap/ui/mdc/field/FieldBaseDelegate.js +9 -2
- package/src/sap/ui/mdc/field/FieldHelpBase.js +64 -4
- package/src/sap/ui/mdc/field/FieldInfoBase.js +9 -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 +7 -1
- 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 +1 -1
- package/src/sap/ui/mdc/field/FieldValueHelpTableWrapperBase.js +2 -2
- package/src/sap/ui/mdc/field/FieldValueHelpUITableWrapper.js +1 -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/MultiValueFieldItem.js +1 -1
- 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/BooleanContent.js +15 -3
- package/src/sap/ui/mdc/field/content/ContentFactory.js +16 -8
- package/src/sap/ui/mdc/field/content/DefaultContent.js +64 -23
- package/src/sap/ui/mdc/field/content/LinkContent.js +6 -0
- package/src/sap/ui/mdc/field/content/SearchContent.js +21 -3
- package/src/sap/ui/mdc/field/content/UnitContent.js +2 -2
- package/src/sap/ui/mdc/filterbar/FilterBarBase.js +105 -44
- package/src/sap/ui/mdc/filterbar/PropertyHelper.js +52 -0
- package/src/sap/ui/mdc/filterbar/p13n/AdaptationFilterBar.js +10 -51
- package/src/sap/ui/mdc/filterbar/vh/FilterBar.js +1 -1
- package/src/sap/ui/mdc/flexibility/ActionToolbar.flexibility.js +22 -0
- package/src/sap/ui/mdc/flexibility/ActionToolbarAction.flexibility.js +19 -0
- package/src/sap/ui/mdc/flexibility/Chart.flexibility.js +1 -1
- package/src/sap/ui/mdc/flexibility/ConditionFlex.js +57 -46
- 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/ItemBaseFlex.js +203 -197
- package/src/sap/ui/mdc/library.js +588 -8
- 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 +2 -2
- 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 +31 -5
- package/src/sap/ui/mdc/messagebundle_ar.properties +11 -4
- package/src/sap/ui/mdc/messagebundle_bg.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_ca.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_cs.properties +12 -5
- package/src/sap/ui/mdc/messagebundle_cy.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_da.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_de.properties +12 -5
- package/src/sap/ui/mdc/messagebundle_el.properties +11 -4
- package/src/sap/ui/mdc/messagebundle_en.properties +9 -2
- package/src/sap/ui/mdc/messagebundle_en_GB.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_en_US_sappsd.properties +11 -3
- package/src/sap/ui/mdc/messagebundle_en_US_saprigi.properties +19 -3
- package/src/sap/ui/mdc/messagebundle_en_US_saptrc.properties +11 -2
- package/src/sap/ui/mdc/messagebundle_es.properties +35 -28
- package/src/sap/ui/mdc/messagebundle_es_MX.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_et.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_fi.properties +11 -4
- package/src/sap/ui/mdc/messagebundle_fr.properties +22 -15
- package/src/sap/ui/mdc/messagebundle_fr_CA.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_hi.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_hr.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_hu.properties +11 -4
- package/src/sap/ui/mdc/messagebundle_id.properties +11 -4
- package/src/sap/ui/mdc/messagebundle_it.properties +33 -26
- package/src/sap/ui/mdc/messagebundle_iw.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_ja.properties +13 -6
- package/src/sap/ui/mdc/messagebundle_kk.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_ko.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_lt.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_lv.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_ms.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_nl.properties +11 -4
- package/src/sap/ui/mdc/messagebundle_no.properties +17 -10
- package/src/sap/ui/mdc/messagebundle_pl.properties +14 -7
- package/src/sap/ui/mdc/messagebundle_pt.properties +11 -4
- package/src/sap/ui/mdc/messagebundle_pt_PT.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_ro.properties +13 -6
- package/src/sap/ui/mdc/messagebundle_ru.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_sh.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_sk.properties +11 -4
- package/src/sap/ui/mdc/messagebundle_sl.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_sv.properties +11 -4
- package/src/sap/ui/mdc/messagebundle_th.properties +16 -9
- package/src/sap/ui/mdc/messagebundle_tr.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_uk.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_vi.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_zh_CN.properties +10 -3
- package/src/sap/ui/mdc/messagebundle_zh_TW.properties +10 -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 +3 -3
- package/src/sap/ui/mdc/mixin/PromiseMixin.js +94 -0
- package/src/sap/ui/mdc/odata/v4/ChartPropertyHelperNew.js +1 -1
- package/src/sap/ui/mdc/odata/v4/FilterBarDelegate.js +6 -6
- package/src/sap/ui/mdc/odata/v4/TableDelegate.js +37 -10
- package/src/sap/ui/mdc/odata/v4/ValueHelpDelegate.js +94 -0
- package/src/sap/ui/mdc/odata/v4/vizChart/ChartDelegateNew.js +492 -203
- package/src/sap/ui/mdc/p13n/DefaultProviderRegistry.js +1 -1
- package/src/sap/ui/mdc/p13n/Engine.js +3 -2
- package/src/sap/ui/mdc/p13n/P13nBuilder.js +6 -60
- 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 +22 -24
- package/src/sap/ui/mdc/p13n/panels/ActionToolbarPanel.js +59 -0
- package/src/sap/ui/mdc/p13n/panels/AdaptFiltersPanel.js +1 -2
- package/src/sap/ui/mdc/p13n/panels/BasePanel.js +17 -8
- package/src/sap/ui/mdc/p13n/panels/ChartItemPanel.js +1 -2
- package/src/sap/ui/mdc/p13n/panels/ChartItemPanelNew.js +1171 -0
- package/src/sap/ui/mdc/p13n/panels/GroupPanel.js +1 -1
- package/src/sap/ui/mdc/p13n/panels/GroupView.js +7 -11
- package/src/sap/ui/mdc/p13n/panels/ListView.js +5 -3
- package/src/sap/ui/mdc/p13n/panels/QueryPanel.js +16 -9
- package/src/sap/ui/mdc/p13n/panels/SelectionPanel.js +0 -1
- package/src/sap/ui/mdc/p13n/panels/SortPanel.js +0 -1
- package/src/sap/ui/mdc/p13n/panels/SortQueryPanel.js +1 -1
- package/src/sap/ui/mdc/p13n/panels/Wrapper.js +1 -1
- package/src/sap/ui/mdc/p13n/subcontroller/ActionToolbarController.js +89 -0
- package/src/sap/ui/mdc/p13n/subcontroller/BaseController.js +9 -6
- package/src/sap/ui/mdc/p13n/subcontroller/ChartItemController.js +33 -4
- package/src/sap/ui/mdc/p13n/subcontroller/ColumnController.js +9 -15
- package/src/sap/ui/mdc/p13n/subcontroller/FilterController.js +12 -0
- package/src/sap/ui/mdc/p13n/subcontroller/GroupController.js +5 -12
- package/src/sap/ui/mdc/p13n/subcontroller/SortController.js +19 -21
- package/src/sap/ui/mdc/table/Column.js +35 -9
- package/src/sap/ui/mdc/table/CreationRow.js +1 -1
- package/src/sap/ui/mdc/table/GridTableType.js +0 -1
- package/src/sap/ui/mdc/table/PropertyHelper.js +108 -5
- package/src/sap/ui/mdc/table/ResponsiveTableType.js +19 -3
- package/src/sap/ui/mdc/table/RowSettings.js +1 -1
- package/src/sap/ui/mdc/table/TableTypeBase.js +0 -1
- package/src/sap/ui/mdc/table/V4AnalyticsPropertyHelper.js +1 -1
- 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 +2 -2
- 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 +12 -1
- 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 +22 -1
- package/src/sap/ui/mdc/valuehelp/Dialog.js +498 -0
- package/src/sap/ui/mdc/valuehelp/Popover.js +362 -0
- package/src/sap/ui/mdc/valuehelp/base/Container.js +642 -0
- package/src/sap/ui/mdc/valuehelp/base/Content.js +628 -0
- package/src/sap/ui/mdc/valuehelp/base/DialogTab.js +139 -0
- package/src/sap/ui/mdc/valuehelp/base/FilterableListContent.js +557 -0
- package/src/sap/ui/mdc/valuehelp/base/ListContent.js +133 -0
- package/src/sap/ui/mdc/valuehelp/content/Bool.js +318 -0
- package/src/sap/ui/mdc/valuehelp/content/Conditions.js +276 -0
- package/src/sap/ui/mdc/valuehelp/content/FixedList.js +532 -0
- package/src/sap/ui/mdc/valuehelp/content/MDCTable.js +638 -0
- package/src/sap/ui/mdc/valuehelp/content/MTable.js +916 -0
- package/test/sap/ui/mdc/testutils/opa/TestLibrary.js +3 -2
- package/test/sap/ui/mdc/testutils/opa/actions/OpenContextMenu.js +48 -0
- package/test/sap/ui/mdc/testutils/opa/chartNew/ActionsBase.js +310 -0
- package/test/sap/ui/mdc/testutils/opa/chartNew/ActionsViz.js +39 -0
- package/test/sap/ui/mdc/testutils/opa/chartNew/AssertionsBase.js +118 -0
- package/test/sap/ui/mdc/testutils/opa/chartNew/AssertionsViz.js +137 -0
- package/test/sap/ui/mdc/testutils/opa/chartNew/ChartNew.js +24 -0
- package/test/sap/ui/mdc/testutils/opa/chartNew/TestObjects.js +289 -0
- 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 +401 -93
- package/test/sap/ui/mdc/testutils/opa/p13n/Util.js +4 -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
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* ${copyright}
|
|
3
|
+
*/
|
|
4
|
+
sap.ui.define([
|
|
5
|
+
"sap/ui/test/Opa5",
|
|
6
|
+
"./ActionsViz",
|
|
7
|
+
"./AssertionsViz",
|
|
8
|
+
"../p13n/Actions"
|
|
9
|
+
], function(
|
|
10
|
+
Opa5,
|
|
11
|
+
chartActions,
|
|
12
|
+
chartAssertions,
|
|
13
|
+
p13nActions
|
|
14
|
+
) {
|
|
15
|
+
"use strict";
|
|
16
|
+
|
|
17
|
+
Opa5.createPageObjects({
|
|
18
|
+
onTheMDCChart: {
|
|
19
|
+
actions: {
|
|
20
|
+
/**
|
|
21
|
+
* @typedef {Object} ChartPersonalizationConfiguration
|
|
22
|
+
* @property {string} key Key of the value that is the result of the personalization
|
|
23
|
+
* @property {string} role Role of the given value
|
|
24
|
+
*/
|
|
25
|
+
/**
|
|
26
|
+
* OPA5 test action
|
|
27
|
+
* This only works with the new chart personalization
|
|
28
|
+
* @param {sap.ui.core.Control | string} oChart Instance / ID of the <code>MDCChartNew</code> that is personalized
|
|
29
|
+
* @param {string} sChartType String containing the type of chart that is displayed
|
|
30
|
+
* @param {ChartPersonalizationConfiguration[]} aConfigurations Array containing the chart personalization configuration objects
|
|
31
|
+
* @returns {Promise} OPA waitFor
|
|
32
|
+
* 1. Opens the personalization dialog of a given chart.
|
|
33
|
+
* 2. Selects a chart type given by <code>sChartType</code>.
|
|
34
|
+
* 3. Executes the given ChartPersonalizationConfigurations.
|
|
35
|
+
* 4. Closes the personalization dialog.
|
|
36
|
+
*/
|
|
37
|
+
iPersonalizeChart: function(oChart, sChartType, aConfigurations){
|
|
38
|
+
return p13nActions.iPersonalizeChart.call(this, oChart, sChartType, aConfigurations);
|
|
39
|
+
},
|
|
40
|
+
/**
|
|
41
|
+
* @typedef {Object} SortPersonalizationConfiguration
|
|
42
|
+
* @property {string} key Key of the item that is the result of the personalization
|
|
43
|
+
* @property {boolean} descending Determines whether the sort direction is descending
|
|
44
|
+
*/
|
|
45
|
+
/**
|
|
46
|
+
* OPA5 test action
|
|
47
|
+
* @param {sap.ui.core.Control | string} oChart Instance / ID of the <code>MDCChartNew</code> that is sorted
|
|
48
|
+
* @param {SortPersonalizationConfiguration[]} aConfigurations Array containing the sort personalization configuration objects
|
|
49
|
+
* @returns {Promise} OPA waitFor
|
|
50
|
+
* 1. Opens the personalization dialog of a given chart.
|
|
51
|
+
* 2. Executes the given SortPersonalizationConfiguration.
|
|
52
|
+
* 3. Closes the personalization dialog.
|
|
53
|
+
*/
|
|
54
|
+
iPersonalizeSort: function(oChart, aConfigurations) {
|
|
55
|
+
return p13nActions.iPersonalizeSort.call(this, oChart, aConfigurations);
|
|
56
|
+
},
|
|
57
|
+
/**
|
|
58
|
+
* Opa5 test action
|
|
59
|
+
* @param {sap.ui.core.Control | string} oChart Instance / ID of the <code>MDCChartNew</code> that is reset
|
|
60
|
+
* @returns {Promise} OPA waitFor
|
|
61
|
+
* 1. Opens the personalization dialog of a given chart.
|
|
62
|
+
* 2. Clicks on the reset personalization button.
|
|
63
|
+
* 3. Confirms the reset dialog.
|
|
64
|
+
* 4. Closes the personalization dialog.
|
|
65
|
+
*/
|
|
66
|
+
iResetThePersonalization: function(oChart) {
|
|
67
|
+
return p13nActions.iResetThePersonalization.call(this, oChart);
|
|
68
|
+
},
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* OPA5 test action
|
|
72
|
+
* Clicks on the "Zoom In" button in the toolbar of a mdc chart.
|
|
73
|
+
* @param {string} sId The id of the mdc chart
|
|
74
|
+
* @returns {Promise} OPA waitFor
|
|
75
|
+
*/
|
|
76
|
+
iClickOnZoomIn : function(sId){
|
|
77
|
+
return chartActions.iClickOnZoomIn.call(this, sId);
|
|
78
|
+
},
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* OPA5 test action
|
|
82
|
+
* Clicks on the "Zoom Out" button in the toolbar of a mdc chart.
|
|
83
|
+
* @param {string} sId The id of the mdc chart
|
|
84
|
+
* @returns {Promise} OPA waitFor
|
|
85
|
+
*/
|
|
86
|
+
iClickOnZoomOut : function(sId){
|
|
87
|
+
return chartActions.iClickOnZoomOut.call(this, sId);
|
|
88
|
+
},
|
|
89
|
+
/**
|
|
90
|
+
* OPA5 test action
|
|
91
|
+
* Clicks on the "Legend" toggle button in the toolbar of a mdc chart.
|
|
92
|
+
* @param {string} sId The id of the mdc chart
|
|
93
|
+
* @returns {Promise} OPA waitFor
|
|
94
|
+
*/
|
|
95
|
+
iClickOnTheLegendToggleButton : function(sId){
|
|
96
|
+
return chartActions.iClickOnTheLegendToggleButton.call(this, sId);
|
|
97
|
+
},
|
|
98
|
+
/**
|
|
99
|
+
* OPA5 test action
|
|
100
|
+
* Clicks on the "Show Details" button in the toolbar of a mdc chart.
|
|
101
|
+
* @param {*} sId The id of the mdc chart
|
|
102
|
+
* @returns {Promise} OPA waitFor
|
|
103
|
+
*/
|
|
104
|
+
iClickOnTheSelectionDetailsButton: function(sId){
|
|
105
|
+
return chartActions.iClickOnTheSelectionDetailsButton.call(this, sId);
|
|
106
|
+
},
|
|
107
|
+
/**
|
|
108
|
+
* OPA5 test action
|
|
109
|
+
* Clicks on the "Drilldown" button in the toolbar of a mdc chart.
|
|
110
|
+
* @param {string} sId The id of the mdc chart.
|
|
111
|
+
* @returns {Promise} OPA waitFor
|
|
112
|
+
*/
|
|
113
|
+
iClickOnTheDrillDownButton: function(sId){
|
|
114
|
+
return chartActions.iClickOnTheDrillDownButton.call(this, sId);
|
|
115
|
+
},
|
|
116
|
+
/**
|
|
117
|
+
* OPA5 test action
|
|
118
|
+
* Clicks on the "Chart Type" button in the toolbar of a mdc chart.
|
|
119
|
+
* @param {string} sId The id of the mdc chart.
|
|
120
|
+
* @returns {Promise} OPA waitFor
|
|
121
|
+
*/
|
|
122
|
+
iClickOnTheChartTypeButton: function(sId){
|
|
123
|
+
return chartActions.iClickOnTheChartTypeButton.apply(this, arguments);
|
|
124
|
+
},
|
|
125
|
+
/**
|
|
126
|
+
* OPA5 test action
|
|
127
|
+
* Clicks on the "Personalisation" button in the toolbar of a mdc chart.
|
|
128
|
+
* @param {string} sId The id of the mdc chart.
|
|
129
|
+
* @returns {Promise} OPA waitFor
|
|
130
|
+
*/
|
|
131
|
+
iClickOnThePersonalisationButton: function(sId){
|
|
132
|
+
return chartActions.iClickOnThePersonalisationButton.call(this, sId);
|
|
133
|
+
},
|
|
134
|
+
/**
|
|
135
|
+
* OPA5 test action
|
|
136
|
+
* Selects a specific chart type for a mdc chart in an open chart type popover
|
|
137
|
+
* @param {string} sChartTypeName The name of the chart type
|
|
138
|
+
* @returns {Promise} OPA waitFor
|
|
139
|
+
*/
|
|
140
|
+
iSelectChartTypeInPopover: function(sChartTypeName){
|
|
141
|
+
return chartActions.iSelectChartTypeInPopover.call(this, sChartTypeName);
|
|
142
|
+
},
|
|
143
|
+
/**
|
|
144
|
+
* OPA5 test action
|
|
145
|
+
* Clicks on an drill-down breadcrumb with given name for given mdc chart
|
|
146
|
+
* @param {string} sName The name of the breadcrumbs
|
|
147
|
+
* @param {string} sId Id of the mdc chart.
|
|
148
|
+
* @returns {Promise} OPA waitFor
|
|
149
|
+
*/
|
|
150
|
+
iClickOnTheBreadcrumbWithName: function(sName, sId){
|
|
151
|
+
return chartActions.iClickOnTheBreadcrumbWithName.call(this, sName, sId);
|
|
152
|
+
},
|
|
153
|
+
/**
|
|
154
|
+
* OPA5 test action
|
|
155
|
+
* Selects a specific dimension to drill-down for a mdc chart in an open chart drill-down popover
|
|
156
|
+
* @param {string} sDrillName Name of the Dimension which should be drilled-down
|
|
157
|
+
* @returns {Promise} OPA waitFor
|
|
158
|
+
*/
|
|
159
|
+
iSelectANewDrillDimensionInPopover: function(sDrillName){
|
|
160
|
+
return chartActions.iSelectANewDrillDimensionInPopover.call(this, sDrillName);
|
|
161
|
+
},
|
|
162
|
+
/**
|
|
163
|
+
* OPA5 test action
|
|
164
|
+
* Selects given datapoints on given chart.
|
|
165
|
+
* @param {array} aDataPoints Datapoint objects to select
|
|
166
|
+
* @param {string} sId Id of the mdc chart
|
|
167
|
+
* @returns {Promise} OPA waitFor
|
|
168
|
+
*/
|
|
169
|
+
iSelectTheDatapoint: function (aDataPoints, sId){
|
|
170
|
+
return chartActions.iSelectTheDatapoint.call(this, aDataPoints, sId);
|
|
171
|
+
},
|
|
172
|
+
/**
|
|
173
|
+
* OPA5 test action
|
|
174
|
+
* Selectes given categories (dimensions) for the given mdc chart
|
|
175
|
+
* @param {object} oCategories Categories to select
|
|
176
|
+
* @param {string} sId Id of the mdc chart
|
|
177
|
+
* @returns {Promise} OPA waitFor
|
|
178
|
+
*/
|
|
179
|
+
iSelectTheCategories: function (oCategories, sId){
|
|
180
|
+
return chartActions.iSelectTheDatapoint.call(this, oCategories, sId);
|
|
181
|
+
},
|
|
182
|
+
/**
|
|
183
|
+
* OPA5 test action
|
|
184
|
+
* Performs a drill-down on the MDC Chart
|
|
185
|
+
* @param {string} sId The id of the MDC Chart.
|
|
186
|
+
* @param {string} sDrillName Name of the Dimension which should be drilled-down.
|
|
187
|
+
* @returns {Promise} OPA waitFor
|
|
188
|
+
*/
|
|
189
|
+
iDrillDownInDimension: function(sId, sDrillName) {
|
|
190
|
+
return chartActions.iDrillDownInDimension.call(this, sId, sDrillName);
|
|
191
|
+
},
|
|
192
|
+
/**
|
|
193
|
+
* OPA5 test action
|
|
194
|
+
* Performs a drill-down on the MDC Chart
|
|
195
|
+
* @param {string} sId The id of the MDC Chart
|
|
196
|
+
* @param {string} sChartTypeName Name of the Dimension which should be drilled-down.
|
|
197
|
+
* @returns {Promise} OPA waitFor
|
|
198
|
+
*/
|
|
199
|
+
iSelectAChartType: function(sId, sChartTypeName) {
|
|
200
|
+
return chartActions.iSelectAChartType.call(this, sId, sChartTypeName);
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
},
|
|
204
|
+
assertions: {
|
|
205
|
+
/**
|
|
206
|
+
* OPA5 assertion
|
|
207
|
+
* Assertion to check that there is a mdc chart visible on the screen.
|
|
208
|
+
* @returns {Promise} OPA waitFor
|
|
209
|
+
*/
|
|
210
|
+
iShouldSeeAChart: function() {
|
|
211
|
+
return chartAssertions.iShouldSeeAChart.call(this);
|
|
212
|
+
},
|
|
213
|
+
/**
|
|
214
|
+
* Assertion to check that there is a legend visible on the screen for given mdc chart.
|
|
215
|
+
* @param {string} sId Id of the chart to be checked for a visible legend
|
|
216
|
+
* @returns {Promise} OPA waitFor
|
|
217
|
+
*/
|
|
218
|
+
iShouldSeeALegend: function(sId) {
|
|
219
|
+
return chartAssertions.iShouldSeeALegend.call(this, sId);
|
|
220
|
+
},
|
|
221
|
+
/**
|
|
222
|
+
* Assertion to check that there is no legend visible on the screen for given mdc chart.
|
|
223
|
+
* @param {string} sId Id of the chart to be checked for a visible legend
|
|
224
|
+
* @returns {Promise} OPA waitFor
|
|
225
|
+
*/
|
|
226
|
+
iShouldSeeNoLegend: function(sId) {
|
|
227
|
+
return chartAssertions.iShouldSeeNoLegend.call(this, sId);
|
|
228
|
+
},
|
|
229
|
+
|
|
230
|
+
/**
|
|
231
|
+
* Assertion to check that there is a chart type popover visible on the screen.
|
|
232
|
+
* @returns {Promise} OPA waitFor
|
|
233
|
+
*/
|
|
234
|
+
iShouldSeeAChartTypePopover: function() {
|
|
235
|
+
return chartAssertions.iShouldSeeAChartTypePopover.call(this);
|
|
236
|
+
},
|
|
237
|
+
/**
|
|
238
|
+
* Assertion to check that there is chart visible with given chart type.
|
|
239
|
+
* @param {string} sChartId Id of the chart to be checked for a chart type
|
|
240
|
+
* @param {string} sChartType Chart type which should be selected for the given chart
|
|
241
|
+
* @returns {Promise} OPA waitFor
|
|
242
|
+
*/
|
|
243
|
+
iShouldSeeTheChartWithChartType: function(sChartId, sChartType){
|
|
244
|
+
return chartAssertions.iShouldSeeTheChartWithChartType.call(this, sChartId, sChartType);
|
|
245
|
+
},
|
|
246
|
+
/**
|
|
247
|
+
* Assertion to check that there is a chart with given drillstack visible.
|
|
248
|
+
* @param {array} aCheckDrillStack Drillstack to check for
|
|
249
|
+
* @param {string} sChartId Id of the mdc chart
|
|
250
|
+
* @returns {Promise} OPA waitFor
|
|
251
|
+
*/
|
|
252
|
+
iShouldSeeTheDrillStack: function(aCheckDrillStack, sChartId) {
|
|
253
|
+
return chartAssertions.iShouldSeeTheDrillStack.call(this, aCheckDrillStack, sChartId);
|
|
254
|
+
},
|
|
255
|
+
/**
|
|
256
|
+
* Assertion to check that there is a drilldown popover visible.
|
|
257
|
+
* @returns {Promise} OPA waitFor
|
|
258
|
+
*/
|
|
259
|
+
iShouldSeeADrillDownPopover: function() {
|
|
260
|
+
return chartAssertions.iShouldSeeADrillDownPopover.call(this);
|
|
261
|
+
},
|
|
262
|
+
/**
|
|
263
|
+
* Assertion to check that there is a drilldown popover visible.
|
|
264
|
+
* @returns {Promise} OPA waitFor
|
|
265
|
+
*/
|
|
266
|
+
iShouldSeeADetailsPopover: function() {
|
|
267
|
+
return chartAssertions.iShouldSeeADetailsPopover.call(this);
|
|
268
|
+
},
|
|
269
|
+
/**
|
|
270
|
+
* Assertion to check visible dimensions on the MDC Chart
|
|
271
|
+
* @param {string} sId Id of the MDC Chart
|
|
272
|
+
* @returns {Promise} OPA waitFor
|
|
273
|
+
*/
|
|
274
|
+
iShouldSeeVisibleDimensionsInOrder: function(aDimensions, sId) {
|
|
275
|
+
return chartAssertions.iShouldSeeVisibleDimensionsInOrder.call(this, aDimensions, sId);
|
|
276
|
+
},
|
|
277
|
+
/**
|
|
278
|
+
* Assertion to check visible measures on the MDC Chart
|
|
279
|
+
* @param {string} sId Id of the MDC Chart
|
|
280
|
+
* @returns {Promise} OPA waitFor
|
|
281
|
+
*/
|
|
282
|
+
iShouldSeeVisibleMeasuresInOrder: function(aMeasures, sId) {
|
|
283
|
+
return chartAssertions.iShouldSeeVisibleMeasuresInOrder.call(this, aMeasures, sId);
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
});
|
|
288
|
+
|
|
289
|
+
});
|
|
@@ -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
|
+
});
|