mirror of
https://github.com/flutter/samples.git
synced 2026-03-24 13:22:01 +00:00
[testing_app] Migrate the sample to the integration_test package (#633)
This commit is contained in:
committed by
GitHub
parent
d16d35e0ac
commit
f63c465ff4
23
testing_app/integration_test/driver.dart
Normal file
23
testing_app/integration_test/driver.dart
Normal file
@@ -0,0 +1,23 @@
|
||||
// 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 'package:integration_test/integration_test_driver.dart';
|
||||
|
||||
Future<void> main() {
|
||||
return integrationDriver(
|
||||
responseDataCallback: (data) async {
|
||||
// If the tests reported any data, save it to the disk.
|
||||
if (data != null) {
|
||||
for (var entry in data.entries) {
|
||||
print('Writing ${entry.key} to the disk.');
|
||||
// Default storage destination is the 'build' directory.
|
||||
await writeResponseData(
|
||||
entry.value as Map<String, dynamic>,
|
||||
testOutputFilename: entry.key,
|
||||
);
|
||||
}
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user