I've a form with a text box and ui-select drop downs, on ng-blur event I'm calling a method to auto select the options in all the three ui-selects. When I do this using protractor e2e tests it is not waiting for the ui-selects to happen and submitting the form which is throwing exception as it is not finding the element that would be appeared only after submitting the form with all the required fields. I've tried browser.wait like this
browser.wait(()=>{
expect(element(by.model('cntrl.selectOne')) ).toEqual('OneFirst');
expect(element(by.model('cntrl.selectTwo')) ).toEqual('TwoFirst');
},2000)
it is throwing exception.