refactoring tests view