Move ios screenshot test to flutter gold. (#52553)

This commit is contained in:
Chris Yang
2020-03-19 16:27:41 -07:00
committed by GitHub
parent bae2f2c108
commit b05210c707
9 changed files with 62 additions and 183 deletions

View File

@@ -10,5 +10,5 @@ import 'package:flutter_devicelab/tasks/integration_tests.dart';
Future<void> main() async {
deviceOperatingSystem = DeviceOperatingSystem.fuchsia;
await task(createFlutterDriverScreenshotTest(useFlutterGold: true));
await task(createFlutterDriverScreenshotTest());
}

View File

@@ -108,17 +108,11 @@ TaskFunction createAndroidSplashScreenKitchenSinkTest() {
}
/// Executes a driver test that takes a screenshot and compares it against a golden image.
/// If [useFlutterGold] is true, the golden image is served by Flutter Gold
/// (https://flutter-gold.skia.org/), otherwise the golden image is read from the disk.
TaskFunction createFlutterDriverScreenshotTest({
bool useFlutterGold = false,
}) {
/// The golden image is served by Flutter Gold (https://flutter-gold.skia.org/).
TaskFunction createFlutterDriverScreenshotTest() {
return DriverTest(
'${flutterDirectory.path}/dev/integration_tests/flutter_driver_screenshot_test',
'lib/main.dart',
extraOptions: useFlutterGold ? const <String>[
'--driver', 'test_driver/flutter_gold_main_test.dart'
] : const <String>[]
);
}