공개페이지
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:lanebow/main.dart' as app;
|
||||
|
||||
void main() {
|
||||
testWidgets('navigates to PublicEventEntryScreen with /p/:hash', (tester) async {
|
||||
// MyApp은 내부에서 routes/onGenerateRoute를 정의하므로 직접 runApp
|
||||
await tester.pumpWidget(const app.MyApp());
|
||||
|
||||
// 초기 홈이 뜬 후, 라우트 푸시
|
||||
final nav = app.navigatorKey.currentState!;
|
||||
nav.pushNamed('/p/abc123');
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
expect(find.text('공개 이벤트 입장'), findsOneWidget);
|
||||
expect(find.textContaining('abc123'), findsOneWidget);
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user