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:
@@ -0,0 +1,21 @@
|
||||
---
|
||||
name: UI test sharing flow bugs
|
||||
description: MultiUserSharingUITests reveal real app bugs in the join residence and data refresh flows
|
||||
type: project
|
||||
---
|
||||
|
||||
MultiUserSharingUITests (8 tests) expose real UI bugs:
|
||||
|
||||
**test01-03, 05, 08 fail** because after User B joins a shared residence via the JoinResidenceView UI:
|
||||
- The join sheet may not dismiss (test01 fails at "Join sheet should dismiss")
|
||||
- The residence list doesn't refresh to show the newly joined residence
|
||||
- Tasks and documents from User A don't appear in User B's views
|
||||
|
||||
**Root cause candidates:**
|
||||
1. `JoinResidenceView.joinResidence()` calls `viewModel.joinWithCode()` which on success calls `onJoined()` → `viewModel.loadMyResidences()` but WITHOUT `forceRefresh: true`, so the cached empty list is returned
|
||||
2. The `ResidencesListView.onAppear` also calls `loadMyResidences()` without `forceRefresh`, hitting cache
|
||||
3. The join sheet dismissal might fail silently if the API call returns an error
|
||||
|
||||
**Why:** Fix the `onJoined` callback in `ResidencesListView.swift` line 97 to call `viewModel.loadMyResidences(forceRefresh: true)` instead of `viewModel.loadMyResidences()`.
|
||||
|
||||
**How to apply:** These tests should NOT be worked around with API verification. They correctly test the user's experience. Fix the app, not the tests.
|
||||
Reference in New Issue
Block a user