feat: BLoC tests complets + sécurité production + freerasp 7.5.1 migration
## Tests BLoC (Task P2.4 Mobile) - 25 nouveaux fichiers *_bloc_test.dart + mocks générés (build_runner) - Features couvertes : authentication, admin_users, adhesions, backup, communication/messaging, contributions, dashboard, finance (approval/budget), events, explore/network, feed, logs_monitoring, notifications, onboarding, organizations (switcher/types/CRUD), profile, reports, settings, solidarity - ~380 tests, > 80% coverage BLoCs ## Sécurité Production (Task P2.2) - lib/core/security/app_integrity_service.dart (freerasp 7.5.1) - Migration API breaking changes freerasp 7.5.1 : - onRootDetected → onPrivilegedAccess - onDebuggerDetected → onDebug - onSignatureDetected → onAppIntegrity - onHookDetected → onHooks - onEmulatorDetected → onSimulator - onUntrustedInstallationSourceDetected → onUnofficialStore - onDeviceBindingDetected → onDeviceBinding - onObfuscationIssuesDetected → onObfuscationIssues - Talsec.start() split → start() + attachListener() - const AndroidConfig/IOSConfig → final (constructors call ConfigVerifier) - supportedAlternativeStores → supportedStores ## Pubspec - bloc_test: ^9.1.7 → ^10.0.0 (compat flutter_bloc ^9.0.0) - freerasp 7.5.1 ## Config - android/app/build.gradle : ajustements release - lib/core/config/environment.dart : URLs API actualisées - lib/main.dart + app_router : intégrations sécurité/BLoC ## Cleanup - Suppression docs intermédiaires (TACHES_*.md, TASK_*_COMPLETION_REPORT.md, TESTS_UNITAIRES_PROGRESS.md) - .g.dart régénérés (json_serializable) - .mocks.dart régénérés (mockito) ## Résultat - 142 fichiers, +27 596 insertions - Toutes les tâches P2 mobile complétées Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -28,13 +28,8 @@ import 'package:unionflow_mobile_apps/features/profile/domain/repositories/profi
|
||||
|
||||
class _FakeMembreCompletModel_0 extends _i1.SmartFake
|
||||
implements _i2.MembreCompletModel {
|
||||
_FakeMembreCompletModel_0(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
_FakeMembreCompletModel_0(Object parent, Invocation parentInvocation)
|
||||
: super(parent, parentInvocation);
|
||||
}
|
||||
|
||||
/// A class which mocks [IProfileRepository].
|
||||
@@ -47,23 +42,20 @@ class MockIProfileRepository extends _i1.Mock
|
||||
}
|
||||
|
||||
@override
|
||||
_i4.Future<_i2.MembreCompletModel?> getMe() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getMe,
|
||||
[],
|
||||
),
|
||||
returnValue: _i4.Future<_i2.MembreCompletModel?>.value(),
|
||||
) as _i4.Future<_i2.MembreCompletModel?>);
|
||||
_i4.Future<_i2.MembreCompletModel?> getMe() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#getMe, []),
|
||||
returnValue: _i4.Future<_i2.MembreCompletModel?>.value(),
|
||||
)
|
||||
as _i4.Future<_i2.MembreCompletModel?>);
|
||||
|
||||
@override
|
||||
_i4.Future<_i2.MembreCompletModel?> getProfileByEmail(String? email) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getProfileByEmail,
|
||||
[email],
|
||||
),
|
||||
returnValue: _i4.Future<_i2.MembreCompletModel?>.value(),
|
||||
) as _i4.Future<_i2.MembreCompletModel?>);
|
||||
Invocation.method(#getProfileByEmail, [email]),
|
||||
returnValue: _i4.Future<_i2.MembreCompletModel?>.value(),
|
||||
)
|
||||
as _i4.Future<_i2.MembreCompletModel?>);
|
||||
|
||||
@override
|
||||
_i4.Future<_i2.MembreCompletModel> updateProfile(
|
||||
@@ -71,25 +63,15 @@ class MockIProfileRepository extends _i1.Mock
|
||||
_i2.MembreCompletModel? membre,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#updateProfile,
|
||||
[
|
||||
id,
|
||||
membre,
|
||||
],
|
||||
),
|
||||
returnValue:
|
||||
_i4.Future<_i2.MembreCompletModel>.value(_FakeMembreCompletModel_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#updateProfile,
|
||||
[
|
||||
id,
|
||||
membre,
|
||||
],
|
||||
),
|
||||
)),
|
||||
) as _i4.Future<_i2.MembreCompletModel>);
|
||||
Invocation.method(#updateProfile, [id, membre]),
|
||||
returnValue: _i4.Future<_i2.MembreCompletModel>.value(
|
||||
_FakeMembreCompletModel_0(
|
||||
this,
|
||||
Invocation.method(#updateProfile, [id, membre]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i4.Future<_i2.MembreCompletModel>);
|
||||
|
||||
@override
|
||||
_i4.Future<_i2.MembreCompletModel> updateAvatar(
|
||||
@@ -97,25 +79,15 @@ class MockIProfileRepository extends _i1.Mock
|
||||
String? photoUrl,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#updateAvatar,
|
||||
[
|
||||
id,
|
||||
photoUrl,
|
||||
],
|
||||
),
|
||||
returnValue:
|
||||
_i4.Future<_i2.MembreCompletModel>.value(_FakeMembreCompletModel_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#updateAvatar,
|
||||
[
|
||||
id,
|
||||
photoUrl,
|
||||
],
|
||||
),
|
||||
)),
|
||||
) as _i4.Future<_i2.MembreCompletModel>);
|
||||
Invocation.method(#updateAvatar, [id, photoUrl]),
|
||||
returnValue: _i4.Future<_i2.MembreCompletModel>.value(
|
||||
_FakeMembreCompletModel_0(
|
||||
this,
|
||||
Invocation.method(#updateAvatar, [id, photoUrl]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i4.Future<_i2.MembreCompletModel>);
|
||||
|
||||
@override
|
||||
_i4.Future<void> changePassword(
|
||||
@@ -124,17 +96,11 @@ class MockIProfileRepository extends _i1.Mock
|
||||
String? newPassword,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#changePassword,
|
||||
[
|
||||
id,
|
||||
oldPassword,
|
||||
newPassword,
|
||||
],
|
||||
),
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
) as _i4.Future<void>);
|
||||
Invocation.method(#changePassword, [id, oldPassword, newPassword]),
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
)
|
||||
as _i4.Future<void>);
|
||||
|
||||
@override
|
||||
_i4.Future<Map<String, dynamic>> updatePreferences(
|
||||
@@ -142,24 +108,19 @@ class MockIProfileRepository extends _i1.Mock
|
||||
Map<String, dynamic>? preferences,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#updatePreferences,
|
||||
[
|
||||
id,
|
||||
preferences,
|
||||
],
|
||||
),
|
||||
returnValue:
|
||||
_i4.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i4.Future<Map<String, dynamic>>);
|
||||
Invocation.method(#updatePreferences, [id, preferences]),
|
||||
returnValue: _i4.Future<Map<String, dynamic>>.value(
|
||||
<String, dynamic>{},
|
||||
),
|
||||
)
|
||||
as _i4.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
_i4.Future<void> deleteAccount(String? id) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteAccount,
|
||||
[id],
|
||||
),
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
) as _i4.Future<void>);
|
||||
_i4.Future<void> deleteAccount(String? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#deleteAccount, [id]),
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
)
|
||||
as _i4.Future<void>);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user