Does Zombie's "hello world" example work?

Showing 1-1 of 1 messages
Does Zombie's "hello world" example work? robot1125 8/11/12 5:32 AM
By "hello world" example, I mean the generic app at the top of the main doc page.

I typed in the app text and only made one change - I modified the port to 3001 since 3000 is already in use on my system.  Thus I have this:

var Browser = require("zombie");
var assert = require("assert"); 

// Load the page from localhost
browser = new Browser()
browser.visit("http://localhost:3001/", function() { 

  // Fill email, password and submit form
    fill("email", "zombie@underworld.dead").
    fill("password", "eat-the-living").
    pressButton("Sign Me Up!", function() { 

      // Form submitted, new page loaded.
      assert.equal(browser.text("title"), "Welcome To Brains Depot"); 



The docs don't show an example form, so I used this:

        <title>Brains Depot Login</title>
        <form method="post">
                Email: <input name="email" /><br />
                Password: <input name="password" type="password" /><br />
                <input type="submit" value="Sign Me Up!" />

In a browser, you see this:

When you submit the form, you see this:

So the form itself is working.  Yet when I run the zombie app, I get this:

  return this.ownerDocument.parentWindow.browser.dispatchEvent(this, event);
TypeError: Cannot call method 'dispatchEvent' of undefined
    at Object.HTML.HTMLFormElement._dispatchSubmitEvent (/home/shane/node_modules/zombie/lib/zombie/forms.js:111:50)
    at (/home/shane/node_modules/zombie/lib/zombie/forms.js:136:23)
    at Object.define.proto.dispatchEvent (/home/shane/node_modules/zombie/node_modules/jsdom/lib/jsdom/level2/html.js:480:48)
    at EventLoop.dispatch (/home/shane/node_modules/zombie/lib/zombie/eventloop.js:135:40)
    at Object.Windows._create.window._evaluate (/home/shane/node_modules/zombie/lib/zombie/windows.js:271:23)
    at EventLoop.dispatch (/home/shane/node_modules/zombie/lib/zombie/eventloop.js:134:14)
    at EventLoop.perform (/home/shane/node_modules/zombie/lib/zombie/eventloop.js:120:5)
    at EventLoop.dispatch (/home/shane/node_modules/zombie/lib/zombie/eventloop.js:131:10)
    at Browser.dispatchEvent (/home/shane/node_modules/zombie/lib/zombie/browser.js:206:28)
    at (/home/shane/node_modules/zombie/lib/zombie/browser.js:201:10)

I see the GET request at the server (also when zombie debugging is enabled: "Zombie: GET http://localhost:3001/ => 200"), so I know zombie got the page with the form.

Any idea what I'm doing wrong?