Chris Bracken | 2d437f5 | 2017-05-11 14:29:20 -0700 | [diff] [blame] | 1 | // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | import 'dart:async'; |
| 6 | import 'dart:io'; |
| 7 | |
| 8 | import '../framework/adb.dart'; |
| 9 | import '../framework/framework.dart'; |
| 10 | import '../framework/ios.dart'; |
| 11 | import '../framework/utils.dart'; |
| 12 | |
| 13 | Future<TaskResult> runEndToEndTests() async { |
| 14 | final Device device = await devices.workingDevice; |
| 15 | await device.unlock(); |
| 16 | final String deviceId = device.deviceId; |
| 17 | final Directory testDirectory = dir('${flutterDirectory.path}/dev/integration_tests/ui'); |
| 18 | await inDirectory(testDirectory, () async { |
| 19 | await flutter('packages', options: <String>['get']); |
| 20 | |
Michael Goderbauer | 4b957bf | 2017-06-15 18:23:37 -0700 | [diff] [blame] | 21 | if (deviceOperatingSystem == DeviceOperatingSystem.ios) |
Chris Bracken | 2d437f5 | 2017-05-11 14:29:20 -0700 | [diff] [blame] | 22 | await prepareProvisioningCertificates(testDirectory.path); |
Chris Bracken | 2d437f5 | 2017-05-11 14:29:20 -0700 | [diff] [blame] | 23 | |
Alexandre Ardhuin | eda03e2 | 2018-08-02 12:02:32 +0200 | [diff] [blame] | 24 | const List<String> entryPoints = <String>[ |
Yegor | ba5b5e7 | 2017-09-11 09:46:42 -0700 | [diff] [blame] | 25 | 'lib/keyboard_resize.dart', |
| 26 | 'lib/driver.dart', |
Yegor | 91bd9bc | 2017-11-06 17:33:48 -0800 | [diff] [blame] | 27 | 'lib/screenshot.dart', |
Michael Goderbauer | 4090078 | 2018-06-15 10:11:10 -0700 | [diff] [blame] | 28 | 'lib/keyboard_textfield.dart', |
Yegor | ba5b5e7 | 2017-09-11 09:46:42 -0700 | [diff] [blame] | 29 | ]; |
| 30 | |
| 31 | for (final String entryPoint in entryPoints) { |
| 32 | await flutter('drive', options: <String>['--verbose', '-d', deviceId, entryPoint]); |
| 33 | } |
Chris Bracken | 2d437f5 | 2017-05-11 14:29:20 -0700 | [diff] [blame] | 34 | }); |
| 35 | |
Alexandre Ardhuin | d927c93 | 2018-09-12 08:29:29 +0200 | [diff] [blame^] | 36 | return TaskResult.success(<String, dynamic>{}); |
Chris Bracken | 2d437f5 | 2017-05-11 14:29:20 -0700 | [diff] [blame] | 37 | } |