2023-09-28 21:29:33 +00:00
|
|
|
import 'dart:io';
|
2024-05-21 17:13:33 +00:00
|
|
|
|
2023-09-28 21:29:33 +00:00
|
|
|
import 'package:integration_test/integration_test_driver_extended.dart';
|
|
|
|
|
2024-05-21 17:13:33 +00:00
|
|
|
import '../screenshots/models/screenshot_args.dart';
|
2023-10-20 14:12:43 +00:00
|
|
|
|
2023-09-28 21:29:33 +00:00
|
|
|
Future<void> main() async {
|
2023-10-20 14:12:43 +00:00
|
|
|
await integrationDriver(
|
2024-05-21 17:13:33 +00:00
|
|
|
onScreenshot: (name, bytes, [_]) async {
|
|
|
|
final screenshotArgs = ScreenshotArgs.fromString(name);
|
|
|
|
final file = await File(screenshotArgs.toPathRaw()).create(recursive: true);
|
|
|
|
file.writeAsBytesSync(bytes);
|
2023-10-20 14:12:43 +00:00
|
|
|
return true;
|
|
|
|
},
|
|
|
|
);
|
2023-09-28 21:29:33 +00:00
|
|
|
}
|