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:
@@ -799,7 +799,6 @@ class _EquipmentListRedesignState extends State<EquipmentListRedesign> {
|
||||
),
|
||||
),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
// 체크박스
|
||||
SizedBox(
|
||||
@@ -815,28 +814,28 @@ class _EquipmentListRedesignState extends State<EquipmentListRedesign> {
|
||||
child: Text('번호', style: ShadcnTheme.bodyMedium),
|
||||
),
|
||||
// 제조사
|
||||
SizedBox(
|
||||
width: 150,
|
||||
Expanded(
|
||||
flex: 2,
|
||||
child: Text('제조사', style: ShadcnTheme.bodyMedium),
|
||||
),
|
||||
// 장비명
|
||||
SizedBox(
|
||||
width: 150,
|
||||
Expanded(
|
||||
flex: 2,
|
||||
child: Text('장비명', style: ShadcnTheme.bodyMedium),
|
||||
),
|
||||
// 카테고리
|
||||
SizedBox(
|
||||
width: 150,
|
||||
Expanded(
|
||||
flex: 2,
|
||||
child: Text('카테고리', style: ShadcnTheme.bodyMedium),
|
||||
),
|
||||
// 상세 정보 (조건부)
|
||||
if (_showDetailedColumns) ...[
|
||||
SizedBox(
|
||||
width: 150,
|
||||
Expanded(
|
||||
flex: 2,
|
||||
child: Text('시리얼번호', style: ShadcnTheme.bodyMedium),
|
||||
),
|
||||
SizedBox(
|
||||
width: 150,
|
||||
Expanded(
|
||||
flex: 2,
|
||||
child: Text('바코드', style: ShadcnTheme.bodyMedium),
|
||||
),
|
||||
],
|
||||
@@ -846,29 +845,29 @@ class _EquipmentListRedesignState extends State<EquipmentListRedesign> {
|
||||
child: Text('수량', style: ShadcnTheme.bodyMedium),
|
||||
),
|
||||
// 상태
|
||||
SizedBox(
|
||||
width: 80,
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: Text('상태', style: ShadcnTheme.bodyMedium),
|
||||
),
|
||||
// 날짜
|
||||
SizedBox(
|
||||
width: 100,
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: Text('날짜', style: ShadcnTheme.bodyMedium),
|
||||
),
|
||||
// 출고 정보 (조건부 - 테이블에 출고/대여 항목이 있을 때만)
|
||||
if (_showDetailedColumns && pagedEquipments.any((e) => e.status == EquipmentStatus.out || e.status == EquipmentStatus.rent)) ...[
|
||||
SizedBox(
|
||||
width: 150,
|
||||
Expanded(
|
||||
flex: 2,
|
||||
child: Text('회사', style: ShadcnTheme.bodyMedium),
|
||||
),
|
||||
SizedBox(
|
||||
width: 100,
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: Text('담당자', style: ShadcnTheme.bodyMedium),
|
||||
),
|
||||
],
|
||||
// 관리
|
||||
SizedBox(
|
||||
width: 100,
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: Text('관리', style: ShadcnTheme.bodyMedium),
|
||||
),
|
||||
],
|
||||
@@ -891,7 +890,6 @@ class _EquipmentListRedesignState extends State<EquipmentListRedesign> {
|
||||
),
|
||||
),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
// 체크박스
|
||||
SizedBox(
|
||||
@@ -910,8 +908,8 @@ class _EquipmentListRedesignState extends State<EquipmentListRedesign> {
|
||||
),
|
||||
),
|
||||
// 제조사
|
||||
SizedBox(
|
||||
width: 150,
|
||||
Expanded(
|
||||
flex: 2,
|
||||
child: Text(
|
||||
equipment.equipment.manufacturer,
|
||||
style: ShadcnTheme.bodySmall,
|
||||
@@ -919,8 +917,8 @@ class _EquipmentListRedesignState extends State<EquipmentListRedesign> {
|
||||
),
|
||||
),
|
||||
// 장비명
|
||||
SizedBox(
|
||||
width: 150,
|
||||
Expanded(
|
||||
flex: 2,
|
||||
child: Text(
|
||||
equipment.equipment.name,
|
||||
style: ShadcnTheme.bodySmall,
|
||||
@@ -928,22 +926,22 @@ class _EquipmentListRedesignState extends State<EquipmentListRedesign> {
|
||||
),
|
||||
),
|
||||
// 카테고리
|
||||
SizedBox(
|
||||
width: 150,
|
||||
Expanded(
|
||||
flex: 2,
|
||||
child: _buildCategoryWithTooltip(equipment),
|
||||
),
|
||||
// 상세 정보 (조건부)
|
||||
if (_showDetailedColumns) ...[
|
||||
SizedBox(
|
||||
width: 150,
|
||||
Expanded(
|
||||
flex: 2,
|
||||
child: Text(
|
||||
equipment.equipment.serialNumber ?? '-',
|
||||
style: ShadcnTheme.bodySmall,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
width: 150,
|
||||
Expanded(
|
||||
flex: 2,
|
||||
child: Text(
|
||||
equipment.equipment.barcode ?? '-',
|
||||
style: ShadcnTheme.bodySmall,
|
||||
@@ -960,8 +958,8 @@ class _EquipmentListRedesignState extends State<EquipmentListRedesign> {
|
||||
),
|
||||
),
|
||||
// 상태
|
||||
SizedBox(
|
||||
width: 80,
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: ShadcnBadge(
|
||||
text: _getStatusDisplayText(
|
||||
equipment.status,
|
||||
@@ -973,8 +971,8 @@ class _EquipmentListRedesignState extends State<EquipmentListRedesign> {
|
||||
),
|
||||
),
|
||||
// 날짜
|
||||
SizedBox(
|
||||
width: 100,
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: Text(
|
||||
equipment.date.toString().substring(0, 10),
|
||||
style: ShadcnTheme.bodySmall,
|
||||
@@ -982,8 +980,8 @@ class _EquipmentListRedesignState extends State<EquipmentListRedesign> {
|
||||
),
|
||||
// 출고 정보 (조건부)
|
||||
if (_showDetailedColumns && pagedEquipments.any((e) => e.status == EquipmentStatus.out || e.status == EquipmentStatus.rent)) ...[
|
||||
SizedBox(
|
||||
width: 150,
|
||||
Expanded(
|
||||
flex: 2,
|
||||
child: Text(
|
||||
equipment.status == EquipmentStatus.out || equipment.status == EquipmentStatus.rent
|
||||
? _controller.getOutEquipmentInfo(equipment.id!, 'company')
|
||||
@@ -992,8 +990,8 @@ class _EquipmentListRedesignState extends State<EquipmentListRedesign> {
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
width: 100,
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: Text(
|
||||
equipment.status == EquipmentStatus.out || equipment.status == EquipmentStatus.rent
|
||||
? _controller.getOutEquipmentInfo(equipment.id!, 'manager')
|
||||
@@ -1004,25 +1002,46 @@ class _EquipmentListRedesignState extends State<EquipmentListRedesign> {
|
||||
),
|
||||
],
|
||||
// 관리 버튼
|
||||
SizedBox(
|
||||
width: 140,
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
IconButton(
|
||||
icon: const Icon(Icons.history, size: 16),
|
||||
onPressed: () => _handleHistory(equipment),
|
||||
tooltip: '이력',
|
||||
Flexible(
|
||||
child: IconButton(
|
||||
constraints: const BoxConstraints(
|
||||
minWidth: 30,
|
||||
minHeight: 30,
|
||||
),
|
||||
padding: const EdgeInsets.all(4),
|
||||
icon: const Icon(Icons.history, size: 16),
|
||||
onPressed: () => _handleHistory(equipment),
|
||||
tooltip: '이력',
|
||||
),
|
||||
),
|
||||
IconButton(
|
||||
icon: const Icon(Icons.edit_outlined, size: 16),
|
||||
onPressed: () => _handleEdit(equipment),
|
||||
tooltip: '편집',
|
||||
Flexible(
|
||||
child: IconButton(
|
||||
constraints: const BoxConstraints(
|
||||
minWidth: 30,
|
||||
minHeight: 30,
|
||||
),
|
||||
padding: const EdgeInsets.all(4),
|
||||
icon: const Icon(Icons.edit_outlined, size: 16),
|
||||
onPressed: () => _handleEdit(equipment),
|
||||
tooltip: '편집',
|
||||
),
|
||||
),
|
||||
IconButton(
|
||||
icon: const Icon(Icons.delete_outline, size: 16),
|
||||
onPressed: () => _handleDelete(equipment),
|
||||
tooltip: '삭제',
|
||||
Flexible(
|
||||
child: IconButton(
|
||||
constraints: const BoxConstraints(
|
||||
minWidth: 30,
|
||||
minHeight: 30,
|
||||
),
|
||||
padding: const EdgeInsets.all(4),
|
||||
icon: const Icon(Icons.delete_outline, size: 16),
|
||||
onPressed: () => _handleDelete(equipment),
|
||||
tooltip: '삭제',
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user