You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
548 B
22 lines
548 B
2 years ago
|
import 'dart:io';
|
||
|
|
||
|
import 'package:integration_test/integration_test_driver_extended.dart';
|
||
|
|
||
|
Future<void> main() async {
|
||
2 years ago
|
Directory('screenshots').createSync();
|
||
2 years ago
|
try {
|
||
|
await integrationDriver(
|
||
|
onScreenshot: (final screenshotName, final screenshotBytes) async {
|
||
2 years ago
|
final file = File('screenshots/$screenshotName.png');
|
||
|
if (!file.existsSync()) {
|
||
|
file.writeAsBytesSync(screenshotBytes);
|
||
|
}
|
||
2 years ago
|
return true;
|
||
|
},
|
||
|
);
|
||
|
} catch (e) {
|
||
|
// ignore: avoid_print
|
||
|
print('Error occurred: $e');
|
||
|
}
|
||
|
}
|