Add test for visibility of modal header

Capybara now waits for the modal header to dissapear before making other
assertions about the page.

See http://stackoverflow.com/questions/8801845/how-to-make-capybara-check-for-visibility-after-some-js-has-run