mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2024-11-22 07:20:39 +00:00
Compare commits
No commits in common. "ec1f1eeeb482d5557df3ed21ef4ad2dcf23c7402" and "d9ce47e0dd33c44d82c9af20a2400b7679ab21d9" have entirely different histories.
ec1f1eeeb4
...
d9ce47e0dd
4 changed files with 46 additions and 51 deletions
10
.github/workflows/create_release.yml
vendored
10
.github/workflows/create_release.yml
vendored
|
@ -87,6 +87,11 @@ jobs:
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
|
|
||||||
|
- name: Download apk
|
||||||
|
uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
name: m3_lightmeter_apk
|
||||||
|
|
||||||
- name: Increment build number & replace version number
|
- name: Increment build number & replace version number
|
||||||
run: bash ./.github/scripts/increment_build_number.sh ${{ github.event.inputs.version }}
|
run: bash ./.github/scripts/increment_build_number.sh ${{ github.event.inputs.version }}
|
||||||
|
|
||||||
|
@ -104,11 +109,6 @@ jobs:
|
||||||
branch: ${{ github.ref_name }}
|
branch: ${{ github.ref_name }}
|
||||||
unprotect_reviews: true
|
unprotect_reviews: true
|
||||||
|
|
||||||
- name: Download apk
|
|
||||||
uses: actions/download-artifact@v3
|
|
||||||
with:
|
|
||||||
name: m3_lightmeter_apk
|
|
||||||
|
|
||||||
- name: Rename apk
|
- name: Rename apk
|
||||||
run: mv app-prod-release.apk m3_lightmeter.apk
|
run: mv app-prod-release.apk m3_lightmeter.apk
|
||||||
|
|
||||||
|
|
BIN
app-prod-release.apk
Normal file
BIN
app-prod-release.apk
Normal file
Binary file not shown.
|
@ -46,7 +46,7 @@ class _MockIAPProvidersState extends State<MockIAPProviders> {
|
||||||
storageService: mockIAPStorageService,
|
storageService: mockIAPStorageService,
|
||||||
child: FilmsProvider(
|
child: FilmsProvider(
|
||||||
storageService: mockIAPStorageService,
|
storageService: mockIAPStorageService,
|
||||||
availableFilms: widget.films ?? mockFilms,
|
availableFilms: mockFilms,
|
||||||
child: widget.child,
|
child: widget.child,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
|
@ -22,8 +22,6 @@ import '../integration_test/utils/widget_tester_actions.dart';
|
||||||
|
|
||||||
//https://stackoverflow.com/a/67186625/13167574
|
//https://stackoverflow.com/a/67186625/13167574
|
||||||
|
|
||||||
const _mockFilm = Film('Ilford HP5+', 400);
|
|
||||||
|
|
||||||
/// Just a screenshot generator. No expectations here.
|
/// Just a screenshot generator. No expectations here.
|
||||||
void main() {
|
void main() {
|
||||||
final binding = IntegrationTestWidgetsFlutterBinding();
|
final binding = IntegrationTestWidgetsFlutterBinding();
|
||||||
|
@ -64,17 +62,12 @@ void main() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
setUpAll(() async {
|
|
||||||
if (Platform.isAndroid) await binding.convertFlutterSurfaceToImage();
|
|
||||||
});
|
|
||||||
|
|
||||||
/// Generates several screenshots with the light theme
|
/// Generates several screenshots with the light theme
|
||||||
testWidgets('Generate light theme screenshots', (tester) async {
|
testWidgets(
|
||||||
|
'Generate light theme screenshots',
|
||||||
|
(tester) async {
|
||||||
mockSharedPrefs(ThemeType.light, lightThemeColor);
|
mockSharedPrefs(ThemeType.light, lightThemeColor);
|
||||||
await tester.pumpApplication(
|
await tester.pumpApplication();
|
||||||
films: [_mockFilm],
|
|
||||||
selectedFilm: _mockFilm,
|
|
||||||
);
|
|
||||||
|
|
||||||
await tester.takePhoto();
|
await tester.takePhoto();
|
||||||
await tester.takeScreenshot(binding, 'light-metering_reflected');
|
await tester.takeScreenshot(binding, 'light-metering_reflected');
|
||||||
|
@ -107,17 +100,15 @@ void main() {
|
||||||
await tester.tap(find.byIcon(Icons.iso).first);
|
await tester.tap(find.byIcon(Icons.iso).first);
|
||||||
await tester.pumpAndSettle();
|
await tester.pumpAndSettle();
|
||||||
await tester.takeScreenshot(binding, 'light-equipment_profiles_iso_picker');
|
await tester.takeScreenshot(binding, 'light-equipment_profiles_iso_picker');
|
||||||
});
|
}
|
||||||
|
);
|
||||||
|
|
||||||
/// and the additionally the first one with the dark theme
|
/// and the additionally the first one with the dark theme
|
||||||
testWidgets(
|
testWidgets(
|
||||||
'Generate dark theme screenshots',
|
'Generate dark theme screenshots',
|
||||||
(tester) async {
|
(tester) async {
|
||||||
mockSharedPrefs(ThemeType.dark, darkThemeColor);
|
mockSharedPrefs(ThemeType.dark, darkThemeColor);
|
||||||
await tester.pumpApplication(
|
await tester.pumpApplication();
|
||||||
films: [_mockFilm],
|
|
||||||
selectedFilm: _mockFilm,
|
|
||||||
);
|
|
||||||
|
|
||||||
await tester.takePhoto();
|
await tester.takePhoto();
|
||||||
await tester.takeScreenshot(binding, 'dark-metering_reflected');
|
await tester.takeScreenshot(binding, 'dark-metering_reflected');
|
||||||
|
@ -136,6 +127,10 @@ final String _platformFolder = Platform.isAndroid ? 'android' : 'ios';
|
||||||
|
|
||||||
extension on WidgetTester {
|
extension on WidgetTester {
|
||||||
Future<void> takeScreenshot(IntegrationTestWidgetsFlutterBinding binding, String name) async {
|
Future<void> takeScreenshot(IntegrationTestWidgetsFlutterBinding binding, String name) async {
|
||||||
|
if (Platform.isAndroid) {
|
||||||
|
await binding.convertFlutterSurfaceToImage();
|
||||||
|
await pumpAndSettle();
|
||||||
|
}
|
||||||
await binding.takeScreenshot("$_platformFolder/${const String.fromEnvironment('deviceName')}/$name");
|
await binding.takeScreenshot("$_platformFolder/${const String.fromEnvironment('deviceName')}/$name");
|
||||||
await pumpAndSettle();
|
await pumpAndSettle();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue