Unverified Commit 46c54668 authored by Dan Field's avatar Dan Field Committed by GitHub

Dump the app if we cannot tap the demo (#84996)

To help deflake https://github.com/flutter/flutter/issues/83298
parent 16c0a3d7
......@@ -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.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment