Refactored widget tests