Fix post-registration navigation and add comprehensive registration UI tests
- Fix RegisterView to call AuthenticationManager.login() after email verification so user is properly transitioned to home screen instead of returning to login - Fix ResidencesListView to load data when authentication state becomes true, ensuring residences load after registration/login - Add accessibility identifier to verification code field for UI testing - Add NSAppTransportSecurity exceptions for localhost/127.0.0.1 for local dev - Add comprehensive XCUITest suite for registration flow including: - Form validation tests (empty fields, invalid email, mismatched passwords) - Full registration and verification flow test - Logout from verification screen test - Helper scripts for test user cleanup 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -106,7 +106,11 @@ struct ResidencesListView: View {
|
||||
.interactiveDismissDisabled()
|
||||
}
|
||||
.onChange(of: authManager.isAuthenticated) { isAuth in
|
||||
if !isAuth {
|
||||
if isAuth {
|
||||
// User just logged in or registered - load their residences
|
||||
viewModel.loadMyResidences()
|
||||
} else {
|
||||
// User logged out - clear data
|
||||
viewModel.myResidences = nil
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user