Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ML-62 Providers tests + Platform & Application mocks #131

Merged
merged 97 commits into from
Oct 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
97 commits
Select commit Hold shift + click to select a range
20fd765
removed redundant `UserPreferencesService` from `MeteringBloc`
vodemn May 7, 2023
10bf463
wip
vodemn May 7, 2023
9a51cb2
post-merge fixes
vodemn Jun 5, 2023
5ae6dc1
`MeasureEvent` tests
vodemn Jun 8, 2023
c7d3051
`MeasureEvent` tests revision
vodemn Jun 8, 2023
e4a6f0c
`MeasureEvent` tests added timeout
vodemn Jun 8, 2023
07367af
added stubs for other `MeteringBloc` events
vodemn Jun 8, 2023
abf4d77
rewritten `MeteringBloc` logic
vodemn Jun 9, 2023
b30d9ce
wip
vodemn Jun 9, 2023
7706dc7
`IsoChangedEvent` tests
vodemn Jun 9, 2023
8ce3c9e
refined `IsoChangedEvent` tests
vodemn Jun 9, 2023
a03fadb
`NdChangedEvent` tests
vodemn Jun 9, 2023
5e1fe20
`FilmChangedEvent` tests
vodemn Jun 9, 2023
c92ab52
`MeteringCommunicationBloc` tests
vodemn Jun 9, 2023
422ac9d
added test run to ci
vodemn Jun 9, 2023
7fdacfa
overriden `==` for `MeasuredState`
vodemn Jun 9, 2023
8e1b64d
`LuxMeteringEvent` tests
vodemn Jun 12, 2023
a3d875f
refined `LuxMeteringEvent` tests
vodemn Jun 12, 2023
2eb94f8
rename
vodemn Jun 12, 2023
737daad
wip
vodemn Jun 12, 2023
4ff6e40
wip
vodemn Jun 12, 2023
cc56f7f
`InitializeEvent`/`DeinitializeEvent` tests
vodemn Jun 14, 2023
6eab2ce
clamp minZoomLevel
vodemn Jun 14, 2023
b555bb2
fixed `MeteringCommunicationBloc` tests
vodemn Jun 14, 2023
d39cf75
wip
vodemn Jun 14, 2023
a9f6487
`ZoomChangedEvent` tests
vodemn Jun 14, 2023
f9b1833
`ExposureOffsetChangedEvent`/`ExposureOffsetResetEvent` tests
vodemn Jun 14, 2023
35af009
renamed test groups
vodemn Jun 15, 2023
e230a05
added test coverage script
vodemn Jun 15, 2023
dca34f6
improved `CameraContainerBloc` test coverage
vodemn Jun 15, 2023
2a74631
`EquipmentProfileChangedEvent` tests
vodemn Jun 15, 2023
604ee09
verify response vibration
vodemn Jun 15, 2023
801ddd9
fixed running all tests
vodemn Jun 15, 2023
33274ad
`MeteringCommunicationBloc` equality tests
vodemn Jun 15, 2023
d09b533
`CameraContainerBloc` equality tests
vodemn Jun 20, 2023
667cfe2
removed generated code from coverage
vodemn Jun 20, 2023
539e6f2
Merge branch 'main' of https://github.com/vodemn/m3_lightmeter into f…
vodemn Jun 21, 2023
83dd622
`MeteringScreenLayoutFeature` tests
vodemn Jun 21, 2023
d935d7f
`SupportedLocale` tests
vodemn Jun 21, 2023
0c2b315
`Film` tests
vodemn Jun 21, 2023
edf2b95
Merge branch 'main' of https://github.com/vodemn/m3_lightmeter into f…
vodemn Jun 21, 2023
41431ba
`CaffeineService` tests
vodemn Jun 21, 2023
d1e440c
`UserPreferencesService` tests (wip)
vodemn Jun 22, 2023
ed09fad
`LightSensorService` tests (wip)
vodemn Jun 22, 2023
f611434
`migrateOldKeys()` tests
vodemn Jun 22, 2023
532df61
ignore currently unused getters & setters
vodemn Jun 22, 2023
1252096
gradle upgrade
vodemn Jun 23, 2023
f5b71e9
`reset(sharedPreferences);` calls count
vodemn Jun 23, 2023
de24b98
typo
vodemn Jun 23, 2023
a5e01d9
Merge branch 'main' of https://github.com/vodemn/m3_lightmeter into f…
vodemn Jul 10, 2023
e665b23
`MeteringInteractor` tests
vodemn Jul 10, 2023
e631dd7
`SettingsInteractor` tests (wip)
vodemn Jul 10, 2023
5672440
`MeteringInteractor` tests (wip)
vodemn Jul 10, 2023
729f68e
`SettingsInteractor` tests
vodemn Jul 10, 2023
49a0da1
Merge branch 'main' of https://github.com/vodemn/m3_lightmeter into f…
vodemn Oct 4, 2023
5798916
AnimatedDialog picker standalone tests
vodemn Oct 5, 2023
9203db5
Moved Animated dialog picker to widget tests
vodemn Oct 6, 2023
c7abfde
`ExtremeExposurePairsContainer` widget test
vodemn Oct 6, 2023
0776a3b
dialog picker test
vodemn Oct 6, 2023
54898ba
Match extreme exposure pairs & pairs list edge values
vodemn Oct 6, 2023
e15d64b
`FilmPicker` widget tests
vodemn Oct 6, 2023
fce20c7
fixed animated dialog picker tests
vodemn Oct 6, 2023
069a072
add not hit files to coverage percentage
vodemn Oct 6, 2023
e06ee35
Moved `EquipmentProfileProvider` & `FilmsProvider` to the main repo
vodemn Oct 7, 2023
68ccc5f
Synced _iap_ stub with repo
vodemn Oct 9, 2023
9d1c653
`FilmsProvider` tests
vodemn Oct 9, 2023
12f222e
`EquipmentProfileProvider` tests
vodemn Oct 9, 2023
2e929d3
Pass `availableFilms` to `FilmsProvider`
vodemn Oct 9, 2023
1c41abb
`FilmPicker` tests
vodemn Oct 14, 2023
a5c8908
removed unnecessary imports
vodemn Oct 14, 2023
b4f07cc
Metering layout features tests
vodemn Oct 14, 2023
49412cf
split integration tests by screens
vodemn Oct 14, 2023
b68e638
Films in use test
vodemn Oct 14, 2023
5a06669
mock light meter lux stream
vodemn Oct 17, 2023
4f1908c
removed mockito mocks for integration tests
vodemn Oct 17, 2023
e91d0f8
set sharedprefs mock without redundant group
vodemn Oct 17, 2023
0e5762b
unified granting camera permission on Android
vodemn Oct 17, 2023
5e8f02a
fixed metering screen tests
vodemn Oct 17, 2023
387d875
extracted common values
vodemn Oct 17, 2023
24804a1
`FilmPicker` integration tests
vodemn Oct 17, 2023
043439b
fixed light sensor platform mocks
vodemn Oct 18, 2023
4302217
wip
vodemn Oct 18, 2023
6212178
removed integration tests for now
vodemn Oct 18, 2023
9dbe46a
moved screenshots generator to screenshots folder
vodemn Oct 18, 2023
a19d08d
typo
vodemn Oct 18, 2023
3c4d959
removed `MockIAPProductsProvider`
vodemn Oct 18, 2023
9baf1da
implemented platform mocks for unit tests
vodemn Oct 19, 2023
f6452fb
data/models/ 100% coverage
vodemn Oct 19, 2023
f485a04
`IsoValuePicker` tests
vodemn Oct 19, 2023
6cffcd1
`EquipmentProfileProvider` tests
vodemn Oct 19, 2023
822ddf5
extended PR check timeout
vodemn Oct 19, 2023
5aa6dcc
typo
vodemn Oct 19, 2023
049d0c7
added storage action verification for `FilmsProvider` tests
vodemn Oct 20, 2023
2fe36e0
`UserPreferencesProvider` tests
vodemn Oct 20, 2023
a4e7f9d
Update README.md
vodemn Oct 20, 2023
2486c32
added //coverage:ignore to `ServicesProvider`
vodemn Oct 20, 2023
61620ac
typo
vodemn Oct 20, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/pr_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
analyze_and_test:
name: Analyze & test
runs-on: macos-11
timeout-minutes: 5
timeout-minutes: 10
steps:
- uses: 8BitJonny/gh-get-current-pr@2.2.0
id: PR
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,5 @@ ios/Runner/GoogleService-Info.plist
/lib/firebase_options.dart

