Skip to content

test: bring back transactional fixtures in js tests

azul requested to merge cleanup/test-fixtures into staging

As we are using rails 5.2 now we can use transactional fixtures in js tests without problems: "Rails 5.1+ "safely" shares the database connection between the app and test threads. Therefore, if using Rails 5.1+ you SHOULD be able to ignore this section." from Capybara Readme

Now we use fixtures :all in test_helper - so effectively everywhere. When we change the pageterms table we need to revert the changes after the test by loading pageterms from fixtures as the MyIsam table does not support transactional fixtures. In order to do this just call:

reset_page_terms_from_fixtures

Merge request reports