전역 구조 리팩터링 및 테스트 확장

This commit is contained in:
JiWoong Sul
2025-09-29 01:51:47 +09:00
parent c00c0c9ab2
commit fef7108479
70 changed files with 7709 additions and 3185 deletions

View File

@@ -49,7 +49,9 @@ void main() {
testWidgets('플래그 Off 시 스펙 문서 화면을 노출한다', (tester) async {
dotenv.testLoad(fileInput: 'FEATURE_PRODUCTS_ENABLED=false\n');
await tester.pumpWidget(_buildApp(const ProductPage()));
await tester.pumpWidget(
_buildApp(ProductPage(routeUri: Uri(path: '/masters/products'))),
);
await tester.pump();
expect(find.text('장비 모델(제품) 관리'), findsOneWidget);
@@ -134,7 +136,9 @@ void main() {
),
);
await tester.pumpWidget(_buildApp(const ProductPage()));
await tester.pumpWidget(
_buildApp(ProductPage(routeUri: Uri(path: '/masters/products'))),
);
await tester.pumpAndSettle();
expect(find.text('P-001'), findsOneWidget);
@@ -169,7 +173,9 @@ void main() {
),
);
await tester.pumpWidget(_buildApp(const ProductPage()));
await tester.pumpWidget(
_buildApp(ProductPage(routeUri: Uri(path: '/masters/products'))),
);
await tester.pumpAndSettle();
await tester.tap(find.text('신규 등록'));
@@ -243,7 +249,9 @@ void main() {
);
});
await tester.pumpWidget(_buildApp(const ProductPage()));
await tester.pumpWidget(
_buildApp(ProductPage(routeUri: Uri(path: '/masters/products'))),
);
await tester.pumpAndSettle();
await tester.tap(find.text('신규 등록'));