coverage/
screenshots/
test/coverage_helper_test.dart
screenshots/*.png
3 changes: 1 addition & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@
"files.watcherExclude": {
"**/.fvm": true
},
"dart.lineLength": 100,
"dart.lineLength": 120,
"[dart]": {
"editor.rulers": [
100,
120,
],
"editor.selectionHighlight": true,
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<img src="resources/social_preview.png" width="100%" />

![](https://github.com/vodemn/m3_lightmeter/actions/workflows/pr_check.yml/badge.svg)
![](https://github.com/vodemn/m3_lightmeter/actions/workflows/create_release.yml/badge.svg)

# Table of contents

- [Table of contents](#table-of-contents)
Expand Down
31 changes: 3 additions & 28 deletions iap/lib/m3_lightmeter_iap.dart
Original file line number Diff line number Diff line change
@@ -1,34 +1,9 @@
library m3_lightmeter_iap;

import 'package:flutter/material.dart';
import 'package:m3_lightmeter_iap/src/providers/equipment_profile_provider.dart';
import 'package:m3_lightmeter_iap/src/providers/films_provider.dart';
import 'package:m3_lightmeter_iap/src/providers/iap_products_provider.dart';
import 'package:m3_lightmeter_resources/m3_lightmeter_resources.dart';

export 'src/data/models/iap_product.dart';

export 'src/providers/equipment_profile_provider.dart';
export 'src/providers/films_provider.dart';
export 'src/providers/iap_products_provider.dart';
export 'src/data/iap_storage_service.dart';

class IAPProviders extends StatelessWidget {
final Object sharedPreferences;
final Widget child;

const IAPProviders({
required this.sharedPreferences,
required this.child,
super.key,
});

@override
Widget build(BuildContext context) {
return IAPProductsProvider(
child: FilmsProvider(
child: EquipmentProfileProvider(
child: child,
),
),
);
}
}
const List<Film> films = [];
17 changes: 17 additions & 0 deletions iap/lib/src/data/iap_storage_service.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import 'package:m3_lightmeter_resources/m3_lightmeter_resources.dart';

class IAPStorageService {
const IAPStorageService(Object _);

String get selectedEquipmentProfileId => '';
set selectedEquipmentProfileId(String id) {}

List<EquipmentProfile> get equipmentProfiles => [];
set equipmentProfiles(List<EquipmentProfile> profiles) {}

Film get selectedFilm => const Film.other();
set selectedFilm(Film value) {}

List<Film> get filmsInUse => [];
set filmsInUse(List<Film> profiles) {}
}
61 changes: 0 additions & 61 deletions iap/lib/src/providers/equipment_profile_provider.dart

This file was deleted.

65 changes: 0 additions & 65 deletions iap/lib/src/providers/films_provider.dart

This file was deleted.

Loading