add integration tests and update README

This commit is contained in:
Nick Fisher
2023-10-12 21:48:44 +08:00
parent 80388c059d
commit 8358c0b236
32 changed files with 427 additions and 75 deletions

View File

@@ -0,0 +1,22 @@
import 'dart:io';
import 'package:crypto/crypto.dart';
import 'package:integration_test/integration_test_driver_extended.dart';
Future<void> main() async {
await integrationDriver(
onScreenshot: (
String screenshotName,
List<int> screenshotBytes, [
Map<String, Object?>? args,
]) async {
final dir = screenshotName.split("/")[0];
final name = screenshotName.split("/")[1];
final File image = await File('integration_test/goldens/$dir/$name.png')
.create(recursive: true);
image.writeAsBytesSync(screenshotBytes);
return true;
},
);
}