flutter/dev/integration_tests/android_views/test_driver/main_test.dart
Amir Hardon 72ef4485e9 Integration test for embeded Android Views touch support.
The test places an embedded Android view at the top left, and verifies
that motion events that get to FlutterView are equivalent to the
synthesized motion events that gets to the embedded view.

See the README.md for more high level details.
2018-08-20 14:29:26 -07:00

28 lines
800 B
Dart

// Copyright 2018 The Chromium 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:async';
import 'package:flutter_driver/flutter_driver.dart';
import 'package:flutter_goldens_client/client.dart';
import 'package:test/test.dart' hide TypeMatcher, isInstanceOf;
Future<void> main() async {
setUpAll(() async {
print('Cloning goldens repository...');
final GoldensClient goldensClient = new GoldensClient();
await goldensClient.prepare();
});
test('MotionEvents recomposition', () async {
final FlutterDriver driver = await FlutterDriver.connect();
final String errorMessage = await driver.requestData('run test');
expect(errorMessage, '');
driver?.close();
});
}