Friday, 15 May 2015

angularjs - Testacular Angular UI bootstrap 'directive' is required -


I'm trying to test a controller that uses the Kangaroo UI-Bootstrap communication command, but a < Strong> Error: Required argument 'instructions' error

This actually happens as I include the ui-bootstrap.min.js file in the Testicular Configuration.

The controller has been defined:

  Angular Modules ('xFormsEntries'). Controller ('xFormsEntryListCtrl', function ($ Radius, $ Dialog, Form, FormEntry, Form Field) {...   

The unit test is:

  Description ('Exformers Controllers', function) {first (each function ()} {this .addmatchers () (first) (formerly (module (' xFormsServices')); First (each module ('xFormsEntries')); Describe (' XFormsEntryListCtrl ', function () {var scope, ctrl, $ httpBackend, $ dialog; var formData = {formId: 1, name:' formname '}; apiURL =' '; // Override global API URL EforeEach (injection Function (_ $ httpBackend_, $ r OotScope, $ controller, _ $ dialog_) {// $ httpBackend = _ $ httpBackend_ Organize; $ HttpBackend.expectGET ('/ xFormsAPI / form') response (formData). $ Dialog = _ $ dialog_; scope = $ rootsecope. $ New (); Scope.formId = 1; Ctrl = $ Controller ('xFormsEntryListCtrl', {$ field: area});})); (This should get form from server ', function () (hopefully (Scope format format) .TB (undefined); $ httpBackend.flush (); Expect (scope format will be replaced). Twitter data (formadata);}); });   

All tests were passing before integrating UI-Bootstrap.

I previously (module ('ui.bootstrap'))

What magic is involved? I am missing it to do this work?

Have you included the dependency as well as the actual JS file?

Installation As soon as you have downloaded all the files and your page is included, you need to declare the dependency on the Ui.bootstrap module:

  Angular. Module ('myModule', ['ui.bootstrap']);    

No comments:

Post a Comment