chore: import upstream snapshot with attribution

This commit is contained in:
wehub-resource-sync
2026-07-13 12:22:33 +08:00
commit fc4fcbab58
1848 changed files with 472303 additions and 0 deletions
@@ -0,0 +1,30 @@
import Testing
@testable import CodexBar
@Suite("Usage breakdown chart menu")
@MainActor
struct UsageBreakdownChartMenuViewTests {
@Test
func `valid totals remain visible when service rows are absent`() {
#expect(
UsageBreakdownChartMenuView.presentationState(
hasSummary: true,
hasChartPoints: false) == .totalsOnly)
}
@Test
func `service rows select the chart presentation`() {
#expect(
UsageBreakdownChartMenuView.presentationState(
hasSummary: true,
hasChartPoints: true) == .chart)
}
@Test
func `missing totals and service rows select the empty presentation`() {
#expect(
UsageBreakdownChartMenuView.presentationState(
hasSummary: false,
hasChartPoints: false) == .empty)
}
}