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.
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
// 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();
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user