applitools / Eyes.Protractor

Applitools Eyes SDK For Protactor
Apache License 2.0
7 stars 3 forks source link

Eyes always crashes when it's disabled #5

Closed sJhonny-e closed 9 years ago

sJhonny-e commented 9 years ago

happened to me on the latest npm version (0.0.26); I set eyes to be disabled, and ran 'checkWindow'. however, Eyes.protractor always checks the result from base.checkWindow:

https://github.com/applitools/Eyes.Protractor/blob/master/src/Eyes.js#L125

but if eyes is disabled, "resolve" is called without parameters: https://github.com/applitools/Eyes.Sdk.JavaScript/blob/master/src/EyesBase.js#L511 , which causes the caller to crash.

zavelevsky commented 9 years ago

When isDisabled is true there should be no implications to using eyes - i.e. avoid overriding Protractor's globals and wrapping ElementFinder. Also eyes API methods should not perform any actual action.

zavelevsky commented 9 years ago

fixed. Now checking whether the SDK is disabled and avoiding unnecessary actions and overriding of globals. commit cbf4b4c03e56dfb4567becb6d12fe58ecc0ab0b4