diff --git a/packages/neon/integration_test/screenshot_test.dart b/packages/neon/integration_test/screenshot_test.dart index b31fa817..cea7fa29 100644 --- a/packages/neon/integration_test/screenshot_test.dart +++ b/packages/neon/integration_test/screenshot_test.dart @@ -277,6 +277,7 @@ Future main() async { // Show Photos folder await tester.tap(find.text('Photos')); await tester.pumpAndSettle(); + await tester.pump(); await binding.takeScreenshot('files_photos'); diff --git a/packages/neon/test_driver/integration_test.dart b/packages/neon/test_driver/integration_test.dart index dc6b6408..ad5bc6e3 100644 --- a/packages/neon/test_driver/integration_test.dart +++ b/packages/neon/test_driver/integration_test.dart @@ -3,16 +3,14 @@ import 'dart:io'; import 'package:integration_test/integration_test_driver_extended.dart'; Future main() async { - final screenshotsDir = Directory('screenshots'); - if (screenshotsDir.existsSync()) { - screenshotsDir.deleteSync(recursive: true); - } - screenshotsDir.createSync(); - + Directory('screenshots').createSync(); try { await integrationDriver( onScreenshot: (final screenshotName, final screenshotBytes) async { - File('screenshots/$screenshotName.png').writeAsBytesSync(screenshotBytes); + final file = File('screenshots/$screenshotName.png'); + if (!file.existsSync()) { + file.writeAsBytesSync(screenshotBytes); + } return true; }, );