juliemr / protractor-demo

Demo test application and protractor tests
MIT License
166 stars 139 forks source link

Update for Protractor v3.x.x #22

Open michaelvashchinsky opened 8 years ago

michaelvashchinsky commented 8 years ago

Hello.

Is it possible to update the examples to Protractor v3.x.x?

For example, the code in ScreenshotReporter does not work there.

Although I haven't tested it thoroughly, those changed made it work:

// var originalAddMatcherResult = jasmine.Spec.prototype. addMatcherResult;
var originalAddMatcherResult = jasmine.Spec.prototype.addExpectationResult;
jasmine.Spec.prototype.addExpectationResult = function() {
    ++index;
        // if (!arguments[0].passed()) {
    if (!arguments[1].passed) {
        screenshot(this.description, index);
    }
    return originalAddMatcherResult.apply(this, arguments);
};

Thank you