Refactored widget tests.