@openui5/sap.ui.mdc 1.103.1 → 1.104.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 +17 -0
- package/LICENSES/LicenseRef-tzdata-PublicDomain.txt +5 -0
- package/THIRDPARTY.txt +35 -2
- 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 +1 -1
- package/src/sap/ui/mdc/Chart.js +31 -3
- package/src/sap/ui/mdc/Control.js +1 -1
- package/src/sap/ui/mdc/Element.js +1 -1
- package/src/sap/ui/mdc/Field.js +2 -2
- package/src/sap/ui/mdc/FilterBar.js +1 -1
- package/src/sap/ui/mdc/FilterField.js +2 -2
- package/src/sap/ui/mdc/Link.js +74 -12
- package/src/sap/ui/mdc/LinkDelegate.js +81 -76
- package/src/sap/ui/mdc/MultiValueField.js +1 -1
- package/src/sap/ui/mdc/Table.js +7 -1
- package/src/sap/ui/mdc/TableDelegate.js +25 -9
- package/src/sap/ui/mdc/ValueHelp.js +1 -1
- package/src/sap/ui/mdc/actiontoolbar/ActionToolbarAction.js +1 -1
- package/src/sap/ui/mdc/actiontoolbar/ActionToolbarActionRenderer.js +1 -2
- package/src/sap/ui/mdc/chart/ChartSelectionDetails.js +1 -1
- package/src/sap/ui/mdc/chart/ChartToolbar.js +10 -4
- package/src/sap/ui/mdc/chart/PropertyHelper.js +1 -1
- package/src/sap/ui/mdc/condition/Condition.js +1 -1
- 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 +1 -1
- package/src/sap/ui/mdc/condition/Operator.js +1 -1
- package/src/sap/ui/mdc/condition/OperatorDynamicDateOption.js +1 -1
- package/src/sap/ui/mdc/condition/RangeOperator.js +1 -1
- package/src/sap/ui/mdc/designtime/actiontoolbar/ActionToolbar.designtime.js +13 -2
- package/src/sap/ui/mdc/designtime/chart/Chart.designtime.js +3 -0
- package/src/sap/ui/mdc/designtime/table/Table.designtime.js +3 -1
- 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 +1 -1
- package/src/sap/ui/mdc/field/ConditionsType.js +1 -1
- 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 +1 -1
- package/src/sap/ui/mdc/field/DynamicDateRangeConditionsType.js +1 -1
- package/src/sap/ui/mdc/field/FieldBase.js +4 -5
- package/src/sap/ui/mdc/field/FieldHelpBase.js +1 -1
- package/src/sap/ui/mdc/field/FieldInfoBase.js +23 -21
- 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 +1 -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 +1 -1
- 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 +1 -1
- 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/TokenDisplay.js +1 -1
- package/src/sap/ui/mdc/field/TokenizerDisplay.js +1 -1
- package/src/sap/ui/mdc/field/ValueHelpPanel.js +1 -1
- package/src/sap/ui/mdc/filterbar/FilterBarBase.js +1 -1
- package/src/sap/ui/mdc/filterbar/PropertyHelper.js +1 -1
- package/src/sap/ui/mdc/filterbar/p13n/AdaptationFilterBar.js +1 -1
- package/src/sap/ui/mdc/filterbar/vh/FilterBar.js +1 -1
- package/src/sap/ui/mdc/flexibility/Chart.flexibility.js +1 -1
- 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 +19 -17
- package/src/sap/ui/mdc/library.js +2 -2
- 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 +3 -2
- package/src/sap/ui/mdc/link/PanelItem.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 +7 -3
- package/src/sap/ui/mdc/messagebundle_ar.properties +4 -2
- package/src/sap/ui/mdc/messagebundle_bg.properties +4 -2
- package/src/sap/ui/mdc/messagebundle_ca.properties +4 -2
- package/src/sap/ui/mdc/messagebundle_cs.properties +7 -5
- package/src/sap/ui/mdc/messagebundle_cy.properties +4 -2
- package/src/sap/ui/mdc/messagebundle_da.properties +4 -2
- package/src/sap/ui/mdc/messagebundle_de.properties +4 -2
- package/src/sap/ui/mdc/messagebundle_el.properties +5 -3
- package/src/sap/ui/mdc/messagebundle_en.properties +4 -2
- package/src/sap/ui/mdc/messagebundle_en_GB.properties +4 -2
- package/src/sap/ui/mdc/messagebundle_en_US_sappsd.properties +4 -2
- package/src/sap/ui/mdc/messagebundle_en_US_saprigi.properties +4 -2
- package/src/sap/ui/mdc/messagebundle_en_US_saptrc.properties +4 -2
- package/src/sap/ui/mdc/messagebundle_es.properties +4 -2
- package/src/sap/ui/mdc/messagebundle_es_MX.properties +4 -2
- package/src/sap/ui/mdc/messagebundle_et.properties +4 -2
- package/src/sap/ui/mdc/messagebundle_fi.properties +4 -2
- package/src/sap/ui/mdc/messagebundle_fr.properties +7 -5
- package/src/sap/ui/mdc/messagebundle_fr_CA.properties +4 -2
- package/src/sap/ui/mdc/messagebundle_hi.properties +4 -2
- package/src/sap/ui/mdc/messagebundle_hr.properties +7 -5
- package/src/sap/ui/mdc/messagebundle_hu.properties +5 -3
- package/src/sap/ui/mdc/messagebundle_id.properties +4 -2
- package/src/sap/ui/mdc/messagebundle_it.properties +48 -46
- package/src/sap/ui/mdc/messagebundle_iw.properties +5 -3
- package/src/sap/ui/mdc/messagebundle_ja.properties +4 -2
- package/src/sap/ui/mdc/messagebundle_kk.properties +4 -2
- package/src/sap/ui/mdc/messagebundle_ko.properties +4 -2
- package/src/sap/ui/mdc/messagebundle_lt.properties +4 -2
- package/src/sap/ui/mdc/messagebundle_lv.properties +4 -2
- package/src/sap/ui/mdc/messagebundle_ms.properties +4 -2
- package/src/sap/ui/mdc/messagebundle_nl.properties +4 -2
- package/src/sap/ui/mdc/messagebundle_no.properties +4 -2
- package/src/sap/ui/mdc/messagebundle_pl.properties +4 -2
- package/src/sap/ui/mdc/messagebundle_pt.properties +4 -2
- package/src/sap/ui/mdc/messagebundle_pt_PT.properties +4 -2
- package/src/sap/ui/mdc/messagebundle_ro.properties +4 -2
- package/src/sap/ui/mdc/messagebundle_ru.properties +4 -2
- package/src/sap/ui/mdc/messagebundle_sh.properties +4 -2
- package/src/sap/ui/mdc/messagebundle_sk.properties +4 -2
- package/src/sap/ui/mdc/messagebundle_sl.properties +4 -2
- package/src/sap/ui/mdc/messagebundle_sv.properties +4 -2
- package/src/sap/ui/mdc/messagebundle_th.properties +9 -7
- package/src/sap/ui/mdc/messagebundle_tr.properties +4 -2
- package/src/sap/ui/mdc/messagebundle_uk.properties +4 -2
- package/src/sap/ui/mdc/messagebundle_vi.properties +4 -2
- package/src/sap/ui/mdc/messagebundle_zh_CN.properties +4 -2
- package/src/sap/ui/mdc/messagebundle_zh_TW.properties +4 -2
- package/src/sap/ui/mdc/mixin/AdaptationMixin.js +1 -1
- package/src/sap/ui/mdc/mixin/DelegateMixin.js +1 -1
- package/src/sap/ui/mdc/mixin/FilterIntegrationMixin.js +1 -1
- package/src/sap/ui/mdc/mixin/PromiseMixin.js +1 -1
- package/src/sap/ui/mdc/mixin/PropertyHelperMixin.js +1 -1
- package/src/sap/ui/mdc/odata/v4/ChartPropertyHelper.js +1 -1
- package/src/sap/ui/mdc/odata/v4/TableDelegate.js +61 -37
- package/src/sap/ui/mdc/odata/v4/vizChart/ChartDelegate.js +1 -1
- package/src/sap/ui/mdc/p13n/Engine.js +1 -1
- package/src/sap/ui/mdc/p13n/PropertyHelper.js +1 -1
- package/src/sap/ui/mdc/p13n/StateUtil.js +1 -1
- package/src/sap/ui/mdc/p13n/UIManager.js +1 -1
- package/src/sap/ui/mdc/p13n/modules/DefaultProviderRegistry.js +1 -1
- package/src/sap/ui/mdc/p13n/panels/AdaptFiltersPanel.js +1 -7
- package/src/sap/ui/mdc/p13n/panels/ChartItemPanel.js +31 -6
- package/src/sap/ui/mdc/p13n/subcontroller/BaseController.js +1 -1
- package/src/sap/ui/mdc/p13n/subcontroller/LinkPanelController.js +2 -1
- package/src/sap/ui/mdc/table/CreationRow.js +1 -1
- package/src/sap/ui/mdc/table/PropertyHelper.js +30 -32
- package/src/sap/ui/mdc/table/ResponsiveTableType.js +2 -1
- package/src/sap/ui/mdc/table/RowActionItem.js +1 -1
- package/src/sap/ui/mdc/table/RowSettings.js +1 -1
- package/src/sap/ui/mdc/table/V4AnalyticsPropertyHelper.js +2 -7
- package/src/sap/ui/mdc/table/menu/Item.js +3 -3
- package/src/sap/ui/mdc/table/menu/QuickActionContainer.js +34 -0
- package/src/sap/ui/mdc/themes/base/InfoPanel.less +0 -1
- package/src/sap/ui/mdc/util/PromiseCache.js +1 -1
- package/src/sap/ui/mdc/util/PropertyHelper.js +49 -51
- package/src/sap/ui/mdc/valuehelp/Dialog.js +3 -1
- package/src/sap/ui/mdc/valuehelp/Popover.js +34 -6
- package/src/sap/ui/mdc/valuehelp/base/Container.js +1 -1
- package/src/sap/ui/mdc/valuehelp/base/Content.js +1 -1
- package/src/sap/ui/mdc/valuehelp/base/DialogTab.js +1 -1
- package/src/sap/ui/mdc/valuehelp/base/FilterableListContent.js +1 -1
- package/src/sap/ui/mdc/valuehelp/base/ListContent.js +1 -1
- package/src/sap/ui/mdc/valuehelp/content/Bool.js +1 -1
- package/src/sap/ui/mdc/valuehelp/content/Conditions.js +1 -1
- package/src/sap/ui/mdc/valuehelp/content/FixedList.js +1 -1
- package/src/sap/ui/mdc/valuehelp/content/MDCTable.js +25 -3
- package/src/sap/ui/mdc/valuehelp/content/MTable.js +2 -2
- package/test/sap/ui/mdc/testutils/opa/JSDocGeneration.md +18 -0
- package/test/sap/ui/mdc/testutils/opa/TestLibrary.js +4 -1
- package/test/sap/ui/mdc/testutils/opa/Util.js +42 -0
- package/test/sap/ui/mdc/testutils/opa/Utils.js +22 -0
- package/test/sap/ui/mdc/testutils/opa/chart/ActionsBase.js +1 -1
- package/test/sap/ui/mdc/testutils/opa/chart/JSDoc.md +413 -0
- package/test/sap/ui/mdc/testutils/opa/chart/TestObjects.js +320 -264
- package/test/sap/ui/mdc/testutils/opa/field/Actions.js +50 -0
- package/test/sap/ui/mdc/testutils/opa/field/Assertions.js +40 -0
- package/test/sap/ui/mdc/testutils/opa/field/JSDoc.md +37 -0
- package/test/sap/ui/mdc/testutils/opa/field/TestObjects.js +52 -0
- package/test/sap/ui/mdc/testutils/opa/field/waitForField.js +36 -0
- package/test/sap/ui/mdc/testutils/opa/field/waitForFieldValueHelpButton.js +42 -0
- package/test/sap/ui/mdc/testutils/opa/filterbar/Actions.js +31 -7
- package/test/sap/ui/mdc/testutils/opa/filterbar/Assertions.js +53 -7
- package/test/sap/ui/mdc/testutils/opa/filterbar/JSDoc.md +188 -0
- package/test/sap/ui/mdc/testutils/opa/filterbar/TestObjects.js +79 -13
- package/test/sap/ui/mdc/testutils/opa/filterbar/waitForAdaptFiltersButton.js +47 -0
- package/test/sap/ui/mdc/testutils/opa/filterbar/waitForFilterBar.js +28 -0
- package/test/sap/ui/mdc/testutils/opa/filterfield/Actions.js +70 -0
- package/test/sap/ui/mdc/testutils/opa/filterfield/Assertions.js +87 -0
- package/test/sap/ui/mdc/testutils/opa/filterfield/JSDoc.md +63 -0
- package/test/sap/ui/mdc/testutils/opa/filterfield/TestObjects.js +71 -0
- package/test/sap/ui/mdc/testutils/opa/filterfield/waitForFilterField.js +36 -0
- package/test/sap/ui/mdc/testutils/opa/filterfield/waitForFilterFieldValueHelpButton.js +42 -0
- package/test/sap/ui/mdc/testutils/opa/link/JSDoc.md +136 -0
- package/test/sap/ui/mdc/testutils/opa/link/TestObjects.js +108 -91
- package/test/sap/ui/mdc/testutils/opa/table/Actions.js +190 -6
- package/test/sap/ui/mdc/testutils/opa/table/Assertions.js +210 -0
- package/test/sap/ui/mdc/testutils/opa/table/JSDoc.md +205 -0
- package/test/sap/ui/mdc/testutils/opa/table/TestObjects.js +138 -9
- package/test/sap/ui/mdc/testutils/opa/table/Util.js +20 -0
- package/test/sap/ui/mdc/testutils/opa/table/waitForColumnHeader.js +44 -0
- package/test/sap/ui/mdc/testutils/opa/table/waitForListItemInDialogWithLabel.js +55 -0
- package/test/sap/ui/mdc/testutils/opa/table/waitForP13nButtonWithParentAndIcon.js +42 -0
- package/test/sap/ui/mdc/testutils/opa/table/waitForTable.js +26 -0
- package/test/sap/ui/mdc/testutils/opa/valueHelp/JSDoc.md +35 -0
- package/test/sap/ui/mdc/testutils/opa/valueHelp/TestObjects.js +7 -0
- package/test/sap/ui/mdc/testutils/opa/variant/Actions.js +124 -0
- package/test/sap/ui/mdc/testutils/opa/variant/Assertions.js +48 -0
- package/test/sap/ui/mdc/testutils/opa/variant/JSDoc.md +84 -0
- package/test/sap/ui/mdc/testutils/opa/variant/TestObjects.js +95 -0
- package/test/sap/ui/mdc/testutils/opa/variant/waitForVariantManager.js +43 -0
- package/test/sap/ui/mdc/testutils/opa/variant/waitForVariantManagerButton.js +45 -0
- package/test/sap/ui/mdc/testutils/opa/variant/waitForVariantManagerItem.js +54 -0
- package/test/sap/ui/mdc/testutils/opa/variant/waitForVariantManagerOverlay.js +44 -0
- package/ui5.yaml +4 -1
- package/src/sap/ui/mdc/odata/json/FilterBarDelegate.js +0 -155
- package/src/sap/ui/mdc/odata/v4/FilterBarDelegate.js +0 -750
- package/test/sap/ui/mdc/testutils/opa/chart/ChartNew.js +0 -24
- package/test/sap/ui/mdc/testutils/opa/chartNew/TestObjects.js +0 -288
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* ${copyright}
|
|
3
|
+
*/
|
|
4
|
+
sap.ui.define([
|
|
5
|
+
"sap/ui/test/Opa5",
|
|
6
|
+
"sap/ui/test/matchers/Ancestor",
|
|
7
|
+
"sap/ui/test/matchers/Descendant",
|
|
8
|
+
"sap/ui/test/matchers/Properties"
|
|
9
|
+
], function(
|
|
10
|
+
Opa5,
|
|
11
|
+
Ancestor,
|
|
12
|
+
Descendant,
|
|
13
|
+
Properties
|
|
14
|
+
) {
|
|
15
|
+
"use strict";
|
|
16
|
+
return function waitForListItemInDialogWithLabel(oSettings) {
|
|
17
|
+
var aMatchers = [];
|
|
18
|
+
var oDialog = oSettings.dialog;
|
|
19
|
+
var sLabel = oSettings.label;
|
|
20
|
+
|
|
21
|
+
if (oDialog) {
|
|
22
|
+
aMatchers.push(new Ancestor(oDialog, false));
|
|
23
|
+
}
|
|
24
|
+
if (sLabel) {
|
|
25
|
+
aMatchers.push(
|
|
26
|
+
new Properties({
|
|
27
|
+
text: sLabel
|
|
28
|
+
})
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
this.waitFor({
|
|
32
|
+
controlType: "sap.m.Label",
|
|
33
|
+
matchers: aMatchers,
|
|
34
|
+
success: function(aLabels) {
|
|
35
|
+
//Opa5.assert.strictEqual(aLabels.length, 1, 'The Label was found');
|
|
36
|
+
var oLabel = aLabels[0];
|
|
37
|
+
this.waitFor({
|
|
38
|
+
searchOpenDialogs: true,
|
|
39
|
+
controlType: oSettings.listItemType || "sap.m.ColumnListItem",
|
|
40
|
+
matchers: new Descendant(oLabel),
|
|
41
|
+
success: function(aColumnListItems) {
|
|
42
|
+
//Opa5.assert.strictEqual(aColumnListItems.length, 1, 'The ColumnListItem was found');
|
|
43
|
+
if (typeof oSettings.success === "function") {
|
|
44
|
+
var oColumnListItem = aColumnListItems[aColumnListItems.length - 1];
|
|
45
|
+
oSettings.success.call(this, oColumnListItem);
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
actions: oSettings.actions,
|
|
49
|
+
errorMessage: oSettings.errorMessage
|
|
50
|
+
});
|
|
51
|
+
},
|
|
52
|
+
errorMessage: "The Label '" + sLabel + "' was not found"
|
|
53
|
+
});
|
|
54
|
+
};
|
|
55
|
+
});
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* ${copyright}
|
|
3
|
+
*/
|
|
4
|
+
sap.ui.define([
|
|
5
|
+
"sap/ui/test/Opa5",
|
|
6
|
+
"sap/ui/test/matchers/Ancestor",
|
|
7
|
+
"sap/ui/test/matchers/Properties"
|
|
8
|
+
], function(
|
|
9
|
+
Opa5,
|
|
10
|
+
Ancestor,
|
|
11
|
+
Properties
|
|
12
|
+
) {
|
|
13
|
+
"use strict";
|
|
14
|
+
|
|
15
|
+
return function waitForP13nButtonWithParentAndIcon(oSettings) {
|
|
16
|
+
var aMatchers = [];
|
|
17
|
+
if (oSettings.parent) {
|
|
18
|
+
aMatchers.push(new Ancestor(oSettings.parent, false));
|
|
19
|
+
}
|
|
20
|
+
if (oSettings.icon) {
|
|
21
|
+
aMatchers.push(
|
|
22
|
+
new Properties({
|
|
23
|
+
icon: oSettings.icon
|
|
24
|
+
})
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
return this.waitFor({
|
|
28
|
+
controlType: "sap.m.Button",
|
|
29
|
+
matchers: aMatchers,
|
|
30
|
+
actions: oSettings.actions,
|
|
31
|
+
errorMessage: oSettings.errorMessage,
|
|
32
|
+
success: function(aButtons) {
|
|
33
|
+
//Opa5.assert.strictEqual(aButtons.length, 1, 'The button was found');
|
|
34
|
+
|
|
35
|
+
if (typeof oSettings.success === "function") {
|
|
36
|
+
var oButton = aButtons[0];
|
|
37
|
+
oSettings.success.call(this, oButton);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
};
|
|
42
|
+
});
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* ${copyright}
|
|
3
|
+
*/
|
|
4
|
+
sap.ui.define([
|
|
5
|
+
"sap/ui/test/Opa5"
|
|
6
|
+
], function(
|
|
7
|
+
Opa5
|
|
8
|
+
) {
|
|
9
|
+
"use strict";
|
|
10
|
+
|
|
11
|
+
return function waitForTable(oSettings) {
|
|
12
|
+
return this.waitFor({
|
|
13
|
+
controlType: "sap.ui.mdc.Table",
|
|
14
|
+
success: function(aTables) {
|
|
15
|
+
Opa5.assert.strictEqual(aTables.length, 1, 'The mdc.Table was found');
|
|
16
|
+
|
|
17
|
+
if (typeof oSettings.success === "function") {
|
|
18
|
+
var oTable = aTables[0];
|
|
19
|
+
oSettings.success.call(this, oTable);
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
errorMessage: "The mdc.Table was not found",
|
|
23
|
+
timeout: 40
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
});
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
<a name="onTheMDCValueHelp"></a>
|
|
2
|
+
|
|
3
|
+
## onTheMDCValueHelp : <code>object</code>
|
|
4
|
+
**Kind**: global namespace
|
|
5
|
+
|
|
6
|
+
* [onTheMDCValueHelp](#onTheMDCValueHelp) : <code>object</code>
|
|
7
|
+
* [.iOpenTheValueHelpForField(oField)](#onTheMDCValueHelp.iOpenTheValueHelpForField) ⇒ <code>Promise</code>
|
|
8
|
+
* [.iCloseTheValueHelpDialog(bCancel)](#onTheMDCValueHelp.iCloseTheValueHelpDialog) ⇒ <code>Promise</code>
|
|
9
|
+
|
|
10
|
+
<a name="onTheMDCValueHelp.iOpenTheValueHelpForField"></a>
|
|
11
|
+
|
|
12
|
+
### onTheMDCValueHelp.iOpenTheValueHelpForField(oField) ⇒ <code>Promise</code>
|
|
13
|
+
OPA5 test action
|
|
14
|
+
|
|
15
|
+
**Kind**: static method of [<code>onTheMDCValueHelp</code>](#onTheMDCValueHelp)
|
|
16
|
+
**Returns**: <code>Promise</code> - OPA waitFor
|
|
17
|
+
Opens the value help for a given <code>sap.ui.mdc.Field</code>.
|
|
18
|
+
|
|
19
|
+
| Param | Type | Description |
|
|
20
|
+
| --- | --- | --- |
|
|
21
|
+
| oField | <code>sap.ui.core.Control</code> \| <code>string</code> | Instance / ID of the <code>sap.ui.mdc.Field</code> |
|
|
22
|
+
|
|
23
|
+
<a name="onTheMDCValueHelp.iCloseTheValueHelpDialog"></a>
|
|
24
|
+
|
|
25
|
+
### onTheMDCValueHelp.iCloseTheValueHelpDialog(bCancel) ⇒ <code>Promise</code>
|
|
26
|
+
OPA5 test action
|
|
27
|
+
|
|
28
|
+
**Kind**: static method of [<code>onTheMDCValueHelp</code>](#onTheMDCValueHelp)
|
|
29
|
+
**Returns**: <code>Promise</code> - OPA waitFor
|
|
30
|
+
Closes an open value help dialog by pressing the OK / Cancel button.
|
|
31
|
+
|
|
32
|
+
| Param | Type | Description |
|
|
33
|
+
| --- | --- | --- |
|
|
34
|
+
| bCancel | <code>boolean</code> | Boolean that defines if the Cancel button is pressed |
|
|
35
|
+
|
|
@@ -12,11 +12,16 @@ sap.ui.define([
|
|
|
12
12
|
) {
|
|
13
13
|
"use strict";
|
|
14
14
|
|
|
15
|
+
/**
|
|
16
|
+
* @namespace onTheMDCValueHelp
|
|
17
|
+
*/
|
|
15
18
|
Opa5.createPageObjects({
|
|
16
19
|
onTheMDCValueHelp: {
|
|
17
20
|
actions: {
|
|
18
21
|
/**
|
|
19
22
|
* OPA5 test action
|
|
23
|
+
* @memberof onTheMDCValueHelp
|
|
24
|
+
* @method iOpenTheValueHelpForField
|
|
20
25
|
* @param {sap.ui.core.Control | string} oField Instance / ID of the <code>sap.ui.mdc.Field</code>
|
|
21
26
|
* @returns {Promise} OPA waitFor
|
|
22
27
|
* Opens the value help for a given <code>sap.ui.mdc.Field</code>.
|
|
@@ -26,6 +31,8 @@ sap.ui.define([
|
|
|
26
31
|
},
|
|
27
32
|
/**
|
|
28
33
|
* OPA5 test action
|
|
34
|
+
* @memberof onTheMDCValueHelp
|
|
35
|
+
* @method iCloseTheValueHelpDialog
|
|
29
36
|
* @param {boolean} bCancel Boolean that defines if the Cancel button is pressed
|
|
30
37
|
* @returns {Promise} OPA waitFor
|
|
31
38
|
* Closes an open value help dialog by pressing the OK / Cancel button.
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* ${copyright}
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
sap.ui.define([
|
|
6
|
+
"sap/ui/test/Opa5",
|
|
7
|
+
"sap/ui/test/matchers/Ancestor",
|
|
8
|
+
"sap/ui/test/actions/Press",
|
|
9
|
+
"sap/ui/test/actions/EnterText",
|
|
10
|
+
"./waitForVariantManager",
|
|
11
|
+
"./waitForVariantManagerOverlay",
|
|
12
|
+
"./waitForVariantManagerButton",
|
|
13
|
+
"./waitForVariantManagerItem",
|
|
14
|
+
"../Utils"
|
|
15
|
+
], function(
|
|
16
|
+
Opa5,
|
|
17
|
+
Ancestor,
|
|
18
|
+
Press,
|
|
19
|
+
EnterText,
|
|
20
|
+
waitForVariantManager,
|
|
21
|
+
waitForVariantManagerOverlay,
|
|
22
|
+
waitForVariantManagerButton,
|
|
23
|
+
waitForVariantManagerItem,
|
|
24
|
+
TestUtils
|
|
25
|
+
) {
|
|
26
|
+
"use strict";
|
|
27
|
+
|
|
28
|
+
return {
|
|
29
|
+
iPressOnTheVariantManagerButton: function(sVariantName) {
|
|
30
|
+
return waitForVariantManager.call(this, {
|
|
31
|
+
text: sVariantName,
|
|
32
|
+
actions: new Press(),
|
|
33
|
+
success: function onVariantManagerButtonPressed(oVariantManagerButton) {
|
|
34
|
+
Opa5.assert.ok(true, "The variant manager button was pressed");
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
},
|
|
38
|
+
|
|
39
|
+
iPressOnTheVariantManagerSaveAsButton: function() {
|
|
40
|
+
|
|
41
|
+
// "Save As"
|
|
42
|
+
var REORDER_BUTTON_TEXT = TestUtils.getTextFromResourceBundle("sap.ui.fl", "VARIANT_MANAGEMENT_SAVEAS");
|
|
43
|
+
|
|
44
|
+
return waitForVariantManagerButton.call(this, {
|
|
45
|
+
properties: {
|
|
46
|
+
text: REORDER_BUTTON_TEXT
|
|
47
|
+
},
|
|
48
|
+
ancestorProperties: {
|
|
49
|
+
|
|
50
|
+
// title: "My Views"
|
|
51
|
+
title: TestUtils.getTextFromResourceBundle("sap.ui.fl", "VARIANT_MANAGEMENT_VARIANTS")
|
|
52
|
+
},
|
|
53
|
+
actions: new Press(),
|
|
54
|
+
success: function onVariantManagerSaveAsButtonFound(oSaveAsButton) {
|
|
55
|
+
Opa5.assert.ok(true, 'The variant manager "' + REORDER_BUTTON_TEXT + '" button was pressed');
|
|
56
|
+
},
|
|
57
|
+
errorMessage: 'The variant manager "' + REORDER_BUTTON_TEXT + '" button was not found'
|
|
58
|
+
});
|
|
59
|
+
},
|
|
60
|
+
|
|
61
|
+
iSaveVariantAs: function(sVariantCurrentName, sVariantNewName) {
|
|
62
|
+
var SAVE_VARIANT_TITLE = TestUtils.getTextFromResourceBundle("sap.ui.fl", "VARIANT_MANAGEMENT_SAVEDIALOG");
|
|
63
|
+
|
|
64
|
+
return waitForVariantManagerOverlay.call(this, {
|
|
65
|
+
controlType: "sap.m.Dialog",
|
|
66
|
+
properties: {
|
|
67
|
+
|
|
68
|
+
// title: Save View
|
|
69
|
+
title: SAVE_VARIANT_TITLE
|
|
70
|
+
},
|
|
71
|
+
matchers: undefined, // FIXME: default ancestor matcher does not work, but it should
|
|
72
|
+
success: onSaveVariantViewFound
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
function onSaveVariantViewFound(oVariantManagerOverlay) {
|
|
76
|
+
this.waitFor({
|
|
77
|
+
controlType: "sap.m.Input",
|
|
78
|
+
properties: {
|
|
79
|
+
value: sVariantCurrentName,
|
|
80
|
+
editable: true,
|
|
81
|
+
enabled: true,
|
|
82
|
+
type: "Text"
|
|
83
|
+
},
|
|
84
|
+
matchers: new Ancestor(oVariantManagerOverlay),
|
|
85
|
+
actions: new EnterText({
|
|
86
|
+
text: sVariantNewName
|
|
87
|
+
}),
|
|
88
|
+
success: onVariantChanged,
|
|
89
|
+
errorMessage: 'The "Save View" input field was found or the text could not be entered'
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
function onVariantChanged(aInputFields) {
|
|
94
|
+
var sMessage = 'The "Save View/Variant" input field was found and it value was changed to ' + sVariantNewName;
|
|
95
|
+
Opa5.assert.strictEqual(aInputFields.length, 1, sMessage);
|
|
96
|
+
|
|
97
|
+
var SAVE_BUTTON = TestUtils.getTextFromResourceBundle("sap.ui.fl", "VARIANT_MANAGEMENT_SAVE");
|
|
98
|
+
|
|
99
|
+
this.waitFor({
|
|
100
|
+
controlType: "sap.m.Button",
|
|
101
|
+
properties: {
|
|
102
|
+
text: SAVE_BUTTON,
|
|
103
|
+
enabled: true
|
|
104
|
+
},
|
|
105
|
+
actions: new Press(),
|
|
106
|
+
success: onVariantSaved,
|
|
107
|
+
errorMessage: 'The "Save View/Variant" button was not found'
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
function onVariantSaved(aSaveButtons) {
|
|
112
|
+
var sMessage = 'The "Save View/Variant" button was found and activated (the new variant should be saved)';
|
|
113
|
+
Opa5.assert.strictEqual(aSaveButtons.length, 1, sMessage);
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
|
|
117
|
+
iSelectVariant: function(sVariantName) {
|
|
118
|
+
waitForVariantManagerItem.call(this, {
|
|
119
|
+
itemText: sVariantName,
|
|
120
|
+
actions: new Press()
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
};
|
|
124
|
+
});
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* ${copyright}
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
sap.ui.define([
|
|
6
|
+
"sap/ui/test/Opa5",
|
|
7
|
+
"./waitForVariantManager",
|
|
8
|
+
"./waitForVariantManagerOverlay",
|
|
9
|
+
"../Utils"
|
|
10
|
+
], function(
|
|
11
|
+
Opa5,
|
|
12
|
+
waitForVariantManager,
|
|
13
|
+
waitForVariantManagerOverlay,
|
|
14
|
+
TestUtils
|
|
15
|
+
) {
|
|
16
|
+
"use strict";
|
|
17
|
+
|
|
18
|
+
return {
|
|
19
|
+
|
|
20
|
+
iShouldSeeTheVariantManagerButton: function(sText) {
|
|
21
|
+
return waitForVariantManager.call(this, {
|
|
22
|
+
text: sText
|
|
23
|
+
});
|
|
24
|
+
},
|
|
25
|
+
|
|
26
|
+
iShouldSeeTheVariantManagerPopover: function() {
|
|
27
|
+
return waitForVariantManagerOverlay.call(this, {
|
|
28
|
+
properties: {
|
|
29
|
+
|
|
30
|
+
// title: "My Views"
|
|
31
|
+
title: TestUtils.getTextFromResourceBundle("sap.ui.fl", "VARIANT_MANAGEMENT_VARIANTS")
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
},
|
|
35
|
+
|
|
36
|
+
iShouldSeeTheSaveVariantDialog: function() {
|
|
37
|
+
return waitForVariantManagerOverlay.call(this, {
|
|
38
|
+
controlType: "sap.m.Dialog",
|
|
39
|
+
properties: {
|
|
40
|
+
|
|
41
|
+
// title: Save View
|
|
42
|
+
title: TestUtils.getTextFromResourceBundle("sap.ui.fl", "VARIANT_MANAGEMENT_SAVEDIALOG")
|
|
43
|
+
},
|
|
44
|
+
matchers: undefined // FIXME: default ancestor matcher does not work, but it should
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
});
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
<a name="onTheMDCVariant"></a>
|
|
2
|
+
|
|
3
|
+
## onTheMDCVariant : <code>object</code>
|
|
4
|
+
**Kind**: global namespace
|
|
5
|
+
|
|
6
|
+
* [onTheMDCVariant](#onTheMDCVariant) : <code>object</code>
|
|
7
|
+
* [.iPressOnTheVariantManagerButton(sVariantName)](#onTheMDCVariant.iPressOnTheVariantManagerButton) ⇒ <code>Promise</code>
|
|
8
|
+
* [.iPressOnTheVariantManagerSaveAsButton()](#onTheMDCVariant.iPressOnTheVariantManagerSaveAsButton) ⇒ <code>Promise</code>
|
|
9
|
+
* [.iSaveVariantAs(sVariantCurrentName, sVariantNewName)](#onTheMDCVariant.iSaveVariantAs) ⇒ <code>Promise</code>
|
|
10
|
+
* [.iSelectVariant(sVariantName)](#onTheMDCVariant.iSelectVariant) ⇒ <code>Promise</code>
|
|
11
|
+
* [.iShouldSeeTheVariantManagerButton(sText)](#onTheMDCVariant.iShouldSeeTheVariantManagerButton) ⇒ <code>Promise</code>
|
|
12
|
+
* [.iShouldSeeTheVariantManagerPopover()](#onTheMDCVariant.iShouldSeeTheVariantManagerPopover) ⇒ <code>Promise</code>
|
|
13
|
+
* [.iShouldSeeTheSaveVariantDialog()](#onTheMDCVariant.iShouldSeeTheSaveVariantDialog) ⇒ <code>Promise</code>
|
|
14
|
+
|
|
15
|
+
<a name="onTheMDCVariant.iPressOnTheVariantManagerButton"></a>
|
|
16
|
+
|
|
17
|
+
### onTheMDCVariant.iPressOnTheVariantManagerButton(sVariantName) ⇒ <code>Promise</code>
|
|
18
|
+
OPA5 test action
|
|
19
|
+
|
|
20
|
+
**Kind**: static method of [<code>onTheMDCVariant</code>](#onTheMDCVariant)
|
|
21
|
+
**Returns**: <code>Promise</code> - OPA waitFor
|
|
22
|
+
|
|
23
|
+
| Param | Type | Description |
|
|
24
|
+
| --- | --- | --- |
|
|
25
|
+
| sVariantName | <code>string</code> | Name of the current variant |
|
|
26
|
+
|
|
27
|
+
<a name="onTheMDCVariant.iPressOnTheVariantManagerSaveAsButton"></a>
|
|
28
|
+
|
|
29
|
+
### onTheMDCVariant.iPressOnTheVariantManagerSaveAsButton() ⇒ <code>Promise</code>
|
|
30
|
+
OPA5 test action
|
|
31
|
+
|
|
32
|
+
**Kind**: static method of [<code>onTheMDCVariant</code>](#onTheMDCVariant)
|
|
33
|
+
**Returns**: <code>Promise</code> - OPA waitFor
|
|
34
|
+
<a name="onTheMDCVariant.iSaveVariantAs"></a>
|
|
35
|
+
|
|
36
|
+
### onTheMDCVariant.iSaveVariantAs(sVariantCurrentName, sVariantNewName) ⇒ <code>Promise</code>
|
|
37
|
+
OPA5 test action
|
|
38
|
+
|
|
39
|
+
**Kind**: static method of [<code>onTheMDCVariant</code>](#onTheMDCVariant)
|
|
40
|
+
**Returns**: <code>Promise</code> - OPA waitFor
|
|
41
|
+
|
|
42
|
+
| Param | Type | Description |
|
|
43
|
+
| --- | --- | --- |
|
|
44
|
+
| sVariantCurrentName | <code>string</code> | Name of the current variant |
|
|
45
|
+
| sVariantNewName | <code>string</code> | Name of the variant which is to saved |
|
|
46
|
+
|
|
47
|
+
<a name="onTheMDCVariant.iSelectVariant"></a>
|
|
48
|
+
|
|
49
|
+
### onTheMDCVariant.iSelectVariant(sVariantName) ⇒ <code>Promise</code>
|
|
50
|
+
OPA5 test action
|
|
51
|
+
|
|
52
|
+
**Kind**: static method of [<code>onTheMDCVariant</code>](#onTheMDCVariant)
|
|
53
|
+
**Returns**: <code>Promise</code> - OPA waitFor
|
|
54
|
+
|
|
55
|
+
| Param | Type | Description |
|
|
56
|
+
| --- | --- | --- |
|
|
57
|
+
| sVariantName | <code>string</code> | Name of the variant which is to be selected |
|
|
58
|
+
|
|
59
|
+
<a name="onTheMDCVariant.iShouldSeeTheVariantManagerButton"></a>
|
|
60
|
+
|
|
61
|
+
### onTheMDCVariant.iShouldSeeTheVariantManagerButton(sText) ⇒ <code>Promise</code>
|
|
62
|
+
OPA5 test assertion
|
|
63
|
+
|
|
64
|
+
**Kind**: static method of [<code>onTheMDCVariant</code>](#onTheMDCVariant)
|
|
65
|
+
**Returns**: <code>Promise</code> - OPA waitFor
|
|
66
|
+
|
|
67
|
+
| Param | Type | Description |
|
|
68
|
+
| --- | --- | --- |
|
|
69
|
+
| sText | <code>string</code> | Text property of the VariantManager button |
|
|
70
|
+
|
|
71
|
+
<a name="onTheMDCVariant.iShouldSeeTheVariantManagerPopover"></a>
|
|
72
|
+
|
|
73
|
+
### onTheMDCVariant.iShouldSeeTheVariantManagerPopover() ⇒ <code>Promise</code>
|
|
74
|
+
OPA5 test assertion
|
|
75
|
+
|
|
76
|
+
**Kind**: static method of [<code>onTheMDCVariant</code>](#onTheMDCVariant)
|
|
77
|
+
**Returns**: <code>Promise</code> - OPA waitFor
|
|
78
|
+
<a name="onTheMDCVariant.iShouldSeeTheSaveVariantDialog"></a>
|
|
79
|
+
|
|
80
|
+
### onTheMDCVariant.iShouldSeeTheSaveVariantDialog() ⇒ <code>Promise</code>
|
|
81
|
+
OPA5 test assertion
|
|
82
|
+
|
|
83
|
+
**Kind**: static method of [<code>onTheMDCVariant</code>](#onTheMDCVariant)
|
|
84
|
+
**Returns**: <code>Promise</code> - OPA waitFor
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* ${copyright}
|
|
3
|
+
*/
|
|
4
|
+
sap.ui.define([
|
|
5
|
+
"sap/ui/test/Opa5",
|
|
6
|
+
"./Actions",
|
|
7
|
+
"./Assertions"
|
|
8
|
+
], function(
|
|
9
|
+
Opa5,
|
|
10
|
+
variantActions,
|
|
11
|
+
variantAssertions
|
|
12
|
+
) {
|
|
13
|
+
"use strict";
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* @namespace onTheMDCVariant
|
|
17
|
+
*/
|
|
18
|
+
Opa5.createPageObjects({
|
|
19
|
+
onTheMDCVariant: {
|
|
20
|
+
actions: {
|
|
21
|
+
/**
|
|
22
|
+
* OPA5 test action
|
|
23
|
+
* @memberof onTheMDCVariant
|
|
24
|
+
* @method iPressOnTheVariantManagerButton
|
|
25
|
+
* @param {string} sVariantName Name of the current variant
|
|
26
|
+
* @returns {Promise} OPA waitFor
|
|
27
|
+
*/
|
|
28
|
+
iPressOnTheVariantManagerButton: function(sVariantName) {
|
|
29
|
+
return variantActions.iPressOnTheVariantManagerButton.apply(this, arguments);
|
|
30
|
+
},
|
|
31
|
+
/**
|
|
32
|
+
* OPA5 test action
|
|
33
|
+
* @memberof onTheMDCVariant
|
|
34
|
+
* @method iPressOnTheVariantManagerSaveAsButton
|
|
35
|
+
* @returns {Promise} OPA waitFor
|
|
36
|
+
*/
|
|
37
|
+
iPressOnTheVariantManagerSaveAsButton: function() {
|
|
38
|
+
return variantActions.iPressOnTheVariantManagerSaveAsButton.apply(this, arguments);
|
|
39
|
+
},
|
|
40
|
+
/**
|
|
41
|
+
* OPA5 test action
|
|
42
|
+
* @memberof onTheMDCVariant
|
|
43
|
+
* @method iSaveVariantAs
|
|
44
|
+
* @param {string} sVariantCurrentName Name of the current variant
|
|
45
|
+
* @param {string} sVariantNewName Name of the variant which is to saved
|
|
46
|
+
* @returns {Promise} OPA waitFor
|
|
47
|
+
*/
|
|
48
|
+
iSaveVariantAs: function(sVariantCurrentName, sVariantNewName) {
|
|
49
|
+
return variantActions.iSaveVariantAs.apply(this, arguments);
|
|
50
|
+
},
|
|
51
|
+
/**
|
|
52
|
+
* OPA5 test action
|
|
53
|
+
* @memberof onTheMDCVariant
|
|
54
|
+
* @method iSelectVariant
|
|
55
|
+
* @param {string} sVariantName Name of the variant which is to be selected
|
|
56
|
+
* @returns {Promise} OPA waitFor
|
|
57
|
+
*/
|
|
58
|
+
iSelectVariant: function(sVariantName) {
|
|
59
|
+
return variantActions.iSelectVariant.apply(this, arguments);
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
assertions: {
|
|
63
|
+
/**
|
|
64
|
+
* OPA5 test assertion
|
|
65
|
+
* @memberof onTheMDCVariant
|
|
66
|
+
* @method iShouldSeeTheVariantManagerButton
|
|
67
|
+
* @param {string} sText Text property of the VariantManager button
|
|
68
|
+
* @returns {Promise} OPA waitFor
|
|
69
|
+
*/
|
|
70
|
+
iShouldSeeTheVariantManagerButton: function(sText) {
|
|
71
|
+
return variantAssertions.iShouldSeeTheVariantManagerButton.apply(this, arguments);
|
|
72
|
+
},
|
|
73
|
+
/**
|
|
74
|
+
* OPA5 test assertion
|
|
75
|
+
* @memberof onTheMDCVariant
|
|
76
|
+
* @method iShouldSeeTheVariantManagerPopover
|
|
77
|
+
* @returns {Promise} OPA waitFor
|
|
78
|
+
*/
|
|
79
|
+
iShouldSeeTheVariantManagerPopover: function() {
|
|
80
|
+
return variantAssertions.iShouldSeeTheVariantManagerPopover.apply(this, arguments);
|
|
81
|
+
},
|
|
82
|
+
/**
|
|
83
|
+
* OPA5 test assertion
|
|
84
|
+
* @memberof onTheMDCVariant
|
|
85
|
+
* @method iShouldSeeTheSaveVariantDialog
|
|
86
|
+
* @returns {Promise} OPA waitFor
|
|
87
|
+
*/
|
|
88
|
+
iShouldSeeTheSaveVariantDialog: function() {
|
|
89
|
+
return variantAssertions.iShouldSeeTheSaveVariantDialog.apply(this, arguments);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
});
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* ${copyright}
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
sap.ui.define([
|
|
6
|
+
"sap/ui/test/Opa5"
|
|
7
|
+
], function(
|
|
8
|
+
Opa5
|
|
9
|
+
) {
|
|
10
|
+
"use strict";
|
|
11
|
+
|
|
12
|
+
return function waitForVariantManager(oSettings) {
|
|
13
|
+
oSettings = oSettings || {};
|
|
14
|
+
|
|
15
|
+
return this.waitFor({
|
|
16
|
+
controlType: "sap.ui.fl.variants.VariantManagement",
|
|
17
|
+
matchers: {
|
|
18
|
+
descendant: {
|
|
19
|
+
controlType: "sap.m.Title",
|
|
20
|
+
properties: {
|
|
21
|
+
text: oSettings.text
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
actions: oSettings.actions,
|
|
26
|
+
success: function(aVariantManagerButtons) {
|
|
27
|
+
var sMessageFound = 'The variant manager button with text "' + oSettings.text + '" was found';
|
|
28
|
+
Opa5.assert.strictEqual(aVariantManagerButtons.length, 1, sMessageFound);
|
|
29
|
+
|
|
30
|
+
if (oSettings.actions) {
|
|
31
|
+
var sMessageAction = 'An action on the variant manager button with text "' + oSettings.text + '" was performed';
|
|
32
|
+
Opa5.assert.ok(true, sMessageAction);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
if (typeof oSettings.success === "function") {
|
|
36
|
+
var oVariantManagerButton = aVariantManagerButtons[0];
|
|
37
|
+
oSettings.success.call(this, oVariantManagerButton);
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
errorMessage: "The variant manager button was not found"
|
|
41
|
+
});
|
|
42
|
+
};
|
|
43
|
+
});
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* ${copyright}
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
sap.ui.define([
|
|
6
|
+
"sap/ui/test/Opa5",
|
|
7
|
+
"sap/ui/test/matchers/Ancestor",
|
|
8
|
+
"./waitForVariantManagerOverlay"
|
|
9
|
+
], function(
|
|
10
|
+
Opa5,
|
|
11
|
+
Ancestor,
|
|
12
|
+
waitForVariantManagerOverlay
|
|
13
|
+
) {
|
|
14
|
+
"use strict";
|
|
15
|
+
|
|
16
|
+
return function waitForVariantManagerButton(oSettings) {
|
|
17
|
+
|
|
18
|
+
var oDefaultSettings = {
|
|
19
|
+
controlType: "sap.m.Button"
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
oSettings = Object.assign(oDefaultSettings, oSettings);
|
|
23
|
+
|
|
24
|
+
return waitForVariantManagerOverlay.call(this, {
|
|
25
|
+
properties: oSettings.ancestorProperties,
|
|
26
|
+
success: function(oVariantManagerPopover) {
|
|
27
|
+
this.waitFor({
|
|
28
|
+
controlType: oSettings.controlType,
|
|
29
|
+
properties: oSettings.properties,
|
|
30
|
+
matchers: new Ancestor(oVariantManagerPopover),
|
|
31
|
+
actions: oSettings.actions,
|
|
32
|
+
success: function(aButtons) {
|
|
33
|
+
Opa5.assert.strictEqual(aButtons.length, 1, 'The variant manager button was found');
|
|
34
|
+
|
|
35
|
+
if (typeof oSettings.success === "function") {
|
|
36
|
+
var oButton = aButtons[0];
|
|
37
|
+
oSettings.success.call(this, oButton);
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
errorMessage: oSettings.errorMessage
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
});
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* ${copyright}
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
sap.ui.define([
|
|
6
|
+
"sap/ui/test/Opa5",
|
|
7
|
+
"sap/ui/test/matchers/Ancestor",
|
|
8
|
+
"./waitForVariantManagerOverlay",
|
|
9
|
+
"../Utils"
|
|
10
|
+
], function(
|
|
11
|
+
Opa5,
|
|
12
|
+
Ancestor,
|
|
13
|
+
waitForVariantManagerOverlay,
|
|
14
|
+
TestUtils
|
|
15
|
+
) {
|
|
16
|
+
"use strict";
|
|
17
|
+
|
|
18
|
+
return function waitForVariantManagerItem(oSettings) {
|
|
19
|
+
oSettings = oSettings || {};
|
|
20
|
+
|
|
21
|
+
var sItemText = oSettings.itemText;
|
|
22
|
+
|
|
23
|
+
function onVariantManagerPopoverFound(oVariantManagerPopover) {
|
|
24
|
+
this.waitFor({
|
|
25
|
+
searchOpenDialogs: true, // search only visible controls inside the static area
|
|
26
|
+
controlType: "sap.ui.core.Item",
|
|
27
|
+
properties: {
|
|
28
|
+
text: sItemText,
|
|
29
|
+
enabled: true
|
|
30
|
+
},
|
|
31
|
+
matchers: new Ancestor(oVariantManagerPopover),
|
|
32
|
+
actions: oSettings.actions,
|
|
33
|
+
success: function onListItemFound(aItems) {
|
|
34
|
+
Opa5.assert.strictEqual(aItems.length, 1, 'The variant "' + sItemText + '" item was found');
|
|
35
|
+
var oListItem = aItems[0];
|
|
36
|
+
|
|
37
|
+
if (typeof oSettings.success === "function") {
|
|
38
|
+
oSettings.success.call(this, oListItem);
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
errorMessage: 'The variant "' + sItemText + '" item could not be found'
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
return waitForVariantManagerOverlay.call(this, {
|
|
46
|
+
properties: {
|
|
47
|
+
|
|
48
|
+
// title: "My Views"
|
|
49
|
+
title: TestUtils.getTextFromResourceBundle("sap.ui.fl", "VARIANT_MANAGEMENT_VARIANTS")
|
|
50
|
+
},
|
|
51
|
+
success: onVariantManagerPopoverFound
|
|
52
|
+
});
|
|
53
|
+
};
|
|
54
|
+
});
|