Unverified Commit 6cf5dbe3 authored by Michael Goderbauer's avatar Michael Goderbauer Committed by GitHub

Analyze code snippets in integration_test docs (#132314)

parent 5df1c996
......@@ -72,6 +72,7 @@ import 'package:watcher/watcher.dart';
final String _flutterRoot = path.dirname(path.dirname(path.dirname(path.fromUri(Platform.script))));
final String _packageFlutter = path.join(_flutterRoot, 'packages', 'flutter', 'lib');
final String _packageFlutterTest = path.join(_flutterRoot, 'packages', 'flutter_test', 'lib');
final String _packageIntegrationTest = path.join(_flutterRoot, 'packages', 'integration_test', 'lib');
final String _defaultDartUiLocation = path.join(_flutterRoot, 'bin', 'cache', 'pkg', 'sky_engine', 'lib', 'ui');
final String _flutter = path.join(_flutterRoot, 'bin', Platform.isWindows ? 'flutter.bat' : 'flutter');
......@@ -151,6 +152,7 @@ Future<void> main(List<String> arguments) async {
flutterPackages = <Directory>[
Directory(_packageFlutter),
Directory(_packageFlutterTest),
Directory(_packageIntegrationTest),
// TODO(goderbauer): Add all other packages.
];
}
......
......@@ -326,9 +326,9 @@ https://flutter.dev/docs/testing/integration-tests#testing-on-firebase-test-lab
///
/// Future<void> main() {
/// return integrationDriver(
/// responseDataCallback: (data) async {
/// responseDataCallback: (Map<String, dynamic>? data) async {
/// if (data != null) {
/// for (var entry in data.entries) {
/// for (final MapEntry<String, dynamic> entry in data.entries) {
/// print('Writing ${entry.key} to the disk.');
/// await writeResponseData(
/// entry.value as Map<String, dynamic>,
......
......@@ -20,13 +20,14 @@ import 'common.dart';
/// ```dart
/// import 'dart:async';
///
/// import 'package:flutter_driver/flutter_driver.dart';
/// import 'package:integration_test/integration_test_driver_extended.dart';
///
/// Future<void> main() async {
/// final FlutterDriver driver = await FlutterDriver.connect();
/// await integrationDriver(
/// driver: driver,
/// onScreenshot: (String screenshotName, List<int> screenshotBytes) async {
/// onScreenshot: (String name, List<int> image, [Map<String, Object?>? args]) async {
/// return true;
/// },
/// );
......
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