Refactoring the Android_views tests app to prepare for adding the iOS platform view tests (#36200)
This PR created a main page for platform view tests in the android views testing app. The main page none contains a list of the links to the pages being tested. It puts the android view motion events tests to a sub page. The PR also added iOS related files to get ready for adding the iOS platform views tests.
This commit is contained in:
@@ -3,17 +3,31 @@
|
||||
// found in the LICENSE file.
|
||||
|
||||
import 'dart:async';
|
||||
|
||||
import 'dart:io' show Platform;
|
||||
import 'package:flutter_driver/flutter_driver.dart';
|
||||
import 'package:test/test.dart' hide TypeMatcher, isInstanceOf;
|
||||
|
||||
Future<void> main() async {
|
||||
test('MotionEvents recomposition', () async {
|
||||
final FlutterDriver driver = await FlutterDriver.connect();
|
||||
final String errorMessage = await driver.requestData('run test');
|
||||
FlutterDriver driver;
|
||||
|
||||
expect(errorMessage, '');
|
||||
driver?.close();
|
||||
setUpAll(() async {
|
||||
driver = await FlutterDriver.connect();
|
||||
});
|
||||
|
||||
tearDownAll(() {
|
||||
driver.close();
|
||||
});
|
||||
|
||||
group('MotionEvents tests ', () {
|
||||
test('recomposition', () async {
|
||||
if (Platform.isAndroid) {
|
||||
final SerializableFinder motionEventsListTile =
|
||||
find.byValueKey('MotionEventsListTile');
|
||||
await driver.tap(motionEventsListTile);
|
||||
await driver.waitFor(find.byValueKey('PlatformView'));
|
||||
final String errorMessage = await driver.requestData('run test');
|
||||
expect(errorMessage, '');
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user