mirror of
https://github.com/flutter/samples.git
synced 2026-03-28 23:32:05 +00:00
Add an e2e (host-independent) test demo to testing_app (#515)
This commit is contained in:
21
testing_app/test_driver/e2e_test.dart
Normal file
21
testing_app/test_driver/e2e_test.dart
Normal file
@@ -0,0 +1,21 @@
|
||||
// Copyright 2020 The Flutter team. 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:e2e/e2e_driver.dart' as driver;
|
||||
|
||||
Future<void> main() => driver.e2eDriver(responseDataCallback: (data) async {
|
||||
await driver.writeResponseData(
|
||||
data['scrolling'] as Map<String, dynamic>,
|
||||
// This result is saved to `build/scrolling.json`.
|
||||
testOutputFilename: 'scrolling',
|
||||
);
|
||||
|
||||
await driver.writeResponseData(
|
||||
data['favorites_operations'] as Map<String, dynamic>,
|
||||
// This result is saved to `build/favorites_operations.json`.
|
||||
testOutputFilename: 'favorites_operations',
|
||||
);
|
||||
});
|
||||
Reference in New Issue
Block a user