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:
@@ -109,8 +109,8 @@ class PaginationTest {
|
||||
'status': 'PASS',
|
||||
'page': 1,
|
||||
'perPage': 5,
|
||||
'count': page1.length,
|
||||
'firstItem': page1.isNotEmpty ? page1.first.name : null,
|
||||
'count': page1.items.length,
|
||||
'firstItem': page1.items.isNotEmpty ? page1.items.first.name : null,
|
||||
});
|
||||
|
||||
// 2. 두 번째 페이지 조회
|
||||
@@ -125,15 +125,15 @@ class PaginationTest {
|
||||
'status': 'PASS',
|
||||
'page': 2,
|
||||
'perPage': 5,
|
||||
'count': page2.length,
|
||||
'firstItem': page2.isNotEmpty ? page2.first.name : null,
|
||||
'count': page2.items.length,
|
||||
'firstItem': page2.items.isNotEmpty ? page2.items.first.name : null,
|
||||
});
|
||||
|
||||
// 3. 페이지 간 중복 체크
|
||||
print('테스트 3: 페이지 간 중복 체크');
|
||||
if (page1.isNotEmpty && page2.isNotEmpty) {
|
||||
final page1Ids = page1.map((c) => c.id).toSet();
|
||||
final page2Ids = page2.map((c) => c.id).toSet();
|
||||
if (page1.items.isNotEmpty && page2.items.isNotEmpty) {
|
||||
final page1Ids = page1.items.map((c) => c.id).toSet();
|
||||
final page2Ids = page2.items.map((c) => c.id).toSet();
|
||||
final hasDuplicates = page1Ids.intersection(page2Ids).isNotEmpty;
|
||||
|
||||
result['steps'].add({
|
||||
@@ -155,8 +155,8 @@ class PaginationTest {
|
||||
'name': '마지막 페이지',
|
||||
'status': 'PASS',
|
||||
'page': 100,
|
||||
'count': lastPage.length,
|
||||
'note': lastPage.isEmpty ? '빈 페이지 반환 (정상)' : '데이터 있음',
|
||||
'count': lastPage.items.length,
|
||||
'note': lastPage.items.isEmpty ? '빈 페이지 반환 (정상)' : '데이터 있음',
|
||||
});
|
||||
|
||||
result['overall'] = 'PASS';
|
||||
@@ -189,8 +189,8 @@ class PaginationTest {
|
||||
'status': 'PASS',
|
||||
'page': 1,
|
||||
'perPage': 10,
|
||||
'count': page1.length,
|
||||
'firstItem': page1.isNotEmpty ? page1.first.name : null,
|
||||
'count': page1.items.length,
|
||||
'firstItem': page1.items.isNotEmpty ? page1.items.first.name : null,
|
||||
});
|
||||
|
||||
// 2. 페이지 크기 테스트
|
||||
@@ -205,10 +205,10 @@ class PaginationTest {
|
||||
|
||||
result['steps'].add({
|
||||
'name': 'perPage=$size',
|
||||
'status': page.length <= size ? 'PASS' : 'FAIL',
|
||||
'status': page.items.length <= size ? 'PASS' : 'FAIL',
|
||||
'requested': size,
|
||||
'received': page.length,
|
||||
'note': page.length > size ? '요청보다 많은 데이터 반환' : '정상',
|
||||
'received': page.items.length,
|
||||
'note': page.items.length > size ? '요청보다 많은 데이터 반환' : '정상',
|
||||
});
|
||||
}
|
||||
|
||||
@@ -279,8 +279,8 @@ class PaginationTest {
|
||||
result['steps'].add({
|
||||
'name': '기본 페이지네이션',
|
||||
'status': 'PASS',
|
||||
'page1Count': page1.length,
|
||||
'page2Count': page2.length,
|
||||
'page1Count': page1.items.length,
|
||||
'page2Count': page2.items.length,
|
||||
});
|
||||
|
||||
// 2. 필터와 페이지네이션 조합
|
||||
@@ -297,8 +297,8 @@ class PaginationTest {
|
||||
'name': '필터 + 페이지네이션',
|
||||
'status': 'PASS',
|
||||
'filter': 'role=S',
|
||||
'count': adminPage1.length,
|
||||
'allAreAdmins': adminPage1.every((u) => u.role == 'S'),
|
||||
'count': adminPage1.items.length,
|
||||
'allAreAdmins': adminPage1.items.every((u) => u.role == 'S'),
|
||||
});
|
||||
|
||||
// 3. 빈 페이지 처리
|
||||
@@ -312,8 +312,8 @@ class PaginationTest {
|
||||
'name': '빈 페이지 처리',
|
||||
'status': 'PASS',
|
||||
'page': 999,
|
||||
'isEmpty': emptyPage.isEmpty,
|
||||
'note': emptyPage.isEmpty ? '빈 리스트 반환 (정상)' : '데이터 있음',
|
||||
'isEmpty': emptyPage.items.isEmpty,
|
||||
'note': emptyPage.items.isEmpty ? '빈 리스트 반환 (정상)' : '데이터 있음',
|
||||
});
|
||||
|
||||
result['overall'] = 'PASS';
|
||||
@@ -452,8 +452,8 @@ class PaginationTest {
|
||||
'name': '매우 큰 페이지',
|
||||
'status': 'PASS',
|
||||
'page': 999999,
|
||||
'isEmpty': hugePage.isEmpty,
|
||||
'note': hugePage.isEmpty ? '빈 리스트 반환 (정상)' : '데이터 있음',
|
||||
'isEmpty': hugePage.items.isEmpty,
|
||||
'note': hugePage.items.isEmpty ? '빈 리스트 반환 (정상)' : '데이터 있음',
|
||||
});
|
||||
|
||||
// 5. 매우 큰 perPage
|
||||
@@ -468,7 +468,7 @@ class PaginationTest {
|
||||
'name': '매우 큰 perPage',
|
||||
'status': 'PASS',
|
||||
'perPage': 10000,
|
||||
'count': hugePerPage.length,
|
||||
'count': hugePerPage.items.length,
|
||||
'note': '처리됨',
|
||||
});
|
||||
} catch (e) {
|
||||
|
||||
Reference in New Issue
Block a user