Re: [angular.js] E2e test unit, trouble with angular-scenario.js

936 views
Skip to first unread message

Misko Hevery

unread,
Jun 6, 2012, 8:19:46 PM6/6/12
to ang...@googlegroups.com
any way you could reproduce the issue on http://plunker.no.de/ Hard to debug without a broken example

On Wed, Jun 6, 2012 at 2:52 AM, Cedric <cedric....@gmail.com> wrote:
Hello everybody,
I'm using angular since about a month now and i'm amazed of it's simplicity.
I have wrote a little application, and i'm trying to write a set of test before extending it.
All unit test worked but when i tried to implement e2e test i have troubles
When i launch my runner.html, the result is 

browser navigate to 'test-index.html'
http://localhost:3000/scenarios.js:9:9

TypeError: Cannot call method 'invoke' of undefined
    at http://localhost:3000/wizard/lib/js/angular/angular-scenario.js:23869:15
    at angularInit (http://localhost:3000/wizard/lib/js/angular/angular-scenario.js:10308:5)
    at [object Object].executeAction (http://localhost:3000/wizard/lib/js/angular/angular-scenario.js:23861:3)
    at HTMLIFrameElement.<anonymous> (http://localhost:3000/wizard/lib/js/angular/angular-scenario.js:23836:14)

My runner.html look like that
<!doctype html>
<html lang="en">
  <head>
    <title>End2end Test Runner</title>
    <script src="wizard/lib/js/angular/angular-scenario.js" ng-autotest></script>
    <script src="scenarios.js"></script>
  </head>
  <body ng-app="">
  </body>
</html>

And my scenario.js is like that

 
'use strict';

/* http://docs.angularjs.org/guide/dev_guide.e2e-testing */


describe('Testing my App', function () {

    it('trying to launch the application in the test runner', function () {
        browser().navigateTo('test-index.html');
    });
});

I'am pretty sure i'm doing something wrong but i cannot find what.
Does anyone can help me?

Thank you
Cédric Clavier

 

--
You received this message because you are subscribed to the Google Groups "AngularJS" group.
To view this discussion on the web visit https://groups.google.com/d/msg/angular/-/lZvIkM7AXrsJ.
To post to this group, send email to ang...@googlegroups.com.
To unsubscribe from this group, send email to angular+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/angular?hl=en.

Cédric Clavier

unread,
Jun 7, 2012, 3:39:38 AM6/7/12
to ang...@googlegroups.com
Thank you Misko for answerring me
I've done a planker with the most simple app that doesn't work


2012/6/7 Misko Hevery <mi...@hevery.com>

Javier Carrasco

unread,
Jan 16, 2013, 4:41:11 AM1/16/13
to ang...@googlegroups.com, cedric....@gmail.com
Did you find how to solve it?
I have the same problem.

Thank you
Javi

Adam Parrish

unread,
Jan 16, 2013, 11:48:41 AM1/16/13
to ang...@googlegroups.com, cedric....@gmail.com
Hey Cedric

I think the way I am doing this is by navigating to "/" instead of the test-index, or I will navigate to /someRoute. 

Have you tried that?

-Adam

Javi

unread,
Jan 17, 2013, 6:33:41 AM1/17/13
to ang...@googlegroups.com, cedric....@gmail.com
It only happens to me when using javascript loaders like https://github.com/angular/angular-seed/blob/master/app/index-async.html 

But works perfect when using a minified single file.

Javi


2013/1/16 Adam Parrish <wapa...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "AngularJS" group.
To post to this group, send email to ang...@googlegroups.com.
To unsubscribe from this group, send email to angular+u...@googlegroups.com.

mariusz....@gmail.com

unread,
Jul 18, 2013, 4:34:05 PM7/18/13
to ang...@googlegroups.com, cedric....@gmail.com
I had the same error message and it was because of a silly mistake - i had "angular-scenario.js" included in my index.html
   <script src="bower_components/angular-scenario/angular-scenario.js"></script>
after removing it, all the tests passed.


Thanks,
Mariusz
Reply all
Reply to author
Forward
0 new messages