재고 상세 다이얼로그화 및 마스터 레이아웃 개선

This commit is contained in:
JiWoong Sul
2025-10-22 18:52:21 +09:00
parent a14133df52
commit 09c31b2503
20 changed files with 1187 additions and 923 deletions

View File

@@ -264,5 +264,47 @@ void main() {
expect(find.text('C-100'), findsOneWidget);
verify(() => repository.create(any())).called(1);
});
testWidgets('좁은 폭에서도 오버플로 없이 렌더링', (tester) async {
when(
() => repository.list(
page: any(named: 'page'),
pageSize: any(named: 'pageSize'),
query: any(named: 'query'),
isPartner: any(named: 'isPartner'),
isGeneral: any(named: 'isGeneral'),
isActive: any(named: 'isActive'),
),
).thenAnswer(
(_) async => PaginatedResult<Customer>(
items: [
Customer(
id: 1,
customerCode: 'C-SMALL',
customerName: '좁은 화면 고객',
isPartner: false,
isGeneral: true,
),
],
page: 1,
pageSize: 20,
total: 1,
),
);
await tester.pumpWidget(
_buildApp(
Center(
child: SizedBox(
width: 260,
child: CustomerPage(routeUri: Uri(path: '/masters/customers')),
),
),
),
);
await tester.pumpAndSettle();
expect(tester.takeException(), isNull);
});
});
}

View File

@@ -312,5 +312,51 @@ void main() {
expect(find.text('NP-001'), findsOneWidget);
verify(() => productRepository.create(any())).called(1);
});
testWidgets('좁은 폭에서도 오버플로 없이 렌더링', (tester) async {
when(
() => productRepository.list(
page: any(named: 'page'),
pageSize: any(named: 'pageSize'),
query: any(named: 'query'),
vendorId: any(named: 'vendorId'),
uomId: any(named: 'uomId'),
isActive: any(named: 'isActive'),
),
).thenAnswer(
(_) async => PaginatedResult<Product>(
items: [
Product(
id: 1,
productCode: 'P-SMALL',
productName: '좁은 화면 제품',
vendor: ProductVendor(
id: 1,
vendorCode: 'V-001',
vendorName: '슈퍼벤더',
),
uom: ProductUom(id: 5, uomName: 'EA'),
),
],
page: 1,
pageSize: 20,
total: 1,
),
);
await tester.pumpWidget(
_buildApp(
Center(
child: SizedBox(
width: 260,
child: ProductPage(routeUri: Uri(path: '/masters/products')),
),
),
),
);
await tester.pumpAndSettle();
expect(tester.takeException(), isNull);
});
});
}

View File

@@ -216,4 +216,40 @@ void main() {
expect(find.text('NV-001'), findsOneWidget);
verify(() => repository.create(any())).called(1);
});
testWidgets('좁은 폭에서도 오버플로 없이 렌더링', (tester) async {
dotenv.testLoad(fileInput: 'FEATURE_VENDORS_ENABLED=true\n');
final repository = _MockVendorRepository();
GetIt.I.registerLazySingleton<VendorRepository>(() => repository);
when(
() => repository.list(
page: any(named: 'page'),
pageSize: any(named: 'pageSize'),
query: any(named: 'query'),
isActive: any(named: 'isActive'),
),
).thenAnswer(
(_) async => PaginatedResult<Vendor>(
items: [Vendor(id: 1, vendorCode: 'V-SMALL', vendorName: '좁은 화면 벤더')],
page: 1,
pageSize: 20,
total: 1,
),
);
await tester.pumpWidget(
_buildApp(
Center(
child: SizedBox(
width: 260,
child: VendorPage(routeUri: Uri(path: '/masters/vendors')),
),
),
),
);
await tester.pumpAndSettle();
expect(tester.takeException(), isNull);
});
}

View File

@@ -247,5 +247,45 @@ void main() {
expect(find.text('WH-100'), findsOneWidget);
verify(() => repository.create(any())).called(1);
});
testWidgets('좁은 폭에서도 오버플로 없이 렌더링', (tester) async {
when(
() => repository.list(
page: any(named: 'page'),
pageSize: any(named: 'pageSize'),
query: any(named: 'query'),
isActive: any(named: 'isActive'),
includeZipcode: any(named: 'includeZipcode'),
),
).thenAnswer(
(_) async => PaginatedResult<Warehouse>(
items: [
Warehouse(
id: 1,
warehouseCode: 'WH-SMALL',
warehouseName: '좁은 화면 창고',
zipcode: WarehouseZipcode(zipcode: '06000'),
),
],
page: 1,
pageSize: 20,
total: 1,
),
);
await tester.pumpWidget(
_buildApp(
Center(
child: SizedBox(
width: 260,
child: WarehousePage(routeUri: Uri(path: '/masters/warehouses')),
),
),
),
);
await tester.pumpAndSettle();
expect(tester.takeException(), isNull);
});
});
}