flutter/dev/devicelab/bin/tasks/route_test_ios.dart
2022-03-14 12:30:20 -07:00

35 lines
1.1 KiB
Dart

// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'dart:io';
import 'package:flutter_devicelab/framework/devices.dart';
import 'package:flutter_devicelab/framework/framework.dart';
import 'package:flutter_devicelab/framework/task_result.dart';
import 'package:flutter_devicelab/framework/utils.dart';
import 'package:path/path.dart' as path;
void main() {
task(() async {
deviceOperatingSystem = DeviceOperatingSystem.ios;
final Device device = await devices.workingDevice;
await device.unlock();
final Directory appDir = dir(path.join(flutterDirectory.path, 'dev/integration_tests/ui'));
section('TEST WHETHER `flutter drive --route` WORKS on IOS');
await inDirectory(appDir, () async {
return flutter(
'drive',
options: <String>[
'--verbose',
'-d',
device.deviceId,
'--route',
'/smuggle-it',
'lib/route.dart',
],
);
});
return TaskResult.success(null);
});
}