| // This file was generated using bin/screenshot_test.dart.template and |
| // bin/sample_page.dart. For more information see README.md. |
| import 'package:flutter_driver/flutter_driver.dart'; |
| import 'package:test/test.dart'; |
| group('sample screenshots', () { |
| driver = await FlutterDriver.connect(); |
| test('take sample screenshots', () async { |
| final List<String> paths = <String>[ |
| for (String path in paths) { |
| await driver.waitUntilNoTransientCallbacks(); |
| // TBD: when #11021 has been resolved, this shouldn't be necessary. |
| await new Future<void>.delayed(const Duration(milliseconds: 500)); |
| final List<int> pixels = await driver.screenshot(); |
| final File file = new File(path); |
| await file.writeAsBytes(pixels); |
| await driver.tap(find.byValueKey('screenshotGestureDetector')); |