@sapui5/sap.fe.test 1.97.0 → 1.99.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.
Files changed (77) hide show
  1. package/package.json +5 -2
  2. package/src/sap/fe/test/.library +1 -1
  3. package/src/sap/fe/test/BaseActions.js +3 -2
  4. package/src/sap/fe/test/BaseArrangements.js +3 -2
  5. package/src/sap/fe/test/BaseAssertions.js +3 -2
  6. package/src/sap/fe/test/ConfirmDialog.js +3 -2
  7. package/src/sap/fe/test/FCLView.js +3 -2
  8. package/src/sap/fe/test/FeMocks.js +66 -0
  9. package/src/sap/fe/test/FeMocks.ts +77 -0
  10. package/src/sap/fe/test/Flexibility.js +3 -2
  11. package/src/sap/fe/test/FlexibleColumnLayout.js +3 -2
  12. package/src/sap/fe/test/JestTemplatingHelper.js +78 -22
  13. package/src/sap/fe/test/JestTemplatingHelper.ts +66 -22
  14. package/src/sap/fe/test/JourneyRunner.js +11 -5
  15. package/src/sap/fe/test/ListReport.js +11 -5
  16. package/src/sap/fe/test/LocationUtil.js +3 -2
  17. package/src/sap/fe/test/ObjectPage.js +28 -17
  18. package/src/sap/fe/test/Shell.js +3 -2
  19. package/src/sap/fe/test/Stubs.js +3 -2
  20. package/src/sap/fe/test/TemplatePage.js +3 -2
  21. package/src/sap/fe/test/TemplatingTestUtils.js +4 -3
  22. package/src/sap/fe/test/UI5MockHelper.js +234 -45
  23. package/src/sap/fe/test/UI5MockHelper.ts +127 -12
  24. package/src/sap/fe/test/Utils.js +3 -14
  25. package/src/sap/fe/test/api/APIHelper.js +3 -2
  26. package/src/sap/fe/test/api/BaseAPI.js +5 -9
  27. package/src/sap/fe/test/api/ChartActions.js +3 -2
  28. package/src/sap/fe/test/api/ChartAssertions.js +7 -6
  29. package/src/sap/fe/test/api/DialogAPI.js +17 -4
  30. package/src/sap/fe/test/api/DialogActions.js +3 -2
  31. package/src/sap/fe/test/api/DialogAssertions.js +3 -2
  32. package/src/sap/fe/test/api/DialogCreateActions.js +4 -3
  33. package/src/sap/fe/test/api/DialogCreateAssertions.js +4 -3
  34. package/src/sap/fe/test/api/DialogMessageActions.js +19 -3
  35. package/src/sap/fe/test/api/DialogMessageAssertions.js +4 -3
  36. package/src/sap/fe/test/api/DialogType.js +3 -2
  37. package/src/sap/fe/test/api/DialogValueHelpActions.js +4 -3
  38. package/src/sap/fe/test/api/DialogValueHelpAssertions.js +4 -3
  39. package/src/sap/fe/test/api/EditState.js +3 -2
  40. package/src/sap/fe/test/api/FilterBarAPI.js +3 -2
  41. package/src/sap/fe/test/api/FilterBarActions.js +3 -2
  42. package/src/sap/fe/test/api/FilterBarAssertions.js +3 -2
  43. package/src/sap/fe/test/api/FooterAPI.js +3 -2
  44. package/src/sap/fe/test/api/FooterActionsBase.js +3 -2
  45. package/src/sap/fe/test/api/FooterActionsOP.js +3 -2
  46. package/src/sap/fe/test/api/FooterAssertionsBase.js +3 -2
  47. package/src/sap/fe/test/api/FooterAssertionsOP.js +3 -2
  48. package/src/sap/fe/test/api/FormAPI.js +3 -2
  49. package/src/sap/fe/test/api/FormActions.js +3 -2
  50. package/src/sap/fe/test/api/FormAssertions.js +3 -2
  51. package/src/sap/fe/test/api/HeaderAPI.js +3 -2
  52. package/src/sap/fe/test/api/HeaderActions.js +3 -2
  53. package/src/sap/fe/test/api/HeaderActionsLR.js +3 -2
  54. package/src/sap/fe/test/api/HeaderAssertions.js +3 -2
  55. package/src/sap/fe/test/api/HeaderAssertionsLR.js +3 -2
  56. package/src/sap/fe/test/api/HeaderLR.js +3 -2
  57. package/src/sap/fe/test/api/KPICardAPI.js +3 -2
  58. package/src/sap/fe/test/api/KPICardActions.js +43 -0
  59. package/src/sap/fe/test/api/KPICardAssertions.js +22 -17
  60. package/src/sap/fe/test/api/TableAPI.js +3 -2
  61. package/src/sap/fe/test/api/TableActions.js +3 -21
  62. package/src/sap/fe/test/api/TableAssertions.js +17 -6
  63. package/src/sap/fe/test/builder/DialogBuilder.js +3 -2
  64. package/src/sap/fe/test/builder/FEBuilder.js +3 -2
  65. package/src/sap/fe/test/builder/KPIBuilder.js +14 -4
  66. package/src/sap/fe/test/builder/MacroFieldBuilder.js +3 -2
  67. package/src/sap/fe/test/builder/MdcFieldBuilder.js +3 -2
  68. package/src/sap/fe/test/builder/MdcFilterBarBuilder.js +3 -2
  69. package/src/sap/fe/test/builder/MdcFilterFieldBuilder.js +3 -2
  70. package/src/sap/fe/test/builder/MdcTableBuilder.js +29 -2
  71. package/src/sap/fe/test/builder/OverflowToolbarBuilder.js +3 -2
  72. package/src/sap/fe/test/builder/VMBuilder.js +3 -2
  73. package/src/sap/fe/test/internal/FEArrangements.js +3 -2
  74. package/src/sap/fe/test/internal/FEJourneyRunner.js +9 -5
  75. package/src/sap/fe/test/library.js +4 -3
  76. package/src/sap/fe/test/massEdit.js +3 -2
  77. package/ui5.yaml +0 -3
