sap.m.MessageToast.show 调用的 OPA 匹配器?
OPA matcher for sap.m.MessageToast.show call?
sap.m.MessageToast.show
调用的 OPA 匹配模式是什么样的?
我查看了 sap.m.MessageToast.show
的代码并假设使用控制是 sap.ui.core.Popup
。因此我尝试了以下匹配器:
iShouldSeeAToastMessage : function() {
return this.waitFor({
controlType : "sap.ui.core.Popup",
success : function (aDialog) {
ok(true, "Found a Toast: " + aDialog[0]);
},
errorMessage : "No Toast message detected!"
});
},
控件类型是否正确?匹配器部分会是什么样子?
这应该有效:
return this.waitFor({
pollingInterval : 100,
viewName : "YOUR_VIEW_NAME_HERE",
check : function () {
return !!sap.ui.test.Opa5.getJQuery()(".sapMMessageToast").length;
},
success : function () {
ok(true, "Found a Toast");
},
errorMessage : "No Toast message detected!"
});
sap.m.MessageToast.show
调用的 OPA 匹配模式是什么样的?
我查看了 sap.m.MessageToast.show
的代码并假设使用控制是 sap.ui.core.Popup
。因此我尝试了以下匹配器:
iShouldSeeAToastMessage : function() {
return this.waitFor({
controlType : "sap.ui.core.Popup",
success : function (aDialog) {
ok(true, "Found a Toast: " + aDialog[0]);
},
errorMessage : "No Toast message detected!"
});
},
控件类型是否正确?匹配器部分会是什么样子?
这应该有效:
return this.waitFor({
pollingInterval : 100,
viewName : "YOUR_VIEW_NAME_HERE",
check : function () {
return !!sap.ui.test.Opa5.getJQuery()(".sapMMessageToast").length;
},
success : function () {
ok(true, "Found a Toast");
},
errorMessage : "No Toast message detected!"
});