test: 통합 테스트 오류 및 경고 수정
Some checks failed
Flutter Test & Quality Check / Test on macos-latest (push) Has been cancelled
Flutter Test & Quality Check / Test on ubuntu-latest (push) Has been cancelled
Flutter Test & Quality Check / Build APK (push) Has been cancelled

- 모든 서비스 메서드 시그니처를 실제 구현에 맞게 수정
- TestDataGenerator 제거하고 직접 객체 생성으로 변경
- 모델 필드명 및 타입 불일치 수정
- 불필요한 Either 패턴 사용 제거
- null safety 관련 이슈 해결

수정된 파일:
- test/integration/screens/company_integration_test.dart
- test/integration/screens/equipment_integration_test.dart
- test/integration/screens/user_integration_test.dart
- test/integration/screens/login_integration_test.dart
This commit is contained in:
JiWoong Sul
2025-08-05 20:24:05 +09:00
parent d6f34c0a52
commit 198aac6525
145 changed files with 41527 additions and 5220 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,67 @@
// ignore_for_file: avoid_print
import 'package:flutter_test/flutter_test.dart';
import 'package:get_it/get_it.dart';
import 'package:superport/di/injection_container.dart';
import 'package:superport/data/datasources/remote/api_client.dart';
import 'license_screen_test.dart';
import '../../framework/infrastructure/test_context.dart';
import '../../framework/infrastructure/report_collector.dart';
import '../../framework/core/api_error_diagnostics.dart';
import '../../framework/core/auto_fixer.dart' as auto_fixer;
import '../../framework/core/test_data_generator.dart';
void main() {
late LicenseScreenTest licenseScreenTest;
late GetIt getIt;
late ApiClient apiClient;
late TestContext testContext;
late ReportCollector reportCollector;
late ApiErrorDiagnostics errorDiagnostics;
late auto_fixer.ApiAutoFixer autoFixer;
late TestDataGenerator dataGenerator;
setUpAll(() async {
// 의존성 주입 초기화
getIt = GetIt.instance;
await setupDependencies();
// 테스트 컴포넌트 초기화
apiClient = getIt<ApiClient>();
testContext = TestContext();
reportCollector = ReportCollector();
errorDiagnostics = ApiErrorDiagnostics();
autoFixer = auto_fixer.ApiAutoFixer(diagnostics: errorDiagnostics);
dataGenerator = TestDataGenerator();
// 라이선스 화면 테스트 인스턴스 생성
licenseScreenTest = LicenseScreenTest(
apiClient: apiClient,
getIt: getIt,
testContext: testContext,
errorDiagnostics: errorDiagnostics,
autoFixer: autoFixer,
dataGenerator: dataGenerator,
reportCollector: reportCollector,
);
});
tearDownAll(() async {
// 정리 작업
await getIt.reset();
});
group('License Screen Tests', () {
test('should run all license screen tests', () async {
// 테스트 실행
final result = await licenseScreenTest.runTests();
// 결과 검증
expect(result, isNotNull);
expect(result.failedTests, equals(0), reason: '라이선스 화면 테스트 실패');
// 테스트 완료 출력
print('테스트 완료: ${result.totalTests}개 중 ${result.passedTests}개 성공');
});
});
}