Skip to Content

How to unit test sapui5 controls ?

Apr 26 at 06:47 PM


avatar image
Former Member

Hi All, I am trying to write a unit test for the following code. Please guide the appropriate approach. This code was in the controller and moved it into the utility file so we can reuse it. How can I stub aSearchFormControls and do some assertion test? How can I stub controls and pass them as parameters in method enableControls() where their property setEnabled set to true which later I can test with assertions test.

 aSearchFormControls = [
    enableControls: function enableControls(aSearchFormControls ) {
            aControls.forEach(function enable(oControl) {
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers