Rearchitect UI test suite for complete, non-flaky coverage against live API
- Migrate Suite4-10, SmokeTests, NavigationCriticalPathTests to AuthenticatedTestCase with seeded admin account and real backend login - Add 34 accessibility identifiers across 11 app views (task completion, profile, notifications, theme, join residence, manage users, forms) - Create FeatureCoverageTests (14 tests) covering previously untested features: profile edit, theme selection, notification prefs, task completion, manage users, join residence, task templates - Create MultiUserSharingTests (18 API tests) and MultiUserSharingUITests (8 XCUI tests) for full cross-user residence sharing lifecycle - Add cleanup infrastructure: SuiteZZ_CleanupTests auto-wipes test data after runs, cleanup_test_data.sh script for manual reset via admin API - Add share code API methods to TestAccountAPIClient (generateShareCode, joinWithCode, getShareCode, listResidenceUsers, removeUser) - Fix app bugs found by tests: - ResidencesListView join callback now uses forceRefresh:true - APILayer invalidates task cache when residence count changes - AllTasksView auto-reloads tasks when residence list changes - Fix test quality: keyboard focus waits, Save/Add button label matching, Documents tab label (Docs), remove API verification from UI tests - DataLayerTests and PasswordResetTests now verify through UI, not API calls Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -77,6 +77,7 @@ struct JoinResidenceView: View {
|
||||
RoundedRectangle(cornerRadius: 16, style: .continuous)
|
||||
.stroke(isCodeFocused ? Color.appPrimary : Color.appTextSecondary.opacity(0.15), lineWidth: 1.5)
|
||||
)
|
||||
.accessibilityIdentifier("JoinResidence.ShareCodeField")
|
||||
.onChange(of: shareCode) { _, newValue in
|
||||
if newValue.count > 6 {
|
||||
shareCode = String(newValue.prefix(6))
|
||||
@@ -133,6 +134,7 @@ struct JoinResidenceView: View {
|
||||
y: 5
|
||||
)
|
||||
}
|
||||
.accessibilityIdentifier("JoinResidence.JoinButton")
|
||||
.disabled(shareCode.count != 6 || viewModel.isLoading)
|
||||
|
||||
// Cancel Button
|
||||
|
||||
@@ -68,6 +68,7 @@ struct ManageUsersView: View {
|
||||
.padding(.bottom)
|
||||
}
|
||||
}
|
||||
.accessibilityIdentifier("ManageUsers.UsersList")
|
||||
}
|
||||
}
|
||||
.listStyle(.plain)
|
||||
|
||||
@@ -94,7 +94,7 @@ struct ResidencesListView: View {
|
||||
}
|
||||
.sheet(isPresented: $showingJoinResidence) {
|
||||
JoinResidenceView(onJoined: {
|
||||
viewModel.loadMyResidences()
|
||||
viewModel.loadMyResidences(forceRefresh: true)
|
||||
})
|
||||
}
|
||||
.sheet(isPresented: $showingUpgradePrompt) {
|
||||
@@ -226,6 +226,7 @@ private struct ResidencesContent: View {
|
||||
}
|
||||
.padding(.bottom, OrganicSpacing.airy)
|
||||
}
|
||||
.accessibilityIdentifier(AccessibilityIdentifiers.Residence.residencesList)
|
||||
.safeAreaInset(edge: .bottom) {
|
||||
Color.clear.frame(height: 0)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user