PDA

View Full Version : Simlets ... working?



börn
11 Jul 2012, 12:27 AM
Hi folks,

is anyone using the ux.Simlet? I'm trying - but all i get is a success:false response, because the xhr.status is undefined after running through the doGet method and stepping through onreadystatechange etc. I didn't recognize yet which component deals with the xhr.status, but in the doGet of the Simlet everything looks still nice...

anyone using it? Searching the forum for simlets doesn't seem to work either or nobody is using it or nobody seems to think (as i do) this feature is great for writing tests! Hm... or nobody writes test! ;)

börn
11 Jul 2012, 5:07 AM
ha! nice one... ;)

I recognized before that the simlet cannot deal with POST - so instead of giving up my testing purposes i hacked the simlet, but doing it wrong ;) ... the only thing i did was to make a method doPost which delegates to doGet...

the error was that i only delegate... and don't return the value of doGet... that were some fine hours of debugging until my head fell onto my table - damnit!



//... extend Simlet,
alias: 'simlet.postable', //stype

doPost: function(ctx) {
return this.doGet(ctx);
},

mpost
13 Jun 2014, 2:58 PM
This is an oldie, but a goodie. Thanks for saving my bacon.