Add onboarding UI tests and improve app data management
- Add Suite0_OnboardingTests with fresh install and login test flows - Add accessibility identifiers to onboarding views for UI testing - Remove deprecated DataCache in favor of unified DataManager - Update API layer to support public upgrade-triggers endpoint - Improve onboarding first task view with better date handling - Update various views with accessibility identifiers for testing - Fix subscription feature comparison view layout - Update document detail view improvements 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -3,9 +3,10 @@ import ComposeApp
|
||||
|
||||
struct ResidenceDetailView: View {
|
||||
let residenceId: Int32
|
||||
|
||||
|
||||
@StateObject private var viewModel = ResidenceViewModel()
|
||||
@StateObject private var taskViewModel = TaskViewModel()
|
||||
@ObservedObject private var dataManager = DataManagerObservable.shared
|
||||
|
||||
// Use TaskViewModel's state instead of local state
|
||||
private var tasksResponse: TaskColumnsResponse? { taskViewModel.tasksResponse }
|
||||
@@ -15,7 +16,7 @@ struct ResidenceDetailView: View {
|
||||
@State private var contractors: [ContractorSummary] = []
|
||||
@State private var isLoadingContractors = false
|
||||
@State private var contractorsError: String?
|
||||
|
||||
|
||||
@State private var showAddTask = false
|
||||
@State private var showEditResidence = false
|
||||
@State private var showEditTask = false
|
||||
@@ -37,7 +38,7 @@ struct ResidenceDetailView: View {
|
||||
|
||||
// Check if current user is the owner of the residence
|
||||
private func isCurrentUserOwner(of residence: ResidenceResponse) -> Bool {
|
||||
guard let currentUser = ComposeApp.DataCache.shared.currentUser.value else {
|
||||
guard let currentUser = dataManager.currentUser else {
|
||||
return false
|
||||
}
|
||||
return Int(residence.ownerId) == Int(currentUser.id)
|
||||
|
||||
Reference in New Issue
Block a user