on 07-11-2018 9:35 PM
I'm new to OPA testing, and have been able to get the 'plumbing' to work, but when I add the 'viewName' tag to the actions or assertions structure in the CreatePageObjects function of my page file (please see below), the OPA test claims it can't find the view. When I remove the 'viewName' tag, the function below works.
Thank you in advance for your help!
Opa5.createPageObjects({
duringRegionApplicationTest: {
actions: {
iPressTheAddButton: function () {
return this.waitFor({
viewName: "Region",
controlType: "sap.m.Button",
success: function (aButtons) {
aButtons[0].$().trigger("tap");
},
errorMessage: "Did not find the Add button on the app page"
});
}
},
assertions: {
iShouldSeeTheAddDialog: function () {
return this.waitFor({
controlType: "sap.m.Dialog",
success: function () {
Opa5.assert.ok(true, "The dialog is open");
},
errorMessage: "Did not find the dialog control"
});
}
}
}
});
Turns out the OPA testing module needs to have the right path to the view (of course)!
Once the view path is established correctly (using a combination of the resourceroot in the opaTest.qunit.html relative to the opaTest.qunit.html location, and by creating a configuration item called the 'viewNamespace' -- see below) the tests run correctly.
Opa5.extendConfig({
viewNamespace: "app.cco.region.view."
});
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.