Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8581

Re: OPA testing: View to be tested is embedded in App.view.xml

$
0
0

Thanks Armin for your insight, I'll try to elaborate a bit more with a simpler test case, with no nested UI control.

 

I'm working in web IDE, trying to test a UI5 Helium application I've developed there.

The root view is: [project root]/view/App.xml

The test html page with OPA unit tests is located at [project root]/test/opa1.html

 

The App.xml is as follows:

<mvc:View xmlns:core="sap.ui.core" xmlns:mvc="sap.ui.core.mvc"  xmlns="sap.m" xmlns:l="sap.ui.layout" xmlns:t="sap.ui.table" xmlns:ux="sap.ui.ux3"  xmlns:html="http://www.w3.org/1999/xhtml">  <App id="idAppControl">  <pages>  <mvc:XMLView viewName="sap.sls.inbox.view.TaskList" id="idViewMaster" />  </pages>   </App></mvc:View>

The test code is trying to grab the App (id="idAppControl") and check that at least one page is there

 // Act          Given.iStartMyAppInAFrame("../index.html");          When.waitFor({            viewNamespace: "view.",            viewName : "App",            id: "idAppControl",            matchers : new sap.ui.test.matchers.AggregationFilled({name : "pages"}),            success : function (aButtons) {              ok(true, "View found");            },            errorMessage : "The list did not contain any item"          });

still, also in this case, the framework seems unable to get hold of the App control, even though it's not nested.

when the test page is run, the application under test is showed successfully, so I guess there's some problem with control resolution

Any insight would be greatly appreciated

Thanks, regards

Vincenzo

 

Message was edited by: VINCENZO TURCO


Viewing all articles
Browse latest Browse all 8581


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>