diff --git a/test/explorer_keys_test.dart b/test/explorer_keys_test.dart index 7e3ab7d..9981425 100644 --- a/test/explorer_keys_test.dart +++ b/test/explorer_keys_test.dart @@ -65,7 +65,7 @@ void main() { AppController ctl() => AppController(PlatformServices(mediaTool: ProcessMediaTool('x', 'y'), storage: DesktopStorageService())); - testWidgets('탐색기: 바꾼 키 (새 폴더 = Ctrl+Shift+K) 를 누르면 그 동작 · 처음 키도 그대로 (F2 이름 변경)', (tester) async { + testWidgets('탐색기: 바꾼 키 (새 폴더 = Ctrl+Shift+K) 를 누르면 그 동작', (tester) async { tester.view.physicalSize = const Size(1400, 900); tester.view.devicePixelRatio = 1; addTearDown(tester.view.reset); @@ -84,10 +84,13 @@ void main() { await tester.sendKeyEvent(k); await tester.sendKeyUpEvent(LogicalKeyboardKey.shiftLeft); await tester.sendKeyUpEvent(LogicalKeyboardKey.controlLeft); - await tester.pumpAndSettle(); + // 전체 실행에서는 목록 읽기 빙글이가 남아 pumpAndSettle 이 끝나지 않을 수 있다 - 창이 뜰 때까지만 + for (var i = 0; i < 100 && find.widgetWithText(AlertDialog, '새 폴더').evaluate().isEmpty; i++) { + await tester.pump(const Duration(milliseconds: 50)); + } expect(find.widgetWithText(AlertDialog, '새 폴더'), findsOneWidget, reason: '바꾼 키로 새 폴더 창'); await tester.tap(find.text('취소').last); - await tester.pumpAndSettle(); + await tester.pump(const Duration(milliseconds: 300)); await tester.pumpWidget(const SizedBox()); await tester.pump(const Duration(seconds: 1)); });