Howto test the ModalController ?
Modal service for AngularJS - supports creating popups and modals via a service.
Brought to you by:
evanfcrane
Originally created by: campa
Hi can you help me writing unit test for modal controllers ?
I tried but I'm not able to solve these errors:
PLease, can you add a controller test to your complexcontroller example ?
My interesting part of the test code is:
beforeEach(inject(function ($controller, $rootScope) {
scope = $rootScope.$new();
PartsEditmenudialogctrlCtrl = $controller('PartsEditmenudialogctrlCtrl', {
$scope: scope
});
and for the controller
.controller('PartsEditmenudialogctrlCtrl', [ '$route', '$scope' , '$log', 'growl', 'MainMenuService', '$element', 'close', 'currMainMenuEditData',
function ($route, $scope, $log, growl, MainMenuService, $element, close, currMainMenuEditData) {
Thanks in advance
Stefano
View and moderate all "tickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: dwmkerr
I'll write up a quite tutorial ASAP @campa and then update this article, (@dwmkerr see also [#7])
Related
Tickets:
#7View and moderate all "tickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: sajadghobadi
@campa : did you solve problem ?
View and moderate all "tickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: sajadghobadi
first define below line
after write mentioned lines in before function you donot see this error
View and moderate all "tickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: PratibhaP
I also have the same issue, the only difference is that using custom modal, so, I don't need a $element.
Error: [$injector:unpr] Unknown provider: closeProvider <- close <- changePasswordController
while running unit testing. Can you help please me.
Thank you in advance.