zombie and sso redirect

31 views
Skip to first unread message

Alex Bogatu

unread,
Sep 29, 2014, 6:44:59 AM9/29/14
to zomb...@googlegroups.com
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

as...@labnotes.org

unread,
Sep 29, 2014, 1:21:51 PM9/29/14
to zomb...@googlegroups.com
There are many ways to redirect a browser, and redirects may depend on many other conditions. It’s impossible to answer this question without any specifics.


10x

--
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/d/optout.

Reply all
Reply to author
Forward
0 new messages