feat(dialog): 상세 팝업 SuperportDetailDialog 통합

- SuperportDetailDialog 위젯과 showSuperportDetailDialog 헬퍼를 추가하고 metadata/섹션 패턴을 표준화

- 결재/재고/마스터 각 상세 다이얼로그를 dialogs 디렉터리에 신설하고 기존 페이지를 신규 팝업으로 전환

- SuperportTable 행 선택과 우편번호 검색 다이얼로그 onRowTap 보정을 통해 헤더 오프셋 버그를 제거

- 상세 다이얼로그 및 트랜잭션/상세 뷰 전용 위젯 테스트와 tester_extensions 유틸을 추가하여 회귀를 방지

- detail_dialog_unification_plan.md로 작업 배경과 필드 통합 계획을 문서화
This commit is contained in:
JiWoong Sul
2025-11-07 19:02:43 +09:00
parent 1f78171294
commit 2f8b529506
64 changed files with 13721 additions and 7545 deletions

View File

@@ -16,6 +16,7 @@ import 'package:superport_v2/features/approvals/domain/repositories/approval_tem
import 'package:superport_v2/features/approvals/presentation/pages/approval_page.dart';
import 'package:superport_v2/features/inventory/lookups/domain/entities/lookup_item.dart';
import 'package:superport_v2/features/inventory/lookups/domain/repositories/inventory_lookup_repository.dart';
import 'package:superport_v2/widgets/components/superport_detail_dialog.dart';
import '../../helpers/test_app.dart';
import '../../helpers/fixture_loader.dart';
@@ -43,6 +44,19 @@ void main() {
.toSet();
}
Future<void> selectDetailTab(WidgetTester tester, String id) async {
final tabsFinder = find.descendant(
of: find.byType(SuperportDetailDialog),
matching: find.byType(ShadTabs<String>),
);
final tabsState = tester.state(tabsFinder);
final controller =
(tabsState as dynamic).controller as ShadTabsController<String>;
controller.select(id);
await tester.pump();
await tester.pumpAndSettle();
}
setUpAll(() async {
dotenv.testLoad(fileInput: 'FEATURE_APPROVALS_ENABLED=true');
await Environment.initialize();
@@ -95,10 +109,7 @@ void main() {
await tester.tap(rowFinder);
await tester.pumpAndSettle();
final tabContext = tester.element(find.byType(TabBar));
final tabController = DefaultTabController.of(tabContext);
tabController.animateTo(1);
await tester.pumpAndSettle();
await selectDetailTab(tester, 'steps');
final approveButton = tester.widget<ShadButton>(
find.byKey(const ValueKey('step_action_100_approve')),
@@ -128,10 +139,7 @@ void main() {
await tester.tap(rowFinder);
await tester.pumpAndSettle();
final tabContext = tester.element(find.byType(TabBar));
final tabController = DefaultTabController.of(tabContext);
tabController.animateTo(1);
await tester.pumpAndSettle();
await selectDetailTab(tester, 'steps');
final approveButton = tester.widget<ShadButton>(
find.byKey(const ValueKey('step_action_100_approve')),
@@ -161,10 +169,7 @@ void main() {
await tester.tap(rowFinder);
await tester.pumpAndSettle();
final tabContext = tester.element(find.byType(TabBar));
final tabController = DefaultTabController.of(tabContext);
tabController.animateTo(1);
await tester.pumpAndSettle();
await selectDetailTab(tester, 'steps');
expect(find.textContaining('선행 단계가 완료되지 않았습니다.'), findsWidgets);