Some refactoring of the view tests