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:
@@ -121,14 +121,14 @@ class InteractiveSearchTest {
|
||||
result['tests'].add({
|
||||
'name': '빈 검색어 조회',
|
||||
'status': companies != null ? 'PASS' : 'FAIL',
|
||||
'count': companies?.length ?? 0,
|
||||
'count': companies?.items.length ?? 0,
|
||||
});
|
||||
print(' 결과: ${companies?.length ?? 0}개 회사 조회됨');
|
||||
print(' 결과: ${companies?.items.length ?? 0}개 회사 조회됨');
|
||||
|
||||
// 2. 특정 검색어 테스트
|
||||
if (companies != null && companies.isNotEmpty) {
|
||||
final testCompany = companies.first;
|
||||
final searchKeyword = testCompany.name.substring(0, testCompany.name.length > 3 ? 3 : testCompany.name.length);
|
||||
final searchKeyword = testCompany.name.substring(0, testCompany.name.items.length > 3 ? 3 : testCompany.name.items.length);
|
||||
|
||||
print('테스트 2: "$searchKeyword" 검색어로 조회');
|
||||
companies = await companyService.getCompanies(
|
||||
@@ -137,7 +137,7 @@ class InteractiveSearchTest {
|
||||
search: searchKeyword,
|
||||
);
|
||||
|
||||
final hasMatch = companies?.any((c) =>
|
||||
final hasMatch = companies?.items.any((c) =>
|
||||
c.name.toLowerCase().contains(searchKeyword.toLowerCase())
|
||||
) ?? false;
|
||||
|
||||
@@ -145,9 +145,9 @@ class InteractiveSearchTest {
|
||||
'name': '검색어 필터링',
|
||||
'status': hasMatch ? 'PASS' : 'FAIL',
|
||||
'keyword': searchKeyword,
|
||||
'count': companies?.length ?? 0,
|
||||
'count': companies?.items.length ?? 0,
|
||||
});
|
||||
print(' 결과: ${companies?.length ?? 0}개 회사 조회됨 (매칭: $hasMatch)');
|
||||
print(' 결과: ${companies?.items.length ?? 0}개 회사 조회됨 (매칭: $hasMatch)');
|
||||
}
|
||||
|
||||
// 3. 특수문자 검색 테스트
|
||||
@@ -161,7 +161,7 @@ class InteractiveSearchTest {
|
||||
result['tests'].add({
|
||||
'name': '특수문자 검색',
|
||||
'status': 'PASS',
|
||||
'count': companies?.length ?? 0,
|
||||
'count': companies?.items.length ?? 0,
|
||||
});
|
||||
print(' 결과: 에러 없이 처리됨');
|
||||
} catch (e) {
|
||||
@@ -185,7 +185,7 @@ class InteractiveSearchTest {
|
||||
result['tests'].add({
|
||||
'name': '긴 검색어',
|
||||
'status': 'PASS',
|
||||
'keywordLength': longKeyword.length,
|
||||
'keywordLength': longKeyword.items.length,
|
||||
});
|
||||
print(' 결과: 에러 없이 처리됨');
|
||||
} catch (e) {
|
||||
@@ -208,9 +208,9 @@ class InteractiveSearchTest {
|
||||
result['tests'].add({
|
||||
'name': '한글 검색',
|
||||
'status': 'PASS',
|
||||
'count': companies?.length ?? 0,
|
||||
'count': companies?.items.length ?? 0,
|
||||
});
|
||||
print(' 결과: ${companies?.length ?? 0}개 회사 조회됨');
|
||||
print(' 결과: ${companies?.items.length ?? 0}개 회사 조회됨');
|
||||
} catch (e) {
|
||||
result['tests'].add({
|
||||
'name': '한글 검색',
|
||||
@@ -248,14 +248,14 @@ class InteractiveSearchTest {
|
||||
result['tests'].add({
|
||||
'name': '빈 검색어 조회',
|
||||
'status': users != null ? 'PASS' : 'FAIL',
|
||||
'count': users?.length ?? 0,
|
||||
'count': users?.items.length ?? 0,
|
||||
});
|
||||
print(' 결과: ${users?.length ?? 0}명 사용자 조회됨');
|
||||
print(' 결과: ${users?.items.length ?? 0}명 사용자 조회됨');
|
||||
|
||||
// 2. 이름으로 검색
|
||||
if (users != null && users.isNotEmpty) {
|
||||
final testUser = users.first;
|
||||
final searchKeyword = testUser.name.substring(0, testUser.name.length > 2 ? 2 : testUser.name.length);
|
||||
if (users != null && users.items.isNotEmpty) {
|
||||
final testUser = users.items.first;
|
||||
final searchKeyword = testUser.name.substring(0, testUser.name.items.length > 2 ? 2 : testUser.name.items.length);
|
||||
|
||||
print('테스트 2: "$searchKeyword" 검색어로 조회');
|
||||
// UserService에 search 파라미터 지원 확인 필요
|
||||
@@ -295,9 +295,9 @@ class InteractiveSearchTest {
|
||||
result['tests'].add({
|
||||
'name': '빈 검색어 조회',
|
||||
'status': licenses != null ? 'PASS' : 'FAIL',
|
||||
'count': licenses?.length ?? 0,
|
||||
'count': licenses?.items.length ?? 0,
|
||||
});
|
||||
print(' 결과: ${licenses?.length ?? 0}개 라이선스 조회됨');
|
||||
print(' 결과: ${licenses?.items.length ?? 0}개 라이선스 조회됨');
|
||||
|
||||
result['overall'] = 'PARTIAL';
|
||||
} catch (e) {
|
||||
@@ -327,9 +327,9 @@ class InteractiveSearchTest {
|
||||
result['tests'].add({
|
||||
'name': '빈 검색어 조회',
|
||||
'status': warehouses != null ? 'PASS' : 'FAIL',
|
||||
'count': warehouses?.length ?? 0,
|
||||
'count': warehouses?.items.length ?? 0,
|
||||
});
|
||||
print(' 결과: ${warehouses?.length ?? 0}개 창고 위치 조회됨');
|
||||
print(' 결과: ${warehouses?.items.length ?? 0}개 창고 위치 조회됨');
|
||||
|
||||
result['overall'] = 'PARTIAL';
|
||||
} catch (e) {
|
||||
@@ -360,15 +360,15 @@ class InteractiveSearchTest {
|
||||
result['tests'].add({
|
||||
'name': '빈 검색어 조회',
|
||||
'status': equipments != null ? 'PASS' : 'FAIL',
|
||||
'count': equipments?.length ?? 0,
|
||||
'count': equipments?.items.length ?? 0,
|
||||
});
|
||||
print(' 결과: ${equipments?.length ?? 0}개 장비 조회됨');
|
||||
print(' 결과: ${equipments?.items.length ?? 0}개 장비 조회됨');
|
||||
|
||||
// 2. 특정 검색어 테스트
|
||||
if (equipments != null && equipments.isNotEmpty) {
|
||||
final testEquipment = equipments.first;
|
||||
if (equipments != null && equipments.items.isNotEmpty) {
|
||||
final testEquipment = equipments.items.first;
|
||||
final searchKeyword = testEquipment.manufacturer?.substring(0,
|
||||
testEquipment.manufacturer!.length > 3 ? 3 : testEquipment.manufacturer!.length) ?? 'test';
|
||||
testEquipment.manufacturer!.items.length > 3 ? 3 : testEquipment.manufacturer!.items.length) ?? 'test';
|
||||
|
||||
print('테스트 2: "$searchKeyword" 검색어로 조회');
|
||||
equipments = await equipmentService.getEquipmentsWithStatus(
|
||||
@@ -377,7 +377,7 @@ class InteractiveSearchTest {
|
||||
search: searchKeyword,
|
||||
);
|
||||
|
||||
final hasMatch = equipments?.any((e) =>
|
||||
final hasMatch = equipments?.items.any((e) =>
|
||||
(e.manufacturer?.toLowerCase().contains(searchKeyword.toLowerCase()) ?? false) ||
|
||||
(e.modelName?.toLowerCase().contains(searchKeyword.toLowerCase()) ?? false) ||
|
||||
(e.equipmentNumber?.toLowerCase().contains(searchKeyword.toLowerCase()) ?? false)
|
||||
@@ -387,9 +387,9 @@ class InteractiveSearchTest {
|
||||
'name': '검색어 필터링',
|
||||
'status': hasMatch ? 'PASS' : 'FAIL',
|
||||
'keyword': searchKeyword,
|
||||
'count': equipments?.length ?? 0,
|
||||
'count': equipments?.items.length ?? 0,
|
||||
});
|
||||
print(' 결과: ${equipments?.length ?? 0}개 장비 조회됨 (매칭: $hasMatch)');
|
||||
print(' 결과: ${equipments?.items.length ?? 0}개 장비 조회됨 (매칭: $hasMatch)');
|
||||
}
|
||||
|
||||
// 3. 특수문자 검색 테스트
|
||||
@@ -403,7 +403,7 @@ class InteractiveSearchTest {
|
||||
result['tests'].add({
|
||||
'name': '특수문자 검색',
|
||||
'status': 'PASS',
|
||||
'count': equipments?.length ?? 0,
|
||||
'count': equipments?.items.length ?? 0,
|
||||
});
|
||||
print(' 결과: 에러 없이 처리됨');
|
||||
} catch (e) {
|
||||
@@ -426,9 +426,9 @@ class InteractiveSearchTest {
|
||||
result['tests'].add({
|
||||
'name': '한글 검색',
|
||||
'status': 'PASS',
|
||||
'count': equipments?.length ?? 0,
|
||||
'count': equipments?.items.length ?? 0,
|
||||
});
|
||||
print(' 결과: ${equipments?.length ?? 0}개 장비 조회됨');
|
||||
print(' 결과: ${equipments?.items.length ?? 0}개 장비 조회됨');
|
||||
} catch (e) {
|
||||
result['tests'].add({
|
||||
'name': '한글 검색',
|
||||
@@ -477,7 +477,7 @@ class InteractiveSearchTest {
|
||||
|
||||
// 수정이 필요한 항목 식별
|
||||
print('수정 필요 항목:');
|
||||
if (testResults.any((r) => r['screen'] == 'Equipment' && r['overall'] == 'PASS')) {
|
||||
if (testResults.items.any((r) => r['screen'] == 'Equipment' && r['overall'] == 'PASS')) {
|
||||
print('✅ Equipment 화면: 검색 기능 구현 완료!');
|
||||
} else {
|
||||
print('❌ Equipment 화면: 검색 기능 오류');
|
||||
|
||||
Reference in New Issue
Block a user