From 268622327439eb2d3fc8a0a12e8de3c10b4480b3 Mon Sep 17 00:00:00 2001 From: Michael Freno Date: Thu, 15 Jan 2026 16:17:18 -0500 Subject: [PATCH] general: better test out --- Gaze/Views/MenuBar/MenuBarContentView.swift | 54 +++++++++++++++------ run | 19 +++++++- 2 files changed, 55 insertions(+), 18 deletions(-) diff --git a/Gaze/Views/MenuBar/MenuBarContentView.swift b/Gaze/Views/MenuBar/MenuBarContentView.swift index ddf3f51..0d275ce 100644 --- a/Gaze/Views/MenuBar/MenuBarContentView.swift +++ b/Gaze/Views/MenuBar/MenuBarContentView.swift @@ -93,16 +93,16 @@ struct MenuBarContentView: View { private var onboardingIncompleteView: some View { VStack(alignment: .leading, spacing: 0) { - // Header + // Version info HStack { - Image(systemName: "eye.fill") - .font(.title2) - .foregroundColor(.accentColor) - Text("Gaze") - .font(.title2) - .fontWeight(.semibold) + Spacer() + Text("v\(Bundle.main.object(forInfoDictionaryKey: "CFBundleShortVersionString") as? String ?? "0.0.0")") + .font(.caption) + .foregroundColor(.secondary) + Spacer() } - .padding() + .padding(.horizontal, 8) + .padding(.vertical, 4) Divider() @@ -143,6 +143,17 @@ struct MenuBarContentView: View { Divider() + // Version info + HStack { + Spacer() + Text("v\(Bundle.main.object(forInfoDictionaryKey: "CFBundleShortVersionString") as? String ?? "0.0.0")") + .font(.caption) + .foregroundColor(.secondary) + Spacer() + } + .padding(.horizontal, 8) + .padding(.vertical, 4) + Button(action: onQuit) { HStack { Image(systemName: "power") @@ -167,16 +178,16 @@ struct MenuBarContentView: View { private func fullMenuBarView(timerEngine: TimerEngine) -> some View { VStack(alignment: .leading, spacing: 0) { - // Header + // Version info HStack { - Image(systemName: "eye.fill") - .font(.title2) - .foregroundColor(.accentColor) - Text("Gaze") - .font(.title2) - .fontWeight(.semibold) + Spacer() + Text("v\(Bundle.main.object(forInfoDictionaryKey: "CFBundleShortVersionString") as? String ?? "0.0.0")") + .font(.caption) + .foregroundColor(.secondary) + Spacer() } - .padding() + .padding(.horizontal, 8) + .padding(.vertical, 4) Divider() @@ -266,6 +277,17 @@ struct MenuBarContentView: View { Divider() + // Version info + HStack { + Spacer() + Text("v\(Bundle.main.object(forInfoDictionaryKey: "CFBundleShortVersionString") as? String ?? "0.0.0")") + .font(.caption) + .foregroundColor(.secondary) + Spacer() + } + .padding(.horizontal, 8) + .padding(.vertical, 4) + // Quit Button(action: onQuit) { HStack { diff --git a/run b/run index f2eb87e..7cf157f 100755 --- a/run +++ b/run @@ -98,12 +98,27 @@ if [ "$ACTION" = "build" ]; then elif [ "$ACTION" = "test" ]; then echo "Running unit tests..." - run_with_output "xcodebuild -project Gaze.xcodeproj -scheme Gaze -configuration Debug test" + VERBOSE=true - if [ $? -eq 0 ]; then + # Run tests and capture output + TEST_OUTPUT=$(xcodebuild -project Gaze.xcodeproj -scheme Gaze -configuration Debug test 2>&1) + TEST_EXIT_CODE=$? + + # Display the test output + echo "$TEST_OUTPUT" + + # Check if tests passed or failed + if [ $TEST_EXIT_CODE -eq 0 ]; then echo "✅ Tests passed!" else echo "❌ Tests failed!" + + # Extract and display failing tests in a pretty format + echo "" + echo "📝 Failed Tests:" + echo "================" + echo "$TEST_OUTPUT" | grep -E "(FAIL|Error|failed)" | sed 's/^/ • /' + echo "================" exit 1 fi elif [ "$ACTION" = "run" ]; then