refactored and added settings page test cases