added logbook photo screen to screenshots generator

This commit is contained in:
Vadim 2025-07-19 20:10:26 +02:00
parent 6133df4337
commit 57d2fbd15a
24 changed files with 39 additions and 1 deletions

View file

@ -34,6 +34,11 @@
"screenshotName": "dark_metering-reflected",
"title": "Match your style",
"subtitle": "with various theme types and colors"
},
{
"screenshotName": "light_logbook-edit",
"title": "Keep track",
"subtitle": "of all your photos\nand all the details"
}
]
}

View file

@ -1,4 +1,4 @@
// ignore_for_file: invalid_use_of_visible_for_testing_member
// ignore_for_file: invalid_use_of_visible_for_testing_member, use_build_context_synchronously
import 'dart:convert';
import 'dart:io';
@ -14,8 +14,10 @@ import 'package:lightmeter/data/models/theme_type.dart';
import 'package:lightmeter/data/models/volume_action.dart';
import 'package:lightmeter/data/shared_prefs_service.dart';
import 'package:lightmeter/generated/l10n.dart';
import 'package:lightmeter/providers/logbook_photos_provider.dart';
import 'package:lightmeter/res/dimens.dart';
import 'package:lightmeter/res/theme.dart';
import 'package:lightmeter/screens/logbook/components/grid_tile/widget_grid_tile_logbook_photo.dart';
import 'package:lightmeter/screens/metering/components/shared/exposure_pairs_list/widget_list_exposure_pairs.dart';
import 'package:lightmeter/screens/metering/components/shared/readings_container/components/iso_picker/widget_picker_iso.dart';
import 'package:lightmeter/screens/metering/screen_metering.dart';
@ -134,10 +136,38 @@ void main() {
await tester.pumpAndSettle();
await tester.tap(find.byIcon(Icons.edit_outlined).first);
await tester.pumpAndSettle();
await tester.tap(find.byIcon(Icons.copy_outlined).first);
await tester.pumpAndSettle();
await tester.tap(find.text(S.current.isoValues)); // open and close a dialog to hide keyboard
await tester.pumpAndSettle();
await tester.tapCancelButton();
await tester.takeScreenshotLight(binding, 'equipment-profiles');
await tester.navigatorPop();
await tester.navigatorPop();
final context = tester.element(find.byType(SettingsScreen)) as BuildContext;
final photo = LogbookPhotos.of(context).first;
await LogbookPhotosProvider.of(context).updateLogbookPhoto(
LogbookPhoto(
id: photo.id,
name: photo.name,
timestamp: DateTime(2025, 06, 22, 20, 15),
coordinates: const Coordinates(52.241921, 21.034328),
note: photo.note,
ev: photo.ev,
iso: photo.iso,
nd: photo.nd,
apertureValue: const ApertureValue(2.0, StopType.full),
shutterSpeedValue: photo.shutterSpeedValue,
),
);
await tester.tapDescendantTextOf<SettingsScreen>(S.current.logbook);
expect(find.byType(LogbookPhotoGridTile), findsOneWidget);
await tester.tap(find.byType(LogbookPhotoGridTile).first);
await tester.pumpAndSettle();
await tester.ensureVisible(find.text(S.current.shutterSpeedValue));
await tester.pumpAndSettle();
await tester.takeScreenshotLight(binding, 'logbook-edit');
});
/// and the additionally the first one with the dark theme

Binary file not shown.

Before

Width:  |  Height:  |  Size: 469 KiB

After

Width:  |  Height:  |  Size: 469 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 215 KiB

After

Width:  |  Height:  |  Size: 223 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 751 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 223 KiB

After

Width:  |  Height:  |  Size: 223 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 478 KiB

After

Width:  |  Height:  |  Size: 478 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 234 KiB

After

Width:  |  Height:  |  Size: 224 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 220 KiB

After

Width:  |  Height:  |  Size: 220 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 348 KiB

After

Width:  |  Height:  |  Size: 348 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 160 KiB

After

Width:  |  Height:  |  Size: 166 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 544 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 180 KiB

After

Width:  |  Height:  |  Size: 180 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 347 KiB

After

Width:  |  Height:  |  Size: 347 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 169 KiB

After

Width:  |  Height:  |  Size: 164 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 148 KiB

After

Width:  |  Height:  |  Size: 147 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 511 KiB

After

Width:  |  Height:  |  Size: 512 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 224 KiB

After

Width:  |  Height:  |  Size: 234 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 808 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 253 KiB

After

Width:  |  Height:  |  Size: 253 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 504 KiB

After

Width:  |  Height:  |  Size: 506 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 239 KiB

After

Width:  |  Height:  |  Size: 230 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 207 KiB

After

Width:  |  Height:  |  Size: 206 KiB

View file

@ -0,0 +1,3 @@
dart run screenshots/convert_to_store_screenshots.dart -p android -d pixel_6 -l android
dart run screenshots/convert_to_store_screenshots.dart -p ios -d iphone_13_pro -l iphone55inch
dart run screenshots/convert_to_store_screenshots.dart -p ios -d iphone_13_pro -l iphone65inch