Hello!
I am trying to use zombie js and mocha for a couple of tests that include some sso logins. The problem is that after hitting the authenticate button the '.then()' callback fires way to early.
Here is the relevant snippet of code:
it('Authenticate', function(done) {
var browser = this.browser;
browser.fill('INPUT#login.input-text', '<username>');
browser.fill('INPUT#login.input-text', '<password>');
console.log("Browser location: " + browser.location);
browser.clickLink('autentificare').then(function() {
console.log("Browser location: " + browser.location);
assert.ok(browser.success);
assert.equal(browser.text('title'), 'Orange - contul meu');
}).then(done, done);
});
The console.log function returns the same locations. In the second case it should return the new location after the redirect. I also used 'wait' but with no success...
The exact same problem is reported here:
http://aaronfay.ca/2012/08/28/zombiejs-sucks/Is there really a problem in the way zombie is handling sso redirects or am i missing something?
10x