Issue with angularJs 1.0.2 I created simple directive that binds to click event on element. I tried to unittest it with testacular var linked; beforeEach(inject(function($rootScope, $compile) { scope = $rootScope.$new(); var widget_definition = ‘<a href=”path” my-directive=””>click here</a>’; linked = $compile(widget_definition);
Continue readingTag: angular-scenario
Getting "Frame window is not acessible" while calling custom DSL
Issue I grabbed Angular Seed project and modified its scenario test. I’m trying a really simple test, so I believe it’s something I’m missing. Here is the DSL and Scenario spec: angular.scenario.dsl(‘customDsl’, function() { return function(selector) { return this.addFutureAction(‘customDsl’, function
Continue readingAngularjs e2e testing past/future comparisons
Issue I’m currently trying to figure out if there is a way to do a simple future/past comparison ex. 1) Check state of list by getting list length 2) Perform action which if success increments the list 3) Compare the
Continue readingHow to assert the page title using AngularJS Scenario
Issue I tried the following but got an error : expect undefined toBe “/” browser().navigateTo(‘/’); expect(browser().location().url()).toBe(“/”); expect(document.title).toBe(“something”); Page does have a title “something”. Solution Since the test website runs in a frame, document.title would not work. However, you can use
Continue readingHow to use Angular Scenario Runner to run a subset of the test suite?
Issue I am developing an application based on TDD. For the server-side everything is fine as Python test runner are great. For JS, I start using mocha which is also great. I have wrote my first tests with Karma and
Continue readingIncluding angular-scenario.js breaks my Rails Jasmine tests, as in they don't run
Issue I have some Jasmine tests for my (currently) very simple site consisting of a Rails back end and an AngularJS front end. I’m trying to do some Jasmine end-to-end testing, but including angular-scenario.js makes my tests not run. It
Continue readingTrouble with Karma + AngularJS Scenario Test Runner and a form
Issue Ok, I’m having issues with my Test Runner where it is filling out the fields on the form but when I then submit the forms it refers to these fields as blank. If I write to the field using
Continue readingIs it possible to mix Testacular (Karma) with angular-scenario?
Issue Testacular (now Karma) is awesome, so is angular-scenario. Using them together is proving a challenge however. There is an ANGULAR-SCENARIO-ADAPTER in Testacular, but that breaks simple tests. If you include angular-scenario.js yourself Testacular will run no tests at all.
Continue readingTesting a non-trivial AngularJS app with Karma
Issue I’ve been writing attempting to setup a testing suite for an application that I’ve been developing. The app is hosted locally, and on most accounts works fine. I’ve tried to setup karma via the instructions on AngularJS’s site, and
Continue readingAngularjs e2e testing with scenario test runner – ignore alert()
Issue I’m creating the e2e test for my application and I have a problem when I’m testing the login page. I want to test both the correct login and the incorrect one but the problem is that when you enter
Continue readingAngular Karma e2e with Grunt
Issue I am trying to test In the grunt file karma: { e2e: { configFile: ‘karma-e2e.conf.js’, singleRun: true } }, Karma file is basically what Yeoman generated for me. Only change is I swithed Chrome for PhantomJS. karma-e2e.conf.js: // Karma
Continue readingangularjs add a model layer
Issue I am using angular with rails backend and I am using $resource to interact backend API. so I have a User service which is a $resource instance App.factory(‘User’, [‘$resource’, function($resource) { return $resource(‘/users/:id’,{id: ‘@id’}); }]) Now I can use
Continue readingHow to use angular-scenario with requirejs
Issue Angular-scenario works well when your angular app is ready on DOM ready. Is not the case when using requirejs or an other AMD lib. How to add support for AMD in angular-scenario? Solution What you have to do is
Continue readingTestacular does not run e2e test
Issue Once again I have problems running my angularJS e2e test with testacular. This time the output is Chrome 23.0: Executed 0 of 13 (skipped 13) SUCCESS (0.117 secs / 0 secs) info: Disconnecting all browsers no test are run,
Continue readingOrder of execution of AngularJS E2E tests
Issue So, I noticed that the it() functions inside describe() blocks don’t (always) run in the order I wrote them. Are they asynchronous then? And how to force them to run in a certain order ? I want to chain
Continue reading