Remove obsolete test files and unused HomeScreenView
Cleaned up old MyCribTests directory containing outdated unit tests that have been replaced by the comprehensive XCUITest suite in MyCribUITests. Also removed unused HomeScreenView that was replaced by RootView. Removed files: - iosApp/MyCribTests/*.swift: Old unit tests (11 files) - iosApp/iosApp/HomeScreenView.swift: Replaced by RootView The new XCUITest suite provides better coverage with end-to-end UI tests that validate actual user interactions rather than isolated unit tests. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -1,96 +0,0 @@
|
||||
import SwiftUI
|
||||
import ComposeApp
|
||||
|
||||
struct HomeScreenView: View {
|
||||
@StateObject private var viewModel = ResidenceViewModel()
|
||||
@StateObject private var loginViewModel = LoginViewModel()
|
||||
|
||||
var body: some View {
|
||||
NavigationView {
|
||||
ZStack {
|
||||
Color(.systemGroupedBackground)
|
||||
.ignoresSafeArea()
|
||||
|
||||
if viewModel.isLoading {
|
||||
VStack(spacing: AppSpacing.lg) {
|
||||
ProgressView()
|
||||
.scaleEffect(1.2)
|
||||
Text("Loading...")
|
||||
.font(.body)
|
||||
.foregroundColor(Color(.secondaryLabel))
|
||||
}
|
||||
} else {
|
||||
ScrollView(showsIndicators: false) {
|
||||
VStack(spacing: AppSpacing.xl) {
|
||||
// Greeting Header
|
||||
VStack(alignment: .leading, spacing: AppSpacing.xs) {
|
||||
Text("Hello!")
|
||||
.font(.title.weight(.bold))
|
||||
.fontWeight(.bold)
|
||||
.foregroundColor(Color(.label))
|
||||
|
||||
Text("Welcome to MyCrib")
|
||||
.font(.body)
|
||||
.foregroundColor(Color(.secondaryLabel))
|
||||
}
|
||||
.frame(maxWidth: .infinity, alignment: .leading)
|
||||
.padding(.horizontal, AppSpacing.md)
|
||||
.padding(.top, AppSpacing.md)
|
||||
|
||||
// Overview Card
|
||||
if let summary = viewModel.residenceSummary {
|
||||
OverviewCard(summary: summary.summary)
|
||||
.transition(.scale.combined(with: .opacity))
|
||||
}
|
||||
|
||||
// Navigation Cards
|
||||
VStack(spacing: AppSpacing.md) {
|
||||
NavigationLink(destination: ResidencesListView()) {
|
||||
HomeNavigationCard(
|
||||
icon: "house.fill",
|
||||
title: "Residences",
|
||||
subtitle: "Manage your properties"
|
||||
)
|
||||
}
|
||||
.buttonStyle(PlainButtonStyle())
|
||||
|
||||
NavigationLink(destination: AllTasksView()) {
|
||||
HomeNavigationCard(
|
||||
icon: "checkmark.circle.fill",
|
||||
title: "Tasks",
|
||||
subtitle: "View and manage all tasks"
|
||||
)
|
||||
}
|
||||
.buttonStyle(PlainButtonStyle())
|
||||
}
|
||||
.padding(.horizontal, AppSpacing.md)
|
||||
}
|
||||
.padding(.vertical, AppSpacing.md)
|
||||
}
|
||||
}
|
||||
}
|
||||
.navigationTitle("MyCrib")
|
||||
.navigationBarTitleDisplayMode(.inline)
|
||||
.toolbar {
|
||||
ToolbarItem(placement: .navigationBarTrailing) {
|
||||
Button(action: {
|
||||
loginViewModel.logout()
|
||||
}) {
|
||||
HStack(spacing: AppSpacing.xs) {
|
||||
Image(systemName: "rectangle.portrait.and.arrow.right")
|
||||
.font(.system(size: 18, weight: .semibold))
|
||||
}
|
||||
.foregroundColor(.red)
|
||||
}
|
||||
}
|
||||
}
|
||||
.onAppear {
|
||||
viewModel.loadResidenceSummary()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#Preview {
|
||||
HomeScreenView()
|
||||
}
|
||||
Reference in New Issue
Block a user