general: better test out
This commit is contained in:
@@ -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 {
|
||||
|
||||
19
run
19
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
|
||||
|
||||
Reference in New Issue
Block a user