Try to dump app again for run_demos.dart (#85048)

This commit is contained in:
Dan Field 2021-06-22 10:43:54 -07:00 committed by GitHub
parent 5e2d32fe97
commit eafadd8b1c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -61,16 +61,15 @@ Future<void> runDemos(List<String> demos, WidgetController controller) async {
final Finder demoItem = find.text(demoName); final Finder demoItem = find.text(demoName);
await controller.scrollUntilVisible(demoItem, 48.0); await controller.scrollUntilVisible(demoItem, 48.0);
await controller.pumpAndSettle(); await controller.pumpAndSettle();
try { if (demoItem.evaluate().isEmpty) {
await controller.tap(demoItem); // Launch the demo
} catch (e) {
print('Failed to find $demoItem'); print('Failed to find $demoItem');
print('All available elements:'); print('All available elements:');
print(controller.allElements.toList()); print(controller.allElements.toList().join('\n'));
print('App structure:'); print('App structure:');
debugDumpApp(); debugDumpApp();
rethrow; throw TestFailure('Failed to find element');
} }
await controller.tap(demoItem); // Launch the demo
if (kUnsynchronizedDemos.contains(demo)) { if (kUnsynchronizedDemos.contains(demo)) {
// These tests have animation, pumpAndSettle cannot be used. // These tests have animation, pumpAndSettle cannot be used.