test: 통합 테스트 오류 및 경고 수정
- 모든 서비스 메서드 시그니처를 실제 구현에 맞게 수정 - 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:
@@ -47,11 +47,11 @@ class AuthRemoteDataSourceImpl implements AuthRemoteDataSource {
|
||||
if (responseData is Map && responseData['success'] == true && responseData['data'] != null) {
|
||||
DebugLogger.logLogin('응답 형식 1 감지', data: {'format': 'wrapped'});
|
||||
|
||||
// 응답 데이터 구조 검증
|
||||
// 응답 데이터 구조 검증 (snake_case 키 확인)
|
||||
final dataFields = responseData['data'] as Map<String, dynamic>;
|
||||
DebugLogger.validateResponseStructure(
|
||||
dataFields,
|
||||
['accessToken', 'refreshToken', 'user'],
|
||||
['access_token', 'refresh_token', 'user'],
|
||||
responseName: 'LoginResponse.data',
|
||||
);
|
||||
|
||||
@@ -78,10 +78,10 @@ class AuthRemoteDataSourceImpl implements AuthRemoteDataSource {
|
||||
responseData.containsKey('access_token'))) {
|
||||
DebugLogger.logLogin('응답 형식 2 감지', data: {'format': 'direct'});
|
||||
|
||||
// 응답 데이터 구조 검증
|
||||
// 응답 데이터 구조 검증 (snake_case 키 확인)
|
||||
DebugLogger.validateResponseStructure(
|
||||
responseData as Map<String, dynamic>,
|
||||
['accessToken', 'refreshToken', 'user'],
|
||||
['access_token', 'refresh_token', 'user'],
|
||||
responseName: 'LoginResponse',
|
||||
);
|
||||
|
||||
@@ -151,7 +151,7 @@ class AuthRemoteDataSourceImpl implements AuthRemoteDataSource {
|
||||
// 기본 DioException 처리
|
||||
if (e.response?.statusCode == 401) {
|
||||
return Left(AuthenticationFailure(
|
||||
message: '이메일 또는 비밀번호가 올바르지 않습니다.',
|
||||
message: '자격 증명이 올바르지 않습니다. 이메일과 비밀번호를 확인해주세요.',
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user