next9: + gb_flaky (60b994a: settings_group_bar_test 흔들림, 시험만)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>review_55caef5
commit
0d86a9b163
|
|
@ -23,7 +23,20 @@ void main() {
|
||||||
addTearDown(tester.view.reset);
|
addTearDown(tester.view.reset);
|
||||||
final c = AppController(PlatformServices(mediaTool: ProcessMediaTool('x', 'y'), storage: DesktopStorageService()));
|
final c = AppController(PlatformServices(mediaTool: ProcessMediaTool('x', 'y'), storage: DesktopStorageService()));
|
||||||
await tester.runAsync(() => tester.pumpWidget(MaterialApp(home: SettingsPage(c: c))));
|
await tester.runAsync(() => tester.pumpWidget(MaterialApp(home: SettingsPage(c: c))));
|
||||||
await tester.pump();
|
// 관리자 지시 (10/20, 15): 부하가 크면 (여러 시험을 함께 돌림) 칸들이 시작한 진짜 입출력 (레지스트리 조회 · 구성 요소 목록 ·
|
||||||
|
// 파일) 이 늦게 끝나 화면이 바뀌거나, 화면을 치운 뒤에야 끝나 예외가 났다 - 화면이 멈출 때까지 (위젯 수가 세 번 같음) 진짜 시간을 흘린다
|
||||||
|
Future<void> settle() async {
|
||||||
|
var last = -1, same = 0;
|
||||||
|
for (var i = 0; i < 150 && same < 3; i++) {
|
||||||
|
await tester.runAsync(() => Future<void>.delayed(const Duration(milliseconds: 20)));
|
||||||
|
await tester.pump();
|
||||||
|
final n = find.byType(Widget).evaluate().length;
|
||||||
|
same = n == last ? same + 1 : 0;
|
||||||
|
last = n;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
await settle();
|
||||||
final tops = {for (final e in find.byType(ActionChip).evaluate()) tester.getRect(find.byWidget(e.widget)).top.round()};
|
final tops = {for (final e in find.byType(ActionChip).evaluate()) tester.getRect(find.byWidget(e.widget)).top.round()};
|
||||||
expect(tops, isNotEmpty);
|
expect(tops, isNotEmpty);
|
||||||
if (oneRow) {
|
if (oneRow) {
|
||||||
|
|
@ -31,7 +44,8 @@ void main() {
|
||||||
}
|
}
|
||||||
expect(tester.takeException(), isNull);
|
expect(tester.takeException(), isNull);
|
||||||
await tester.pumpWidget(const SizedBox());
|
await tester.pumpWidget(const SizedBox());
|
||||||
|
await settle(); // 치운 뒤에도 남은 비동기 일이 이 시험 안에서 끝나게
|
||||||
await tester.pump(const Duration(seconds: 1));
|
await tester.pump(const Duration(seconds: 1));
|
||||||
});
|
}, timeout: const Timeout(Duration(minutes: 2))); // 화면이 멈출 때까지 기다리므로 부하가 크면 30초를 넘을 수 있음
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue