@sapui5/sap.fe.test 1.141.2 → 1.143.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sapui5/sap.fe.test",
3
- "version": "1.141.2",
3
+ "version": "1.143.0",
4
4
  "description": "SAPUI5 Library sap.fe.test",
5
5
  "keywords": [
6
6
  "sapui5",
@@ -6,7 +6,7 @@
6
6
  SAP UI development toolkit for HTML5 (SAPUI5)
7
7
  (c) Copyright 2009-2021 SAP SE. All rights reserved
8
8
  </copyright>
9
- <version>1.141.2</version>
9
+ <version>1.143.0</version>
10
10
 
11
11
  <documentation>UI5 library: sap.fe.test</documentation>
12
12
 
@@ -115,19 +115,29 @@ sap.ui.define(
115
115
 
116
116
  /**
117
117
  * Resets the test data.
118
+ * @param {boolean} [bIgnoreRedeploy] Ignore the redeploy
118
119
  * @returns {sap.ui.test.OpaBuilder} The result of the {@link sap.ui.test.Opa5#waitFor} function, to be used for chained statements
119
120
  * @function
120
121
  * @name sap.fe.test.BaseArrangements#iResetTestData
121
122
  * @public
122
123
  */
123
- iResetTestData: function () {
124
+ iResetTestData: function (bIgnoreRedeploy) {
124
125
  var that = this,
126
+ oUriParams = new URLSearchParams(window.location.search),
127
+ sBackendUrl = oUriParams.get("useBackendUrl"),
128
+ sProxyPrefix = sBackendUrl ? "/databinding/proxy/" + sBackendUrl.replace("://", "/") : "",
125
129
  bSuccess = false;
130
+ var sTenantID = window.location.href.includes("sap-client")
131
+ ? new URL(window.location.href).searchParams.get("sap-client")
132
+ : "default";
126
133
 
127
134
  return OpaBuilder.create(this)
128
135
  .success(function () {
129
- //clear local storage so no flex change / variant management zombies exist
130
- that.resetTestData()
136
+ var oResetData = that.resetTestData(),
137
+ oRedeploy =
138
+ bIgnoreRedeploy ?? false ? Promise.resolve() : jQuery.post(sProxyPrefix + "/redeploy?tenant=" + sTenantID);
139
+
140
+ Promise.all([oResetData, oRedeploy])
131
141
  .finally(function () {
132
142
  bSuccess = true;
133
143
  })
@@ -136,12 +146,13 @@ sap.ui.define(
136
146
  });
137
147
 
138
148
  return OpaBuilder.create(this)
149
+ .timeout(60) // allow some time (redeployment on the Java stack is slow)
139
150
  .check(function () {
140
151
  return bSuccess;
141
152
  })
142
153
  .execute();
143
154
  })
144
- .description(Utils.formatMessage("Resetting test data"))
155
+ .description(Utils.formatMessage("Reset test data on tenant '{0}'", sTenantID))
145
156
  .execute();
146
157
  },
147
158