Handling preview screen on c9 when testing react using nightmarejs


we’re trying to work out how to test react apps with nightmarejs smoothly on c9. I’ve opened a ticket on github since the c9 community has this difficult habit of closing old tickets:

but we’d love input from anyone who has ideas about how to avoid the preview screen in automated tests. For some reason it isn’t a problem when we do automated acceptance tests with hound/phoenix …


Try setting custom user-agent.
If you open view source on the orange page, you’ll see a comment explaining this

If you see this when loading the page from a tool, where you can't 
click the button, do either of the following to skip this page
    - remove Mozilla and AppleWebKit strings from user-agent
    - add Headless or PhantomJS to user-agent
    - add cookie c9.live.user.click-through = ok
    - add origin, postman-token, or x-request-id header to the request
details of the current request:
GET / {