Ok so my last fix broke another part of my application. I override setup in Siesta.Test.Browser, with authentication information. It seems that the url in pageUrl is called first before the my setup override, how do I fix this?
Switching to this function causes my Test to go through the chain before the webpage is ready.
Note: This is only after making a single change of the function name from setup to earlySetup in my override class. I can see in the siesta UI that it jumps through the chain even before the site loads in the preview window.
Class('MyProject.MyTestClass', {
isa : Siesta.Test.Browser,
override : {
earlySetup : function (callback, errback) {
this.SUPER(function () {
//We want authentication before every Test
Ext.Ajax.request({
url: '/auth/login',
method: 'POST',
params: {
username: 'username',
password: 'password'
},
success: function (res) {
callback();
},
failure: function () {
errback('Login Failed');
}
});
}, errback)
}
}
})
I guess what I really need to do is figure out why siesta can't find the page after setUrl is called instead of trying to find a work around for it. How can I assist with this?