@@ -1,11 +1,23 @@
1
1
  /**
2
2
  * Mock class for a V4 Context
3
3
  */
4
-
5
- import { Context, ODataListBinding, ODataContextBinding, ODataMetaModel, ODataModel } from "sap/ui/model/odata/v4";
4
+ import Event from "sap/ui/base/Event";
5
+ import Control from "sap/ui/core/Control";
6
+ import UI5Element from "sap/ui/core/Element";
7
+ import Controller from "sap/ui/core/mvc/Controller";
8
+ import View from "sap/ui/core/mvc/View";
9
+ import Context from "sap/ui/model/odata/v4/Context";
10
+ import ODataListBinding from "sap/ui/model/odata/v4/ODataListBinding";
11
+ import ODataContextBinding from "sap/ui/model/odata/v4/ODataContextBinding";
12
+ import ODataMetaModel from "sap/ui/model/odata/v4/ODataMetaModel";
13
+ import ODataModel from "sap/ui/model/odata/v4/ODataModel";
6
14
 
7
15
  export class MockContext implements Partial<Context> {
8
- public constructor(private oValues: any, private oBinding?: any) {}
16
+ public constructor(private oValues?: any, private oBinding?: any) {}
17
+
18
+ public isA(sClassName: string): boolean {
19
+ return sClassName === "sap.ui.model.odata.v4.Context";
20
+ }
9
21
 
10
22
  public getProperty = jest.fn((key: string) => {
11
23
  return this.oValues[key];
@@ -15,8 +27,19 @@ export class MockContext implements Partial<Context> {
15
27
  return this.oValues[key];
16
28
  });
17
29
 
18
- public getObject = jest.fn((key: string) => {
19
- return this.oValues[key];
30
+ public getObject = jest.fn((path: string) => {
31
+ const that = this as any;
32
+ let result = path ? that.oValues[path] : that.oValues;
33
+
34
+ if (!result && path && path.indexOf("/") > -1) {
35
+ const parts = path.split("/");
36
+ result = parts.reduce((sum, part: any) => {
37
+ sum = part ? sum[part] : sum;
38
+ return sum;
39
+ }, that.oValues);
40
+ }
41
+
42
+ return result;
20
43
  });
21
44
  public getPath = jest.fn(() => {
22
45
  return this.oValues["$path"];
@@ -25,14 +48,33 @@ export class MockContext implements Partial<Context> {
25
48
  public getBinding = jest.fn(() => {
26
49
  return this.oBinding;
27
50
  });
28
- public getModel = jest.fn();
51
+ public getModel = jest.fn(() => {
52
+ return (this.oBinding?.getModel() as any) as ODataModel;
53
+ });
54
+ public isTransient = jest.fn();
29
55
  }
30
56
 
31
- export class MockControl {
32
- public getBindingInfo = jest.fn();
57
+ export class MockUI5Element implements Partial<UI5Element> {
58
+ [key: string]: any;
59
+ public bindingContext = new MockContext({});
33
60
  public getBinding = jest.fn();
61
+ public getBindingContext = jest.fn().mockReturnValue(this.bindingContext);
62
+ public getBindingInfo = jest.fn();
34
63
  public data = jest.fn();
35
64
  public getModel = jest.fn();
65
+ public getParent = jest.fn();
66
+ }
67
+
68
+ export class MockControl extends MockUI5Element implements Partial<Control> {
69
+ public getBindingContext: jest.Mock<any, any> = jest.fn();
70
+ }
71
+
72
+ export class MockEvent implements Partial<Event> {
73
+ public constructor(public params: { [key: string]: any } = {}, public source: MockUI5Element = new MockUI5Element()) {}
74
+
75
+ public getParameter = jest.fn(name => this.params[name]);
76
+
77
+ public getSource = jest.fn(() => this.source as any);
36
78
  }
37
79
 
38
80
  /**
@@ -41,7 +83,7 @@ export class MockControl {
41
83
  export class MockListBinding implements Partial<ODataListBinding> {
42
84
  private aMockContexts: MockContext[];
43
85
 
44
- public constructor(aContexts?: any[]) {
86
+ public constructor(aContexts?: any[], private mockModel?: MockModel) {
45
87
  aContexts = aContexts || [];
46
88
 
47
89
  this.aMockContexts = aContexts.map(context => {
@@ -53,6 +95,10 @@ export class MockListBinding implements Partial<ODataListBinding> {
53
95
  return sClassName === "sap.ui.model.odata.v4.ODataListBinding";
54
96
  }
55
97
 
98
+ public setModel(oModel: MockModel) {
99
+ this.mockModel = oModel;
100
+ }
101
+
56
102
  // Mocked API
57
103
  public setAggregation = jest.fn();
58
104
  public filter = jest.fn();
@@ -66,12 +112,15 @@ export class MockListBinding implements Partial<ODataListBinding> {
66
112
  public getCurrentContexts = jest.fn((...args) => {
67
113
  return (this.aMockContexts as any) as Context[];
68
114
  });
115
+ public getModel = jest.fn(() => {
116
+ return (this.mockModel as any) as ODataModel;
117
+ });
69
118
  }
70
119
 
71
120
  export class MockContextBinding implements Partial<ODataContextBinding> {
72
121
  private oMockContext: MockContext;
73
122
 
74
- public constructor(oContext?: any) {
123
+ public constructor(oContext?: any, private mockModel?: MockModel) {
75
124
  this.oMockContext = new MockContext(oContext || {}, this);
76
125
  }
77
126
 
@@ -81,12 +130,18 @@ export class MockContextBinding implements Partial<ODataContextBinding> {
81
130
  public getInternalMockContext(): MockContext {
82
131
  return this.oMockContext;
83
132
  }
133
+ public setModel(oModel: MockModel) {
134
+ this.mockModel = oModel;
135
+ }
84
136
 
85
137
  // Mocked API
86
138
  public getBoundContext = jest.fn(() => {
87
139
  return (this.oMockContext as any) as Context;
88
140
  });
89
141
  public attachEventOnce = jest.fn();
142
+ public getModel = jest.fn(() => {
143
+ return (this.mockModel as any) as ODataModel;
144
+ });
90
145
  }
91
146
 
92
147
  /**
@@ -108,8 +163,11 @@ export class MockMetaModel implements Partial<ODataMetaModel> {
108
163
  return this.oMetaContext.getProperty(sPath);
109
164
  });
110
165
  public requestObject = jest.fn();
111
- public createBindingContext = jest.fn();
166
+ public createBindingContext = jest.fn((sPath: string) => {
167
+ return (new MockContext({ $path: sPath }) as any) as Context;
168
+ });
112
169
  public getMetaPath = jest.fn();
170
+ public getContext = jest.fn();
113
171
  }
114
172
 
115
173
  /**
@@ -119,7 +177,14 @@ export class MockMetaModel implements Partial<ODataMetaModel> {
119
177
  export class MockModel implements Partial<ODataModel> {
120
178
  private oMetaModel?: MockMetaModel;
121
179
 
122
- public constructor(private mockListBinding?: MockListBinding, private mockContextBinding?: MockContextBinding) {}
180
+ public constructor(private mockListBinding?: MockListBinding, private mockContextBinding?: MockContextBinding) {
181
+ if (mockListBinding) {
182
+ mockListBinding.setModel(this);
183
+ }
184
+ if (mockContextBinding) {
185
+ mockContextBinding.setModel(this);
186
+ }
187
+ }
123
188
 
124
189
  // Factories
125
190
  static modelFromListBinding(mockListBinding: MockListBinding): MockModel {
@@ -149,3 +214,53 @@ export class MockModel implements Partial<ODataModel> {
149
214
  public getProperty = jest.fn();
150
215
  public setProperty = jest.fn();
151
216
  }
217
+
218
+ export class MockView implements Partial<View> {
219
+ public getController = jest.fn();
220
+
221
+ public getModel = jest.fn();
222
+
223
+ public getViewData = jest.fn();
224
+ }
225
+
226
+ export class MockController implements Partial<Controller> {
227
+ public getView = jest.fn();
228
+
229
+ public _routing = {
230
+ navigateToTarget: jest.fn()
231
+ };
232
+
233
+ public _editFlow = {
234
+ syncTask: jest.fn()
235
+ };
236
+
237
+ public _sideEffects = {
238
+ handleFieldChange: jest.fn()
239
+ };
240
+
241
+ isA = jest.fn().mockReturnValue(false);
242
+ }
243
+
244
+ export interface MVCMock {
245
+ model: MockModel;
246
+ view: MockView;
247
+ controller: MockController;
248
+ }
249
+
250
+ /**
251
+ * Generate model, view and controller mocks that refer to each other.
252
+ *
253
+ * @param existing Optional existing mocked instances that should be used
254
+ * @returns Mocked model, view and controller instances
255
+ */
256
+ export function mockMVC(existing?: Partial<MVCMock>): MVCMock {
257
+ const model = existing?.model || new MockModel();
258
+ const view = existing?.view || new MockView();
259
+ const controller = existing?.controller || new MockController();
260
+
261
+ view.getController.mockReturnValue(controller);
262
+ view.getModel.mockReturnValue(model);
263
+ controller.getView.mockReturnValue(view);
264
+
265
+ return { model, view, controller };
266
+ }
@@ -1,6 +1,7 @@
1
1
  /*
2
- * ! SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
2
+ * ! SAP UI development toolkit for HTML5 (SAPUI5)
3
+ (c) Copyright 2009-2021 SAP SE. All rights reserved
4
+
4
5
  */
5
6
  sap.ui.define(
6
7
  [
@@ -287,18 +288,6 @@ sap.ui.define(
287
288
  return vTarget;
288
289
  };
289
290
 
290
- Utils.getParametersArray = function(iStartIndex, aArguments) {
291
- var aArguments = Array.prototype.slice.call(arguments, 1);
292
- if (aArguments.length === 1 && Utils.isArguments(aArguments[0])) {
293
- aArguments = Array.prototype.slice.call(aArguments[0], 0);
294
- }
295
- var aParameters = aArguments[iStartIndex];
296
- if (aArguments.length > iStartIndex || (aParameters && !Array.isArray(aParameters))) {
297
- aParameters = Array.prototype.slice.call(aArguments, iStartIndex);
298
- }
299
- return aParameters;
300
- };
301
-
302
291
  return Utils;
303
292
  }
304
293
  );
@@ -1,6 +1,7 @@
1
1
  /*
2
- * ! SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
2
+ * ! SAP UI development toolkit for HTML5 (SAPUI5)
3
+ (c) Copyright 2009-2021 SAP SE. All rights reserved
4
+
4
5
  */
5
6
  sap.ui.define(["sap/fe/test/Utils", "sap/ui/test/OpaBuilder", "sap/fe/test/builder/FEBuilder"], function(Utils, OpaBuilder, FEBuilder) {
6
7
  "use strict";
@@ -1,15 +1,10 @@
1
1
  /*
2
- * ! SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
2
+ * ! SAP UI development toolkit for HTML5 (SAPUI5)
3
+ (c) Copyright 2009-2021 SAP SE. All rights reserved
4
+
4
5
  */
5
6
  sap.ui.define(
6
- [
7
- "sap/fe/test/Utils",
8
- "sap/ui/test/Opa5",
9
- "sap/ui/test/OpaBuilder",
10
- "sap/fe/test/builder/FEBuilder",
11
- "sap/ui/mdc/p13n/panels/BasePanel"
12
- ],
7
+ ["sap/fe/test/Utils", "sap/ui/test/Opa5", "sap/ui/test/OpaBuilder", "sap/fe/test/builder/FEBuilder", "sap/m/p13n/BasePanel"],
13
8
  function(Utils, Opa5, OpaBuilder, FEBuilder, MdcP13nBasePanel) {
14
9
  "use strict";
15
10
 
@@ -18,6 +13,7 @@ sap.ui.define(
18
13
  *
19
14
  * @typedef {object} TableIdentifier
20
15
  * @property {string} property The name of the navigation property used for the table
16
+ * @property {string} [qualifier] The name of a qualifier for the table
21
17
  *
22
18
  * @name sap.fe.test.api.TableIdentifier
23
19
  * @public
@@ -1,6 +1,7 @@
1
1
  /*
2
- * ! SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
2
+ * ! SAP UI development toolkit for HTML5 (SAPUI5)
3
+ (c) Copyright 2009-2021 SAP SE. All rights reserved
4
+
4
5
  */
5
6
  sap.ui.define(["./BaseAPI", "sap/fe/test/Utils", "sap/ui/test/OpaBuilder", "sap/fe/test/builder/FEBuilder"], function(
6
7
  BaseAPI,
@@ -1,6 +1,7 @@
1
1
  /*
2
- * ! SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
2
+ * ! SAP UI development toolkit for HTML5 (SAPUI5)
3
+ (c) Copyright 2009-2021 SAP SE. All rights reserved
4
+
4
5
  */
5
6
  sap.ui.define(
6
7
  ["./BaseAPI", "sap/fe/test/Utils", "sap/ui/test/OpaBuilder", "sap/fe/test/builder/FEBuilder", "sap/ui/core/SortOrder"],
@@ -27,7 +28,7 @@ sap.ui.define(
27
28
 
28
29
  ChartAssertions.prototype.iCheckItems = function(iNumberOfItems, sTab) {
29
30
  return OpaBuilder.create(this)
30
- .hasType("sap.ui.mdc.ChartNew")
31
+ .hasType("sap.ui.mdc.Chart")
31
32
  .check(function(aCharts) {
32
33
  var oChart;
33
34
  if (sTab && aCharts && aCharts.length > 1) {
@@ -56,7 +57,7 @@ sap.ui.define(
56
57
 
57
58
  ChartAssertions.prototype.iSeeChartType = function(sChartType) {
58
59
  return OpaBuilder.create(this)
59
- .hasType("sap.ui.mdc.ChartNew")
60
+ .hasType("sap.ui.mdc.Chart")
60
61
  .check(function(oChart) {
61
62
  return sChartType === oChart[0].getChartType();
62
63
  }, true)
@@ -66,7 +67,7 @@ sap.ui.define(
66
67
 
67
68
  ChartAssertions.prototype.iSeeChartVisible = function() {
68
69
  return OpaBuilder.create(this)
69
- .hasType("sap.ui.mdc.ChartNew")
70
+ .hasType("sap.ui.mdc.Chart")
70
71
  .check(function(oChart) {
71
72
  return oChart[0].getVisible() === true;
72
73
  }, true)
@@ -103,7 +104,7 @@ sap.ui.define(
103
104
 
104
105
  ChartAssertions.prototype.iCheckChartNoDataText = function(sNoDataText) {
105
106
  return OpaBuilder.create(this)
106
- .hasType("sap.ui.mdc.ChartNew")
107
+ .hasType("sap.ui.mdc.Chart")
107
108
  .check(function(oChart) {
108
109
  return sNoDataText === oChart[0].getNoDataText();
109
110
  })
@@ -1,6 +1,7 @@
1
1
  /*
2
- * ! SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
2
+ * ! SAP UI development toolkit for HTML5 (SAPUI5)
3
+ (c) Copyright 2009-2021 SAP SE. All rights reserved
4
+
4
5
  */
5
6
  sap.ui.define(
6
7
  [
@@ -28,6 +29,7 @@ sap.ui.define(
28
29
  throw new Error("oDialogBuilder parameter must be a DialogBuilder instance");
29
30
  }
30
31
  this._iConfirmButtonIndex = iConfirmButtonIndex || 0;
32
+ this._iConfirmDiscardDraftButtonIndex = this._iConfirmButtonIndex + 1; // second button in the list
31
33
  return BaseAPI.call(this, oDialogBuilder, vDialogDescription);
32
34
  };
33
35
  DialogAPI.prototype = Object.create(BaseAPI.prototype);
@@ -86,8 +88,19 @@ sap.ui.define(
86
88
  var iConfirmButtonIndex = this._iConfirmButtonIndex;
87
89
  return function(oButton) {
88
90
  var aButtons = oButton.getParent().getButtons();
89
- // Cancel is (usually) right next to the first (confirm) button
90
- return aButtons.indexOf(oButton) === Math.min(aButtons.length - 1, iConfirmButtonIndex + 1);
91
+ // Cancel is (usually) right next to the first (confirm) button and (usually) the last one in the list
92
+ return aButtons.length > 2
93
+ ? aButtons.indexOf(oButton) === aButtons.length - 1
94
+ : aButtons.indexOf(oButton) === Math.min(aButtons.length - 1, iConfirmButtonIndex + 1);
95
+ };
96
+ };
97
+
98
+ DialogAPI.prototype._getConfirmDiscardDraftButtonMatcher = function() {
99
+ var iConfirmDiscardDraftButtonIndex = this._iConfirmDiscardDraftButtonIndex;
100
+ return function(oButton) {
101
+ var aButtons = oButton.getParent().getButtons();
102
+ // for the KeepDraft/DiscardDraft message, the DiscardDraft button is the second in the list
103
+ return aButtons.indexOf(oButton) === iConfirmDiscardDraftButtonIndex;
91
104
  };
92
105
  };
93
106
 
@@ -1,6 +1,7 @@
1
1
  /*
2
- * ! SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
2
+ * ! SAP UI development toolkit for HTML5 (SAPUI5)
3
+ (c) Copyright 2009-2021 SAP SE. All rights reserved
4
+
4
5
  */
5
6
  sap.ui.define(["./DialogAPI", "sap/fe/test/Utils", "sap/ui/test/OpaBuilder"], function(DialogAPI, Utils, OpaBuilder) {
6
7
  "use strict";
@@ -1,6 +1,7 @@
1
1
  /*
2
- * ! SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
2
+ * ! SAP UI development toolkit for HTML5 (SAPUI5)
3
+ (c) Copyright 2009-2021 SAP SE. All rights reserved
4
+
4
5
  */
5
6
  sap.ui.define(["./DialogAPI", "sap/fe/test/Utils"], function(DialogAPI, Utils) {
6
7
  "use strict";
@@ -1,6 +1,7 @@
1
1
  /*
2
- * ! SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
2
+ * ! SAP UI development toolkit for HTML5 (SAPUI5)
3
+ (c) Copyright 2009-2021 SAP SE. All rights reserved
4
+
4
5
  */
5
6
  sap.ui.define(["./DialogActions", "sap/fe/test/Utils", "sap/ui/test/OpaBuilder"], function(DialogActions, Utils, OpaBuilder) {
6
7
  "use strict";
@@ -18,7 +19,7 @@ sap.ui.define(["./DialogActions", "sap/fe/test/Utils", "sap/ui/test/OpaBuilder"]
18
19
  * @public
19
20
  */
20
21
  var DialogCreateActions = function(oDialogBuilder, vDialogDescription) {
21
- return DialogActions.call(this, oDialogBuilder, vDialogDescription, 1);
22
+ return DialogActions.call(this, oDialogBuilder, vDialogDescription, 0);
22
23
  };
23
24
  DialogCreateActions.prototype = Object.create(DialogActions.prototype);
24
25
  DialogCreateActions.prototype.constructor = DialogCreateActions;
@@ -1,6 +1,7 @@
1
1
  /*
2
- * ! SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
2
+ * ! SAP UI development toolkit for HTML5 (SAPUI5)
3
+ (c) Copyright 2009-2021 SAP SE. All rights reserved
4
+
4
5
  */
5
6
  sap.ui.define(["./DialogAssertions", "sap/ui/test/OpaBuilder", "sap/fe/test/builder/FEBuilder", "sap/fe/test/Utils"], function(
6
7
  DialogAssertions,
@@ -23,7 +24,7 @@ sap.ui.define(["./DialogAssertions", "sap/ui/test/OpaBuilder", "sap/fe/test/buil
23
24
  * @public
24
25
  */
25
26
  var DialogCreateAssertions = function(oDialogBuilder, vDialogDescription) {
26
- return DialogAssertions.call(this, oDialogBuilder, vDialogDescription, 1);
27
+ return DialogAssertions.call(this, oDialogBuilder, vDialogDescription, 0);
27
28
  };
28
29
  DialogCreateAssertions.prototype = Object.create(DialogAssertions.prototype);
29
30
  DialogCreateAssertions.prototype.constructor = DialogCreateAssertions;
@@ -1,6 +1,7 @@
1
1
  /*
2
- * ! SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
2
+ * ! SAP UI development toolkit for HTML5 (SAPUI5)
3
+ (c) Copyright 2009-2021 SAP SE. All rights reserved
4
+
4
5
  */
5
6
  sap.ui.define(["./DialogActions", "sap/fe/test/Utils", "sap/ui/test/OpaBuilder"], function(DialogActions, Utils, OpaBuilder) {
6
7
  "use strict";
@@ -18,7 +19,7 @@ sap.ui.define(["./DialogActions", "sap/fe/test/Utils", "sap/ui/test/OpaBuilder"]
18
19
  * @public
19
20
  */
20
21
  var DialogMessageActions = function(oDialogBuilder, vDialogDescription) {
21
- return DialogActions.call(this, oDialogBuilder, vDialogDescription, 1);
22
+ return DialogActions.call(this, oDialogBuilder, vDialogDescription, 0);
22
23
  };
23
24
  DialogMessageActions.prototype = Object.create(DialogActions.prototype);
24
25
  DialogMessageActions.prototype.constructor = DialogMessageActions;
@@ -54,5 +55,20 @@ sap.ui.define(["./DialogActions", "sap/fe/test/Utils", "sap/ui/test/OpaBuilder"]
54
55
  );
55
56
  };
56
57
 
58
+ /**
59
+ * Confirms the draft message with Discard Draft when navigating back to the list-report.
60
+ *
61
+ * @returns {object} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
62
+ * @public
63
+ */
64
+ DialogMessageActions.prototype.iConfirmDiscardDraft = function() {
65
+ return this.prepareResult(
66
+ this.getBuilder()
67
+ .doPressFooterButton(this._getConfirmDiscardDraftButtonMatcher())
68
+ .description(Utils.formatMessage("Confirming dialog '{0}' with Discard Draft", this.getIdentifier()))
69
+ .execute()
70
+ );
71
+ };
72
+
57
73
  return DialogMessageActions;
58
74
  });
@@ -1,6 +1,7 @@
1
1
  /*
2
- * ! SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
2
+ * ! SAP UI development toolkit for HTML5 (SAPUI5)
3
+ (c) Copyright 2009-2021 SAP SE. All rights reserved
4
+
4
5
  */
5
6
  sap.ui.define(["./DialogAssertions", "sap/ui/test/OpaBuilder", "sap/fe/test/builder/FEBuilder", "sap/fe/test/Utils"], function(
6
7
  DialogAssertions,
@@ -23,7 +24,7 @@ sap.ui.define(["./DialogAssertions", "sap/ui/test/OpaBuilder", "sap/fe/test/buil
23
24
  * @public
24
25
  */
25
26
  var DialogMessageAssertions = function(oDialogBuilder, vDialogDescription) {
26
- return DialogAssertions.call(this, oDialogBuilder, vDialogDescription, 1);
27
+ return DialogAssertions.call(this, oDialogBuilder, vDialogDescription, 0);
27
28
  };
28
29
  DialogMessageAssertions.prototype = Object.create(DialogAssertions.prototype);
29
30
  DialogMessageAssertions.prototype.constructor = DialogMessageAssertions;
@@ -1,6 +1,7 @@
1
1
  /*
2
- * ! SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
2
+ * ! SAP UI development toolkit for HTML5 (SAPUI5)
3
+ (c) Copyright 2009-2021 SAP SE. All rights reserved
4
+
4
5
  */
5
6
  sap.ui.define(
6
7
  [],
@@ -1,6 +1,7 @@
1
1
  /*
2
- * ! SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
2
+ * ! SAP UI development toolkit for HTML5 (SAPUI5)
3
+ (c) Copyright 2009-2021 SAP SE. All rights reserved
4
+
4
5
  */
5
6
  sap.ui.define(
6
7
  [
@@ -31,7 +32,7 @@ sap.ui.define(
31
32
  * @public
32
33
  */
33
34
  var DialogValueHelpActions = function(oDialogBuilder, vDialogDescription) {
34
- return DialogActions.call(this, oDialogBuilder, vDialogDescription);
35
+ return DialogActions.call(this, oDialogBuilder, vDialogDescription, 0);
35
36
  };
36
37
  DialogValueHelpActions.prototype = Object.create(DialogActions.prototype);
37
38
  DialogValueHelpActions.prototype.constructor = DialogValueHelpActions;
@@ -1,6 +1,7 @@
1
1
  /*
2
- * ! SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
2
+ * ! SAP UI development toolkit for HTML5 (SAPUI5)
3
+ (c) Copyright 2009-2021 SAP SE. All rights reserved
4
+
4
5
  */
5
6
  sap.ui.define(
6
7
  [
@@ -30,7 +31,7 @@ sap.ui.define(
30
31
  * @public
31
32
  */
32
33
  var DialogValueHelpAssertions = function(oDialogBuilder, vDialogDescription) {
33
- return DialogAssertions.call(this, oDialogBuilder, vDialogDescription, 1);
34
+ return DialogAssertions.call(this, oDialogBuilder, vDialogDescription, 0);
34
35
  };
35
36
  DialogValueHelpAssertions.prototype = Object.create(DialogAssertions.prototype);
36
37
  DialogValueHelpAssertions.prototype.constructor = DialogValueHelpAssertions;
@@ -1,6 +1,7 @@
1
1
  /*
2
- * ! SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
2
+ * ! SAP UI development toolkit for HTML5 (SAPUI5)
3
+ (c) Copyright 2009-2021 SAP SE. All rights reserved
4
+
4
5
  */
5
6
  sap.ui.define(
6
7
  ["sap/fe/macros/filter/DraftEditState"],
@@ -1,6 +1,7 @@
1
1
  /*
2
- * ! SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
2
+ * ! SAP UI development toolkit for HTML5 (SAPUI5)
3
+ (c) Copyright 2009-2021 SAP SE. All rights reserved
4
+
4
5
  */
5
6
  sap.ui.define(
6
7
  [
@@ -1,6 +1,7 @@
1
1
  /*
2
- * ! SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
2
+ * ! SAP UI development toolkit for HTML5 (SAPUI5)
3
+ (c) Copyright 2009-2021 SAP SE. All rights reserved
4
+
4
5
  */
5
6
  sap.ui.define(
6
7
  [
@@ -1,6 +1,7 @@
1
1
  /*
2
- * ! SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
2
+ * ! SAP UI development toolkit for HTML5 (SAPUI5)
3
+ (c) Copyright 2009-2021 SAP SE. All rights reserved
4
+
4
5
  */
5
6
  sap.ui.define(
6
7
  [
@@ -1,6 +1,7 @@
1
1
  /*
2
- * ! SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
2
+ * ! SAP UI development toolkit for HTML5 (SAPUI5)
3
+ (c) Copyright 2009-2021 SAP SE. All rights reserved
4
+
4
5
  */
5
6
  sap.ui.define(
6
7
  [
@@ -1,6 +1,7 @@
1
1
  /*
2
- * ! SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
2
+ * ! SAP UI development toolkit for HTML5 (SAPUI5)
3
+ (c) Copyright 2009-2021 SAP SE. All rights reserved
4
+
4
5
  */
5
6
  sap.ui.define(["./FooterAPI", "sap/fe/test/Utils", "sap/ui/test/OpaBuilder"], function(FooterAPI, Utils, OpaBuilder) {
6
7
  "use strict";
@@ -1,6 +1,7 @@
1
1
  /*
2
- * ! SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
2
+ * ! SAP UI development toolkit for HTML5 (SAPUI5)
3
+ (c) Copyright 2009-2021 SAP SE. All rights reserved
4
+
4
5
  */
5
6
  sap.ui.define(["./FooterActionsBase", "sap/fe/test/Utils", "sap/ui/test/OpaBuilder"], function(FooterActionsBase, Utils, OpaBuilder) {
6
7
  "use strict";
@@ -1,6 +1,7 @@
1
1
  /*
2
- * ! SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
2
+ * ! SAP UI development toolkit for HTML5 (SAPUI5)
3
+ (c) Copyright 2009-2021 SAP SE. All rights reserved
4
+
4
5
  */
5
6
  sap.ui.define(["./FooterAPI", "sap/fe/test/Utils"], function(FooterAPI, Utils) {
6
7
  "use strict";
@@ -1,6 +1,7 @@
1
1
  /*
2
- * ! SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
2
+ * ! SAP UI development toolkit for HTML5 (SAPUI5)
3
+ (c) Copyright 2009-2021 SAP SE. All rights reserved
4
+
4
5
  */
5
6
  sap.ui.define(["./FooterAssertionsBase", "sap/fe/test/Utils", "sap/m/library"], function(FooterAssertionsBase, Utils, mLibrary) {
6
7
  "use strict";
@@ -1,6 +1,7 @@
1
1
  /*
2
- * ! SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
2
+ * ! SAP UI development toolkit for HTML5 (SAPUI5)
3
+ (c) Copyright 2009-2021 SAP SE. All rights reserved
4
+
4
5
  */
5
6
  sap.ui.define(
6
7
  [