@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 +1 -1
- package/src/sap/fe/test/.library +1 -1
- package/src/sap/fe/test/BaseArrangements.js +15 -4
- package/src/sap/fe/test/JestTemplatingHelper.js +247 -108
- package/src/sap/fe/test/JestTemplatingHelper.tsx +289 -108
- package/src/sap/fe/test/api/FilterBarAssertions.js +13 -0
- package/src/sap/fe/test/builder/MdcFilterBarBuilder.js +9 -0
- package/src/sap/fe/test/builder/MdcTableBuilder.js +1 -1
- package/src/sap/fe/test/internal/FEArrangements.js +0 -40
- package/src/sap/fe/test/library.js +1 -1
package/package.json
CHANGED
package/src/sap/fe/test/.library
CHANGED
|
@@ -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
|
-
|
|
130
|
-
|
|
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("
|
|
155
|
+
.description(Utils.formatMessage("Reset test data on tenant '{0}'", sTenantID))
|
|
145
156
|
.execute();
|
|
146
157
|
},
|
|
147
158
|
|