Dump the app if we cannot tap the demo (#84996)
To help deflake https://github.com/flutter/flutter/issues/83298
This commit is contained in:
parent
16c0a3d700
commit
46c546684f
@ -61,7 +61,16 @@ Future<void> runDemos(List<String> demos, WidgetController controller) async {
|
||||
final Finder demoItem = find.text(demoName);
|
||||
await controller.scrollUntilVisible(demoItem, 48.0);
|
||||
await controller.pumpAndSettle();
|
||||
await controller.tap(demoItem); // Launch the demo
|
||||
try {
|
||||
await controller.tap(demoItem); // Launch the demo
|
||||
} catch (e) {
|
||||
print('Failed to find $demoItem');
|
||||
print('All available elements:');
|
||||
print(controller.allElements.toList());
|
||||
print('App structure:');
|
||||
debugDumpApp();
|
||||
rethrow;
|
||||
}
|
||||
|
||||
if (kUnsynchronizedDemos.contains(demo)) {
|
||||
// These tests have animation, pumpAndSettle cannot be used.
|
||||
|
Loading…
x
Reference in New Issue
Block a user