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:
@@ -125,10 +125,6 @@ class LicenseListController extends ChangeNotifier {
|
||||
}
|
||||
|
||||
_applySearchFilter();
|
||||
|
||||
if (!isInitialLoad) {
|
||||
_currentPage++;
|
||||
}
|
||||
} catch (e) {
|
||||
_error = e.toString();
|
||||
} finally {
|
||||
@@ -170,7 +166,14 @@ class LicenseListController extends ChangeNotifier {
|
||||
_filteredLicenses = List.from(_licenses);
|
||||
} else {
|
||||
_filteredLicenses = _licenses.where((license) {
|
||||
return license.name.toLowerCase().contains(_searchQuery.toLowerCase());
|
||||
final productName = license.productName?.toLowerCase() ?? '';
|
||||
final licenseKey = license.licenseKey.toLowerCase();
|
||||
final vendor = license.vendor?.toLowerCase() ?? '';
|
||||
final searchLower = _searchQuery.toLowerCase();
|
||||
|
||||
return productName.contains(searchLower) ||
|
||||
licenseKey.contains(searchLower) ||
|
||||
vendor.contains(searchLower);
|
||||
}).toList();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -141,24 +141,30 @@ class _LicenseListRedesignState extends State<LicenseListRedesign> {
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text('총 $totalCount개 라이선스', style: ShadcnTheme.bodyMuted),
|
||||
Row(
|
||||
children: [
|
||||
ShadcnButton(
|
||||
text: '새로고침',
|
||||
onPressed: _loadLicenses,
|
||||
variant: ShadcnButtonVariant.secondary,
|
||||
icon: Icon(Icons.refresh),
|
||||
),
|
||||
const SizedBox(width: ShadcnTheme.spacing2),
|
||||
ShadcnButton(
|
||||
text: '라이선스 추가',
|
||||
onPressed: _navigateToAdd,
|
||||
variant: ShadcnButtonVariant.primary,
|
||||
textColor: Colors.white,
|
||||
icon: Icon(Icons.add),
|
||||
),
|
||||
],
|
||||
Expanded(
|
||||
child: Text('총 $totalCount개 라이선스', style: ShadcnTheme.bodyMuted),
|
||||
),
|
||||
Flexible(
|
||||
child: Wrap(
|
||||
spacing: ShadcnTheme.spacing2,
|
||||
runSpacing: ShadcnTheme.spacing2,
|
||||
alignment: WrapAlignment.end,
|
||||
children: [
|
||||
ShadcnButton(
|
||||
text: '새로고침',
|
||||
onPressed: _loadLicenses,
|
||||
variant: ShadcnButtonVariant.secondary,
|
||||
icon: Icon(Icons.refresh),
|
||||
),
|
||||
ShadcnButton(
|
||||
text: '라이선스 추가',
|
||||
onPressed: _navigateToAdd,
|
||||
variant: ShadcnButtonVariant.primary,
|
||||
textColor: Colors.white,
|
||||
icon: Icon(Icons.add),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -216,7 +222,7 @@ class _LicenseListRedesignState extends State<LicenseListRedesign> {
|
||||
child: Text('등록일', style: ShadcnTheme.bodyMedium),
|
||||
),
|
||||
Expanded(
|
||||
flex: 1,
|
||||
flex: 2,
|
||||
child: Text('관리', style: ShadcnTheme.bodyMedium),
|
||||
),
|
||||
],
|
||||
@@ -308,34 +314,48 @@ class _LicenseListRedesignState extends State<LicenseListRedesign> {
|
||||
),
|
||||
// 관리
|
||||
Expanded(
|
||||
flex: 1,
|
||||
flex: 2,
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
IconButton(
|
||||
icon: Icon(
|
||||
Icons.edit,
|
||||
size: 16,
|
||||
color: ShadcnTheme.primary,
|
||||
Flexible(
|
||||
child: IconButton(
|
||||
constraints: const BoxConstraints(
|
||||
minWidth: 32,
|
||||
minHeight: 32,
|
||||
),
|
||||
padding: EdgeInsets.zero,
|
||||
icon: Icon(
|
||||
Icons.edit,
|
||||
size: 16,
|
||||
color: ShadcnTheme.primary,
|
||||
),
|
||||
onPressed:
|
||||
license.id != null
|
||||
? () => _navigateToEdit(license.id!)
|
||||
: null,
|
||||
tooltip: '수정',
|
||||
),
|
||||
onPressed:
|
||||
license.id != null
|
||||
? () => _navigateToEdit(license.id!)
|
||||
: null,
|
||||
tooltip: '수정',
|
||||
),
|
||||
IconButton(
|
||||
icon: Icon(
|
||||
Icons.delete,
|
||||
size: 16,
|
||||
color: ShadcnTheme.destructive,
|
||||
Flexible(
|
||||
child: IconButton(
|
||||
constraints: const BoxConstraints(
|
||||
minWidth: 32,
|
||||
minHeight: 32,
|
||||
),
|
||||
padding: EdgeInsets.zero,
|
||||
icon: Icon(
|
||||
Icons.delete,
|
||||
size: 16,
|
||||
color: ShadcnTheme.destructive,
|
||||
),
|
||||
onPressed:
|
||||
license.id != null
|
||||
? () =>
|
||||
_showDeleteDialog(license.id!)
|
||||
: null,
|
||||
tooltip: '삭제',
|
||||
),
|
||||
onPressed:
|
||||
license.id != null
|
||||
? () =>
|
||||
_showDeleteDialog(license.id!)
|
||||
: null,
|
||||
tooltip: '삭제',
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user