이벤트 개발완료

This commit is contained in:
2025-10-23 22:04:03 +09:00
parent ce1aee67d6
commit cd0e139b5e
48 changed files with 7855 additions and 3459 deletions
@@ -45,9 +45,9 @@ void main() {
// 기본 정보
expect(find.text('파일 처리 결과'), findsOneWidget);
expect(find.text('파일명: $fileName'), findsOneWidget);
expect(find.text('처리된 행: ${processedRows}'), findsOneWidget);
expect(find.text('생성된 이벤트: ${createdCount}'), findsOneWidget);
expect(find.text('유효하지 않은 행: ${invalidRows}'), findsOneWidget);
expect(find.text('처리된 행: $processedRows개'), findsOneWidget);
expect(find.text('생성된 이벤트: $createdCount개'), findsOneWidget);
expect(find.text('유효하지 않은 행: $invalidRows개'), findsOneWidget);
// 실패 행 번호 프리뷰
expect(
@@ -1,62 +1,7 @@
import 'package:flutter/material.dart';
// Deprecated: ParticipantFormScreen removed; replaced by EventDetailsScreen quick-add/guest modals.
import 'package:flutter_test/flutter_test.dart';
import 'package:provider/provider.dart';
import 'package:lanebow/screens/club/participant_form_screen.dart';
import 'package:lanebow/services/event_service.dart';
void main() {
group('ParticipantFormScreen - Guest Prefill BottomSheet', () {
Widget _buildApp() => MultiProvider(
providers: [
ChangeNotifierProvider(create: (_) => EventService()),
],
child: const MaterialApp(
home: Scaffold(
body: ParticipantFormScreen(eventId: 'test_event'),
),
),
);
testWidgets('opens bottom sheet and applies filled values', (tester) async {
await tester.pumpWidget(_buildApp());
await tester.pumpAndSettle();
// 사전입력 버튼 노출
expect(find.text('게스트 사전입력'), findsOneWidget);
// 버튼 탭으로 BottomSheet 오픈
await tester.tap(find.text('게스트 사전입력'));
await tester.pumpAndSettle();
// 필드 입력
await tester.enterText(find.byType(TextField).at(0), '홍길동');
await tester.enterText(find.byType(TextField).at(1), 'hong@test.com');
await tester.enterText(find.byType(TextField).at(2), '01012345678');
// 적용
await tester.tap(find.text('적용'));
await tester.pumpAndSettle();
// 폼 필드에 값 반영 확인
expect(find.widgetWithText(TextFormField, '홍길동'), findsOneWidget);
expect(find.widgetWithText(TextFormField, 'hong@test.com'), findsOneWidget);
expect(find.widgetWithText(TextFormField, '01012345678'), findsOneWidget);
});
testWidgets('shows warning when name is empty', (tester) async {
await tester.pumpWidget(_buildApp());
await tester.pumpAndSettle();
await tester.tap(find.text('게스트 사전입력'));
await tester.pumpAndSettle();
// 이름 비우고 적용
await tester.enterText(find.byType(TextField).at(0), '');
await tester.tap(find.text('적용'));
await tester.pump();
expect(find.text('이름은 필수 입력 항목입니다'), findsOneWidget);
});
});
test('placeholder - removed ParticipantFormScreen bottomsheet', () {},
skip: 'Replaced by EventDetailsScreen modals');
}