general: better test out
This commit is contained in:
@@ -93,16 +93,16 @@ struct MenuBarContentView: View {
|
|||||||
|
|
||||||
private var onboardingIncompleteView: some View {
|
private var onboardingIncompleteView: some View {
|
||||||
VStack(alignment: .leading, spacing: 0) {
|
VStack(alignment: .leading, spacing: 0) {
|
||||||
// Header
|
// Version info
|
||||||
HStack {
|
HStack {
|
||||||
Image(systemName: "eye.fill")
|
Spacer()
|
||||||
.font(.title2)
|
Text("v\(Bundle.main.object(forInfoDictionaryKey: "CFBundleShortVersionString") as? String ?? "0.0.0")")
|
||||||
.foregroundColor(.accentColor)
|
.font(.caption)
|
||||||
Text("Gaze")
|
.foregroundColor(.secondary)
|
||||||
.font(.title2)
|
Spacer()
|
||||||
.fontWeight(.semibold)
|
|
||||||
}
|
}
|
||||||
.padding()
|
.padding(.horizontal, 8)
|
||||||
|
.padding(.vertical, 4)
|
||||||
|
|
||||||
Divider()
|
Divider()
|
||||||
|
|
||||||
@@ -143,6 +143,17 @@ struct MenuBarContentView: View {
|
|||||||
|
|
||||||
Divider()
|
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) {
|
Button(action: onQuit) {
|
||||||
HStack {
|
HStack {
|
||||||
Image(systemName: "power")
|
Image(systemName: "power")
|
||||||
@@ -167,16 +178,16 @@ struct MenuBarContentView: View {
|
|||||||
|
|
||||||
private func fullMenuBarView(timerEngine: TimerEngine) -> some View {
|
private func fullMenuBarView(timerEngine: TimerEngine) -> some View {
|
||||||
VStack(alignment: .leading, spacing: 0) {
|
VStack(alignment: .leading, spacing: 0) {
|
||||||
// Header
|
// Version info
|
||||||
HStack {
|
HStack {
|
||||||
Image(systemName: "eye.fill")
|
Spacer()
|
||||||
.font(.title2)
|
Text("v\(Bundle.main.object(forInfoDictionaryKey: "CFBundleShortVersionString") as? String ?? "0.0.0")")
|
||||||
.foregroundColor(.accentColor)
|
.font(.caption)
|
||||||
Text("Gaze")
|
.foregroundColor(.secondary)
|
||||||
.font(.title2)
|
Spacer()
|
||||||
.fontWeight(.semibold)
|
|
||||||
}
|
}
|
||||||
.padding()
|
.padding(.horizontal, 8)
|
||||||
|
.padding(.vertical, 4)
|
||||||
|
|
||||||
Divider()
|
Divider()
|
||||||
|
|
||||||
@@ -266,6 +277,17 @@ struct MenuBarContentView: View {
|
|||||||
|
|
||||||
Divider()
|
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
|
// Quit
|
||||||
Button(action: onQuit) {
|
Button(action: onQuit) {
|
||||||
HStack {
|
HStack {
|
||||||
|
|||||||
19
run
19
run
@@ -98,12 +98,27 @@ if [ "$ACTION" = "build" ]; then
|
|||||||
|
|
||||||
elif [ "$ACTION" = "test" ]; then
|
elif [ "$ACTION" = "test" ]; then
|
||||||
echo "Running unit tests..."
|
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!"
|
echo "✅ Tests passed!"
|
||||||
else
|
else
|
||||||
echo "❌ Tests failed!"
|
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
|
exit 1
|
||||||
fi
|
fi
|
||||||
elif [ "$ACTION" = "run" ]; then
|
elif [ "$ACTION" = "run" ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user