결재 단계 UI 보완 및 분석 통과

This commit is contained in:
JiWoong Sul
2025-09-25 17:18:08 +09:00
parent c31f6217ef
commit 6d6781f552
7 changed files with 99 additions and 103 deletions

View File

@@ -4,7 +4,6 @@ import 'package:flutter_test/flutter_test.dart';
import 'package:get_it/get_it.dart';
import 'package:mocktail/mocktail.dart';
import 'package:shadcn_ui/shadcn_ui.dart';
import 'package:two_dimensional_scrollables/two_dimensional_scrollables.dart';
import 'package:superport_v2/core/common/models/paginated_result.dart';
import 'package:superport_v2/features/approvals/domain/entities/approval.dart';
@@ -95,14 +94,9 @@ void main() {
expect(find.text('APP-2024-0001'), findsOneWidget);
expect(find.text('최승인'), findsOneWidget);
await tester.dragUntilVisible(
find.widgetWithText(ShadButton, '상세'),
find.byType(TwoDimensionalScrollable),
const Offset(-200, 0),
);
await tester.pumpAndSettle();
await tester.tap(find.widgetWithText(ShadButton, '상세').first);
final detailButtonFinder = find.byKey(const ValueKey('step_detail_501_1'));
final detailButton = tester.widget<ShadButton>(detailButtonFinder);
detailButton.onPressed?.call();
await tester.pump();
await tester.pumpAndSettle();

View File

@@ -65,7 +65,7 @@ void main() {
);
});
ApprovalTemplate _template({bool isActive = true}) {
ApprovalTemplate buildTemplate({bool isActive = true}) {
return ApprovalTemplate(
id: 10,
code: 'AP_INBOUND',
@@ -101,7 +101,7 @@ void main() {
),
).thenAnswer(
(_) async => PaginatedResult<ApprovalTemplate>(
items: [_template()],
items: [buildTemplate()],
page: 1,
pageSize: 20,
total: 1,
@@ -140,7 +140,7 @@ void main() {
when(
() => repository.create(any(), steps: any(named: 'steps')),
).thenAnswer((_) async => _template());
).thenAnswer((_) async => buildTemplate());
await tester.pumpWidget(_buildApp(const ApprovalTemplatePage()));
await tester.pump();
@@ -192,7 +192,7 @@ void main() {
});
testWidgets('수정 플로우에서 fetchDetail 후 update를 호출한다', (tester) async {
final activeTemplate = _template();
final activeTemplate = buildTemplate();
when(
() => repository.list(