How can I unit test different views for the below scenario
.state('app.sr.product.upload', {
name: 'upload',
url: '/upload',
data: {
tags: [],
userCommunities: []
},
views: {
"productView@app.sr.product": {
templateUrl: 'views/upload/upload.html',
controller: 'UploadCtrl',
controllerAs: 'ul'
},
"tags@app.sr.product.upload": {
templateUrl: 'views/tags/tags.html',
controller: 'TagsCtrl',
controllerAs: 'vm'
},
"UserCommunityPanel@app.sr.product.upload": {
templateUrl: 'views/user-community/user-community.html',
controller: 'UserCommunityCtrl',
controllerAs: 'ul'
},
}
})
If my view is
tags@app.sr.product.upload
then how can I test that my controller is TagsCtrl, my controllerAs value is vm etc??How can I unit test if my state is
app.sr.product.upload
thendata.tags=[], data.userCommunities=[]
etc.
I searched for lot of docs and tutorials but didnt get it .
Any help is appreciable. Thanks
I am the index
");` – TwitchBronBron Mar 19 '16 at 13:03