번호 자동 부여 대응 및 API 공통 처리 보강
This commit is contained in:
@@ -116,17 +116,18 @@ void main() {
|
||||
expect(transactionField, findsOneWidget);
|
||||
expect(approvalField, findsOneWidget);
|
||||
|
||||
final transactionInput = find.descendant(
|
||||
of: transactionField,
|
||||
matching: find.byType(EditableText),
|
||||
expect(
|
||||
find.descendant(
|
||||
of: transactionField,
|
||||
matching: find.byType(EditableText),
|
||||
),
|
||||
findsNothing,
|
||||
);
|
||||
final approvalInput = find.descendant(
|
||||
of: approvalField,
|
||||
matching: find.byType(EditableText),
|
||||
expect(
|
||||
find.descendant(of: approvalField, matching: find.byType(EditableText)),
|
||||
findsNothing,
|
||||
);
|
||||
await tester.enterText(transactionInput.first, 'IN-TEST-001');
|
||||
await tester.enterText(approvalInput.first, 'APP-TEST-001');
|
||||
await tester.pump();
|
||||
expect(find.text('저장 시 자동 생성'), findsAtLeastNWidgets(2));
|
||||
|
||||
final productFields = find.byType(InventoryProductAutocompleteField);
|
||||
expect(productFields, findsWidgets);
|
||||
@@ -161,7 +162,7 @@ void main() {
|
||||
expect(find.text('동일 제품이 중복되었습니다.'), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets('입고 등록 모달은 거래번호와 결재번호를 필수로 요구한다', (tester) async {
|
||||
testWidgets('입고 등록 모달은 번호 입력 없이 저장 안내만 제공한다', (tester) async {
|
||||
final view = tester.view;
|
||||
view.physicalSize = const Size(1280, 900);
|
||||
view.devicePixelRatio = 1.0;
|
||||
@@ -190,10 +191,14 @@ void main() {
|
||||
await tester.tap(find.widgetWithText(ShadButton, '입고 등록'));
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
expect(find.text('저장 시 자동 생성'), findsAtLeastNWidgets(2));
|
||||
|
||||
await tester.tap(find.widgetWithText(ShadButton, '저장'));
|
||||
await tester.pump();
|
||||
|
||||
expect(find.text('거래번호를 입력하세요.'), findsOneWidget);
|
||||
expect(find.text('결재번호를 입력하세요.'), findsOneWidget);
|
||||
expect(find.text('거래번호를 입력하세요.'), findsNothing);
|
||||
expect(find.text('결재번호를 입력하세요.'), findsNothing);
|
||||
expect(find.textContaining('자동완성에서 선택'), findsOneWidget);
|
||||
expect(find.textContaining('창고를 선택'), findsOneWidget);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user