feat: 결재·마스터 실연동 업데이트

This commit is contained in:
JiWoong Sul
2025-10-14 18:10:24 +09:00
parent 1325109fba
commit 8067416c09
66 changed files with 2129 additions and 222 deletions

View File

@@ -2,6 +2,8 @@ import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:shadcn_ui/shadcn_ui.dart';
import 'package:superport_v2/core/network/api_error.dart';
import 'package:superport_v2/core/network/failure.dart';
import 'package:superport_v2/features/util/postal_search/presentation/models/postal_search_result.dart';
import 'package:superport_v2/features/util/postal_search/presentation/widgets/postal_search_dialog.dart';
@@ -151,4 +153,32 @@ void main() {
await tester.tap(find.text('닫기'));
await tester.pumpAndSettle();
});
testWidgets('검색 실패 시 Failure 메시지를 표시한다', (tester) async {
final exception = ApiException(
code: ApiErrorCode.unprocessableEntity,
message: '우편번호 검색에 실패했습니다.',
details: {
'errors': {
'keyword': ['검색어를 다시 확인해 주세요.'],
},
},
);
await tester.pumpWidget(
_PostalSearchHarness(
fetcher: (_) => Future<List<PostalSearchResult>>.error(exception),
),
);
await tester.pumpAndSettle();
final inputFinder = find.byType(EditableText);
await tester.enterText(inputFinder, '강남대로');
await tester.tap(find.text('검색'));
await tester.pumpAndSettle();
final failure = Failure.from(exception);
expect(find.text(failure.describe()), findsOneWidget);
});
}