lundi 5 mars 2018

Configure PhantomJS in an Ember App

I'm working on an ember addon leveraging a library (PDF.js) that relies on inline styling to build DOM over a PDF rendering to enable text selection in an inline PDF viewing experience.

I can run tests in the browser and check against inline-styling just fine, however if I run them with ember exam or ember test within PhantomJS (currently headless chrome isn't supported via our tooling), the style attribute is never applied. I've verified this by printing this.$()[0].innerHTML from the test and seeing there's no style attribute.

I noticed that this stripping of inline styling is supported via the web security flag in PhantomJS, either through the settings config or command line interface, and is, by default, set to be enforced. Seeing as my application's CSP allows for inline styling, I want to test for my use case with similar settings.

Is there any way to supply PhantomJS a config or args through ember cli?




Aucun commentaire:

Enregistrer un commentaire