refactor: UI 화면 통합 및 불필요한 파일 정리
- 모든 *_redesign.dart 파일을 기본 화면 파일로 통합 - 백업용 컨트롤러 파일들 제거 (*_controller.backup.dart) - 사용하지 않는 예제 및 테스트 파일 제거 - Clean Architecture 적용 후 남은 정리 작업 완료 - 테스트 코드 정리 및 구조 개선 준비 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -117,7 +117,7 @@ class ErrorDiagnosis {
|
||||
'affectedEndpoints': affectedEndpoints,
|
||||
'serverErrorCode': serverErrorCode,
|
||||
'missingFields': missingFields,
|
||||
'typeMismatches': typeMismatches?.map(
|
||||
'typeMismatches': typeMismatches?.items.map(
|
||||
(key, value) => MapEntry(key, value.toJson()),
|
||||
),
|
||||
'originalMessage': originalMessage,
|
||||
@@ -225,7 +225,7 @@ class FixSuggestion {
|
||||
'fixId': fixId,
|
||||
'type': type.toString(),
|
||||
'description': description,
|
||||
'actions': actions.map((a) => a.toJson()).toList(),
|
||||
'actions': actions.items.map((a) => a.toJson()).toList(),
|
||||
'successProbability': successProbability,
|
||||
'isAutoFixable': isAutoFixable,
|
||||
'estimatedDuration': estimatedDuration,
|
||||
@@ -306,7 +306,7 @@ class FixResult {
|
||||
return {
|
||||
'fixId': fixId,
|
||||
'success': success,
|
||||
'executedActions': executedActions.map((a) => a.toJson()).toList(),
|
||||
'executedActions': executedActions.items.map((a) => a.toJson()).toList(),
|
||||
'executedAt': executedAt.toIso8601String(),
|
||||
'duration': duration,
|
||||
'error': error,
|
||||
@@ -405,7 +405,7 @@ class ErrorPattern {
|
||||
'patternId': patternId,
|
||||
'errorType': errorType.toString(),
|
||||
'matchingRules': matchingRules,
|
||||
'successfulFixes': successfulFixes.map((f) => f.toJson()).toList(),
|
||||
'successfulFixes': successfulFixes.items.map((f) => f.toJson()).toList(),
|
||||
'occurrenceCount': occurrenceCount,
|
||||
'lastOccurred': lastOccurred.toIso8601String(),
|
||||
'confidence': confidence,
|
||||
@@ -550,7 +550,7 @@ class RootCause {
|
||||
'description': description,
|
||||
'evidence': evidence,
|
||||
'diagnosis': diagnosis.toJson(),
|
||||
'recommendedFixes': recommendedFixes.map((f) => f.toJson()).toList(),
|
||||
'recommendedFixes': recommendedFixes.items.map((f) => f.toJson()).toList(),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,10 +24,10 @@ class TestReport {
|
||||
'reportId': reportId,
|
||||
'generatedAt': generatedAt.toIso8601String(),
|
||||
'type': type.toString(),
|
||||
'screenReports': screenReports.map((r) => r.toJson()).toList(),
|
||||
'screenReports': screenReports.items.map((r) => r.toJson()).toList(),
|
||||
'summary': summary.toJson(),
|
||||
'errorAnalyses': errorAnalyses.map((e) => e.toJson()).toList(),
|
||||
'performanceMetrics': performanceMetrics.map((m) => m.toJson()).toList(),
|
||||
'errorAnalyses': errorAnalyses.items.map((e) => e.toJson()).toList(),
|
||||
'performanceMetrics': performanceMetrics.items.map((m) => m.toJson()).toList(),
|
||||
'metadata': metadata,
|
||||
};
|
||||
}
|
||||
@@ -132,7 +132,7 @@ class ScreenTestReport {
|
||||
Map<String, dynamic> toJson() => {
|
||||
'screenName': screenName,
|
||||
'testResult': testResult.toJson(),
|
||||
'featureReports': featureReports.map((r) => r.toJson()).toList(),
|
||||
'featureReports': featureReports.items.map((r) => r.toJson()).toList(),
|
||||
'coverage': coverage,
|
||||
'recommendations': recommendations,
|
||||
};
|
||||
@@ -171,7 +171,7 @@ class FeatureReport {
|
||||
'failedTests': failedTests,
|
||||
'successRate': successRate,
|
||||
'totalDuration': totalDuration.inMilliseconds,
|
||||
'testCaseReports': testCaseReports.map((r) => r.toJson()).toList(),
|
||||
'testCaseReports': testCaseReports.items.map((r) => r.toJson()).toList(),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -201,7 +201,7 @@ class TestCaseReport {
|
||||
'duration': duration.inMilliseconds,
|
||||
'errorMessage': errorMessage,
|
||||
'stackTrace': stackTrace,
|
||||
'steps': steps.map((s) => s.toJson()).toList(),
|
||||
'steps': steps.items.map((s) => s.toJson()).toList(),
|
||||
'additionalInfo': additionalInfo,
|
||||
};
|
||||
}
|
||||
@@ -316,7 +316,7 @@ class ErrorAnalysis {
|
||||
'affectedScreens': affectedScreens,
|
||||
'affectedFeatures': affectedFeatures,
|
||||
'rootCause': rootCause?.toJson(),
|
||||
'suggestedFixes': suggestedFixes.map((f) => f.toJson()).toList(),
|
||||
'suggestedFixes': suggestedFixes.items.map((f) => f.toJson()).toList(),
|
||||
'wasAutoFixed': wasAutoFixed,
|
||||
'context': context,
|
||||
};
|
||||
@@ -424,7 +424,7 @@ class TestResult {
|
||||
'passedTests': passedTests,
|
||||
'failedTests': failedTests,
|
||||
'skippedTests': skippedTests,
|
||||
'failures': failures.map((f) => f.toJson()).toList(),
|
||||
'failures': failures.items.map((f) => f.toJson()).toList(),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -596,11 +596,11 @@ class BasicTestReport {
|
||||
'duration': duration.inMilliseconds,
|
||||
'environment': environment,
|
||||
'testResult': testResult.toJson(),
|
||||
'steps': steps.map((s) => s.toJson()).toList(),
|
||||
'errors': errors.map((e) => e.toJson()).toList(),
|
||||
'autoFixes': autoFixes.map((f) => f.toJson()).toList(),
|
||||
'features': features.map((k, v) => MapEntry(k, v.toJson())),
|
||||
'apiCalls': apiCalls.map((k, v) => MapEntry(k, v.map((c) => c.toJson()).toList())),
|
||||
'steps': steps.items.map((s) => s.toJson()).toList(),
|
||||
'errors': errors.items.map((e) => e.toJson()).toList(),
|
||||
'autoFixes': autoFixes.items.map((f) => f.toJson()).toList(),
|
||||
'features': features.items.map((k, v) => MapEntry(k, v.toJson())),
|
||||
'apiCalls': apiCalls.items.map((k, v) => MapEntry(k, v.items.map((c) => c.toJson()).toList())),
|
||||
'summary': summary,
|
||||
};
|
||||
}
|
||||
@@ -15,7 +15,7 @@ class ScreenMetadata {
|
||||
Map<String, dynamic> toJson() => {
|
||||
'screenName': screenName,
|
||||
'controllerType': controllerType.toString(),
|
||||
'relatedEndpoints': relatedEndpoints.map((e) => e.toJson()).toList(),
|
||||
'relatedEndpoints': relatedEndpoints.items.map((e) => e.toJson()).toList(),
|
||||
'screenCapabilities': screenCapabilities,
|
||||
};
|
||||
}
|
||||
@@ -267,7 +267,7 @@ class TestResult {
|
||||
this.endTime,
|
||||
});
|
||||
|
||||
bool get success => errors.isEmpty && featureResults.every((r) => r.success);
|
||||
bool get success => errors.items.isEmpty && featureResults.items.every((r) => r.success);
|
||||
bool get passed => success; // 호환성을 위한 별칭
|
||||
|
||||
Duration get duration => endTime != null
|
||||
@@ -277,37 +277,37 @@ class TestResult {
|
||||
// 테스트 카운트 관련 getter들
|
||||
int get totalTests => featureResults
|
||||
.expand((r) => r.testCaseResults)
|
||||
.length;
|
||||
.items.length;
|
||||
|
||||
int get passedTests => featureResults
|
||||
.expand((r) => r.testCaseResults)
|
||||
.where((r) => r.success)
|
||||
.length;
|
||||
.items.where((r) => r.success)
|
||||
.items.length;
|
||||
|
||||
int get failedTests => totalTests - passedTests;
|
||||
|
||||
void calculateMetrics() {
|
||||
metrics['totalFeatures'] = featureResults.length;
|
||||
metrics['successfulFeatures'] = featureResults.where((r) => r.success).length;
|
||||
metrics['failedFeatures'] = featureResults.where((r) => !r.success).length;
|
||||
metrics['totalFeatures'] = featureResults.items.length;
|
||||
metrics['successfulFeatures'] = featureResults.items.where((r) => r.success).items.length;
|
||||
metrics['failedFeatures'] = featureResults.items.where((r) => !r.success).items.length;
|
||||
metrics['totalTestCases'] = featureResults
|
||||
.expand((r) => r.testCaseResults)
|
||||
.length;
|
||||
.items.length;
|
||||
metrics['successfulTestCases'] = featureResults
|
||||
.expand((r) => r.testCaseResults)
|
||||
.where((r) => r.success)
|
||||
.length;
|
||||
.items.where((r) => r.success)
|
||||
.items.length;
|
||||
metrics['averageDuration'] = _calculateAverageDuration();
|
||||
}
|
||||
|
||||
double _calculateAverageDuration() {
|
||||
final allDurations = featureResults
|
||||
.expand((r) => r.testCaseResults)
|
||||
.map((r) => r.duration.inMilliseconds);
|
||||
.items.map((r) => r.duration.inMilliseconds);
|
||||
|
||||
if (allDurations.isEmpty) return 0;
|
||||
if (allDurations.items.isEmpty) return 0;
|
||||
|
||||
return allDurations.reduce((a, b) => a + b) / allDurations.length;
|
||||
return allDurations.reduce((a, b) => a + b) / allDurations.items.length;
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
@@ -316,8 +316,8 @@ class TestResult {
|
||||
'startTime': startTime.toIso8601String(),
|
||||
'endTime': endTime?.toIso8601String(),
|
||||
'duration': duration.inMilliseconds,
|
||||
'featureResults': featureResults.map((r) => r.toJson()).toList(),
|
||||
'errors': errors.map((e) => e.toJson()).toList(),
|
||||
'featureResults': featureResults.items.map((r) => r.toJson()).toList(),
|
||||
'errors': errors.items.map((e) => e.toJson()).toList(),
|
||||
'metrics': metrics,
|
||||
};
|
||||
}
|
||||
@@ -336,27 +336,27 @@ class FeatureTestResult {
|
||||
this.endTime,
|
||||
});
|
||||
|
||||
bool get success => testCaseResults.every((r) => r.success);
|
||||
bool get success => testCaseResults.items.every((r) => r.success);
|
||||
|
||||
Duration get duration => endTime != null
|
||||
? endTime!.difference(startTime)
|
||||
: Duration.zero;
|
||||
|
||||
void calculateMetrics() {
|
||||
metrics['totalTestCases'] = testCaseResults.length;
|
||||
metrics['successfulTestCases'] = testCaseResults.where((r) => r.success).length;
|
||||
metrics['failedTestCases'] = testCaseResults.where((r) => !r.success).length;
|
||||
metrics['totalTestCases'] = testCaseResults.items.length;
|
||||
metrics['successfulTestCases'] = testCaseResults.items.where((r) => r.success).items.length;
|
||||
metrics['failedTestCases'] = testCaseResults.items.where((r) => !r.success).items.length;
|
||||
metrics['averageDuration'] = _calculateAverageDuration();
|
||||
}
|
||||
|
||||
double _calculateAverageDuration() {
|
||||
if (testCaseResults.isEmpty) return 0;
|
||||
if (testCaseResults.items.isEmpty) return 0;
|
||||
|
||||
final totalMs = testCaseResults
|
||||
.map((r) => r.duration.inMilliseconds)
|
||||
.items.map((r) => r.duration.inMilliseconds)
|
||||
.reduce((a, b) => a + b);
|
||||
|
||||
return totalMs / testCaseResults.length;
|
||||
return totalMs / testCaseResults.items.length;
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
@@ -365,7 +365,7 @@ class FeatureTestResult {
|
||||
'startTime': startTime.toIso8601String(),
|
||||
'endTime': endTime?.toIso8601String(),
|
||||
'duration': duration.inMilliseconds,
|
||||
'testCaseResults': testCaseResults.map((r) => r.toJson()).toList(),
|
||||
'testCaseResults': testCaseResults.items.map((r) => r.toJson()).toList(),
|
||||
'metrics': metrics,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user