Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't run in PhantomJS #26

Open
CyborgMaster opened this issue Aug 11, 2016 · 1 comment
Open

Can't run in PhantomJS #26

CyborgMaster opened this issue Aug 11, 2016 · 1 comment

Comments

@CyborgMaster
Copy link

I use Ripple in combination with PhanomJS and Capybara to write automated tests for our Phonegap app. This worked great up through Ripple version 0.9.28. 0.9.29 introduced a new technique
for overriding native browser properties that doesn't work on PhantomJS. At
https://github.com/ripple-emulator/ripple/blob/0.9.29/lib/client/emulatorBridge.js#L81
it uses Object.defineProperty (before it just used =). One of the properties that is overridden is 'name'. This works in Chrome, but not in PhantomJS. (There is an open issue for PhantomJS here ariya/phantomjs#13895, but no progress has been made on it in 6 months).

Is there any way Ripple could use a different property name other than name, or possibly go back to using = for name? Then I could start using PhantomJS again for tests.

@TimBarham
Copy link
Member

Unfortunately we found that to consistently patch the properties Ripple needs to patch, it needs to the Object.defineProperty (various properties fail otherwise).

I'm not sure in what context name is getting set (in the situation you're looking at, what object is it a property of?), but pretty much all the properties Ripple sets are replacing existing properties or defining properties that plugins expect and so can't be renamed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants