Wait until page is load Zombie testing node

497 views Asked by At

While executing this test I allways get a timeout error. I need to uncomment the this.timeout function in order to get this working properly...I thought the done callback was called when page was loaded..

describe('home page', function() {
    //this.timeout(20500);
    before(function() {
        this.server = http.createServer(app).listen(3001);
        this.browser = new Browser({
            site: 'http://localhost:3000'
        });
    });

    // load the contact page before each test
    before(function(done) {
        this.browser.visit('/', done);
    });

    it('should show contact a form', function() {
        assert.ok(this.browser.success);
        assert.equal(this.browser.text('h1'), 'hello');
        assert.equal(this.browser.text('form label'), 'First NameLast NameEmailMessage');

    })});
0

There are 0 answers