Closed sJhonny-e closed 10 years ago
Fixed on f6615f08b3a7bb5a083b320780eabb7c48f1db5b. You are now able to use promise rejection handler in .then around calls to checkWindow or using a global wrapper - in order to call eyes.abortIfNotClosed. Next I plan to add a new method to eyes that receives the test code as a function in its arguments and does the whole eyes.open + close for you.
eyes._failureReports = 'Immediate';
, and change the lineelement(by.model('second')).sendKeys(2);
toelement(by.model('second')).sendKeys(4);
expected: your test will fail with a nice error message actual: the process crashes with
Uncaught exception: Mismatch found in 'Simple Protractor Test' of 'jhonnys'
This is because of a mistake in handling the immediate error in
EyesBase.prototype.checkWindow
: for some reason, the linereturn deferred.reject("Mismatch found in '" + this._sessionStartInfo.scenarioIdOrName + "' of '" +...
causes the app to crash (I have no idea why), instead of returning a rejected promise to the caller. I've found that replacing thedeferred.reject
withthrow
solves the issue:throw "Mismatch found in '" + this._sessionStartInfo.scenarioIdOrName + "' of '" +...
below are the complete execution logs from running the same failing test with and without that change:
original:
with above fix: