Prevent intermittent test timing issues

We use this function to open preview links (or other links which would
normally open in a new tab) because capybara does not support following
links which open a new browser window. When using the javascript enabled
driver (poltergeist) there can be timing issues if we don't wait for the
page to load before attempting to click the preview link.

Adding this `page.has_css?` ensures that capybara waits for that link to
be present on the page before proceeding to try to open the link.