Weird behavior with zombie while running cucumber-js examples

143 views
Skip to first unread message

Loic Giraudel

unread,
Feb 19, 2014, 5:57:26 AM2/19/14
to zomb...@googlegroups.com
Hi,

I'm trying to run the sample example from the cucumber-js Readme.md (https://github.com/cucumber/cucumber-js#usage) but I have a weird behavior with zombie (?). Sometimes it seems to work, sometimes it doesn't.

To try to understand, I've set debug mode in zombie instanciation :
  this.browser = new zombie({debug: true});

My 3 files (myFeature.feature, support/world.js and step_definitions/myStepDefinitions.js) are just copy/paste from the example.

Here's a working run :
$ cucumber.js
Zombie: Opened window http://github.com/cucumber/cucumber-js 
Zombie: GET http://github.com/cucumber/cucumber-js => 301 https://github.com/cucumber/cucumber-js
Zombie: GET http://github.com/cucumber/cucumber-js => 200
Zombie: Loaded document https://github.com/cucumber/cucumber-js
Zombie: GET https://github.global.ssl.fastly.net/assets/github-6b7bd560c0991d6b250d7e58de8a56752605497f.js => 200
Zombie: GET https://github.global.ssl.fastly.net/assets/frameworks-e8d62aa911c75d1d60662859d52c3cf1232675e6.js => 200
.P-


1 scenario (1 pending)
3 steps (1 pending, 1 skipped, 1 passed)


Here's a failing run :
$ cucumber.js
Zombie: Opened window http://github.com/cucumber/cucumber-js 
Zombie: GET http://github.com/cucumber/cucumber-js => 301 https://github.com/cucumber/cucumber-js
Zombie: GET http://github.com/cucumber/cucumber-js => 200
Zombie: Loaded document https://github.com/cucumber/cucumber-js
Zombie: GET https://github.global.ssl.fastly.net/assets/github-6b7bd560c0991d6b250d7e58de8a56752605497f.js => 200
Zombie: GET https://github.global.ssl.fastly.net/assets/frameworks-e8d62aa911c75d1d60662859d52c3cf1232675e6.js => 200
Zombie: Fired timeout after 0ms delay
Cannot call method 'call' of undefined TypeError: Cannot call method 'call' of undefined
    at e
.matchesSelector (<anonymous>:3:20985)
    at e
.matches (<anonymous>:3:23696)
    at r 
(<anonymous>:11:18802)
    at t 
(<anonymous>:11:20354)
    at 
DOMWindow.window._evaluate (/usr/local/lib/node_modules/zombie/lib/zombie/window.js:189:23)
    at 
/usr/local/lib/node_modules/zombie/lib/zombie/eventloop.js:346:35
    at 
Object._onImmediate (/usr/local/lib/node_modules/zombie/lib/zombie/eventloop.js:143:11)
    at processImmediate 
[as _immediateCallback] (timers.js:330:15)
F
--


(::) failed steps (::)


TypeError: Cannot call method 'call' of undefined
    at e
.matchesSelector (<anonymous>:3:20985)
    at e
.matches (<anonymous>:3:23696)
    at r 
(<anonymous>:11:18802)
    at t 
(<anonymous>:11:20354)
    at 
DOMWindow.window._evaluate (/usr/local/lib/node_modules/zombie/lib/zombie/window.js:189:23)
    at 
/usr/local/lib/node_modules/zombie/lib/zombie/eventloop.js:346:35
    at 
Object._onImmediate (/usr/local/lib/node_modules/zombie/lib/zombie/eventloop.js:143:11)
    at processImmediate 
[as _immediateCallback] (timers.js:330:15)


Failing scenarios:
/home/sites/sfPortal/features/myFeature.feature:6 # Scenario: Reading documentation


1 scenario (1 failed)
3 steps (1 failed, 2 skipped)

If you have any idea about why it's failing (most of the time, unfortunatelly), I'm really interested.

Regards,

Assaf Arkin

unread,
Feb 19, 2014, 1:01:44 PM2/19/14
to Loic Giraudel, zomb...@googlegroups.com
Since what you’re testing here is effectively the Github Web site, with its thousands of lines of JS code, all of which are uglified and compressed, it might take awhile to find why this happens.

Suggest you start with a smaller, easier to manage codebase.


--
You received this message because you are subscribed to the Google Groups "zombie.js" group.
To unsubscribe from this group and stop receiving emails from it, send an email to zombie-js+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

–––––

Subscribe to Weekend Reading, a newsletter about design, code, startup life and the occasional odd

Reply all
Reply to author
Forward
0 new messages