Files
Reflect/Shared/Views/EmptyView.swift
Trey t 277e277750 Add XCUITest suite with 27 test files covering unmapped P1 test cases
- Add 8 new test files: HeaderMoodLogging (TC-002), DayViewGrouping (TC-019),
  AllDayViewStyles (TC-021), MonthViewInteraction (TC-030), PaywallGate
  (TC-032/039/048), AppTheme (TC-070), IconPack (TC-072),
  PremiumCustomization (TC-075)
- Add accessibility IDs for paywall overlays, icon packs, app theme cards,
  and day view section headers
- Add --expire-trial launch argument to UITestMode for paywall gate testing
- Update QA test plan spreadsheet with XCUITest names for 14 test cases
- Include existing test infrastructure: screen objects, helpers, base class,
  and 19 previously written test files

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 09:37:54 -06:00

58 lines
1.9 KiB
Swift

//
// EmptyView.swift
// Feels (iOS)
//
// Created by Trey Tartt on 2/10/22.
//
import SwiftUI
struct EmptyHomeView: View {
@AppStorage(UserDefaultsStore.Keys.theme.rawValue, store: GroupUserDefaults.groupDefaults) private var theme: Theme = .system
private var textColor: Color { theme.currentTheme.labelColor }
let showVote: Bool
let viewModel: DayViewViewModel?
var body: some View {
ZStack {
theme.currentTheme.secondaryBGColor
VStack {
if showVote {
AddMoodHeaderView(addItemHeaderClosure: { (mood, date) in
withAnimation {
viewModel?.add(mood: mood, forDate: date, entryType: .header)
}
})
} else {
VStack {
Spacer()
Text(String(localized: "view_no_data"))
.font(.title)
.padding()
.fixedSize(horizontal: false, vertical: true)
.foregroundColor(textColor)
.accessibilityIdentifier(AccessibilityID.DayView.emptyStateNoData)
Spacer()
}
}
}
.accessibilityIdentifier(AccessibilityID.DayView.emptyState)
}
.fixedSize(horizontal: false, vertical: true)
.cornerRadius(Constants.viewsCornerRaidus, corners: [.topLeft, .topRight, .bottomLeft, .bottomRight])
}
}
struct EmptyHomeView_Previews: PreviewProvider {
static var previews: some View {
Group {
EmptyHomeView(showVote: true, viewModel: DayViewViewModel(addMonthStartWeekdayPadding: false))
EmptyHomeView(showVote: false, viewModel: nil)
}
}
}