In order to write integration tests that can test for hidden elements (aka use `visible: true` and `visible: false`) we need to upgrade from RackTest to Poltergeist.
This will be used to test the effect of print stylesheets being developed for this Trello card: https://trello.com/c/88zaXS8J/47-create-print-styles-for-official-documents
After adding Poltergeist, memory caching in Capybara was turned on by default. This meant that some tests were ocassionally failing when they were visiting the same path. In our case, if `government_navigation_test.rb` ran before `phase_label_test.rb`, then the second test would fail. The first test would visit `"/government/case-studies/get-britain-building-carlisle-park"` and cache it. Consequently, the second test would fail with an error that wouldn't obviously indicate caching is the problem.
Expected false to be truthy.
bin/rails test test/integration/phase_label_test.rb:4
Finished in 3.388734s, 0.5902 runs/s, 0.5902 assertions/s.
Due to it taking a while to figure the cause, caching in Capybara has been turned off by default. This is how it's being done:
Caching can be turned on for specific tests if necessary.