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:
@@ -38,20 +38,20 @@ class MockConnectivity extends _i1.Mock implements _i2.Connectivity {
|
||||
@override
|
||||
_i3.Stream<List<_i4.ConnectivityResult>> get onConnectivityChanged =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#onConnectivityChanged),
|
||||
returnValue: _i3.Stream<List<_i4.ConnectivityResult>>.empty(),
|
||||
) as _i3.Stream<List<_i4.ConnectivityResult>>);
|
||||
Invocation.getter(#onConnectivityChanged),
|
||||
returnValue: _i3.Stream<List<_i4.ConnectivityResult>>.empty(),
|
||||
)
|
||||
as _i3.Stream<List<_i4.ConnectivityResult>>);
|
||||
|
||||
@override
|
||||
_i3.Future<List<_i4.ConnectivityResult>> checkConnectivity() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#checkConnectivity,
|
||||
[],
|
||||
),
|
||||
returnValue: _i3.Future<List<_i4.ConnectivityResult>>.value(
|
||||
<_i4.ConnectivityResult>[]),
|
||||
) as _i3.Future<List<_i4.ConnectivityResult>>);
|
||||
Invocation.method(#checkConnectivity, []),
|
||||
returnValue: _i3.Future<List<_i4.ConnectivityResult>>.value(
|
||||
<_i4.ConnectivityResult>[],
|
||||
),
|
||||
)
|
||||
as _i3.Future<List<_i4.ConnectivityResult>>);
|
||||
}
|
||||
|
||||
/// A class which mocks [PendingOperationsStore].
|
||||
@@ -71,92 +71,82 @@ class MockPendingOperationsStore extends _i1.Mock
|
||||
Map<String, String>? headers,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addPendingOperation,
|
||||
[],
|
||||
{
|
||||
#operationType: operationType,
|
||||
#endpoint: endpoint,
|
||||
#data: data,
|
||||
#headers: headers,
|
||||
},
|
||||
),
|
||||
returnValue: _i3.Future<void>.value(),
|
||||
returnValueForMissingStub: _i3.Future<void>.value(),
|
||||
) as _i3.Future<void>);
|
||||
Invocation.method(#addPendingOperation, [], {
|
||||
#operationType: operationType,
|
||||
#endpoint: endpoint,
|
||||
#data: data,
|
||||
#headers: headers,
|
||||
}),
|
||||
returnValue: _i3.Future<void>.value(),
|
||||
returnValueForMissingStub: _i3.Future<void>.value(),
|
||||
)
|
||||
as _i3.Future<void>);
|
||||
|
||||
@override
|
||||
_i3.Future<List<Map<String, dynamic>>> getPendingOperations() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getPendingOperations,
|
||||
[],
|
||||
),
|
||||
returnValue: _i3.Future<List<Map<String, dynamic>>>.value(
|
||||
<Map<String, dynamic>>[]),
|
||||
) as _i3.Future<List<Map<String, dynamic>>>);
|
||||
Invocation.method(#getPendingOperations, []),
|
||||
returnValue: _i3.Future<List<Map<String, dynamic>>>.value(
|
||||
<Map<String, dynamic>>[],
|
||||
),
|
||||
)
|
||||
as _i3.Future<List<Map<String, dynamic>>>);
|
||||
|
||||
@override
|
||||
_i3.Future<void> removePendingOperation(String? id) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#removePendingOperation,
|
||||
[id],
|
||||
),
|
||||
returnValue: _i3.Future<void>.value(),
|
||||
returnValueForMissingStub: _i3.Future<void>.value(),
|
||||
) as _i3.Future<void>);
|
||||
|
||||
@override
|
||||
_i3.Future<void> incrementRetryCount(String? id) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#incrementRetryCount,
|
||||
[id],
|
||||
),
|
||||
returnValue: _i3.Future<void>.value(),
|
||||
returnValueForMissingStub: _i3.Future<void>.value(),
|
||||
) as _i3.Future<void>);
|
||||
|
||||
@override
|
||||
_i3.Future<void> clearAll() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#clearAll,
|
||||
[],
|
||||
),
|
||||
returnValue: _i3.Future<void>.value(),
|
||||
returnValueForMissingStub: _i3.Future<void>.value(),
|
||||
) as _i3.Future<void>);
|
||||
|
||||
@override
|
||||
_i3.Future<void> removeOldOperations(
|
||||
{Duration? maxAge = const Duration(days: 7)}) =>
|
||||
_i3.Future<void> removePendingOperation(String? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#removeOldOperations,
|
||||
[],
|
||||
{#maxAge: maxAge},
|
||||
),
|
||||
returnValue: _i3.Future<void>.value(),
|
||||
returnValueForMissingStub: _i3.Future<void>.value(),
|
||||
) as _i3.Future<void>);
|
||||
Invocation.method(#removePendingOperation, [id]),
|
||||
returnValue: _i3.Future<void>.value(),
|
||||
returnValueForMissingStub: _i3.Future<void>.value(),
|
||||
)
|
||||
as _i3.Future<void>);
|
||||
|
||||
@override
|
||||
_i3.Future<void> incrementRetryCount(String? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#incrementRetryCount, [id]),
|
||||
returnValue: _i3.Future<void>.value(),
|
||||
returnValueForMissingStub: _i3.Future<void>.value(),
|
||||
)
|
||||
as _i3.Future<void>);
|
||||
|
||||
@override
|
||||
_i3.Future<void> clearAll() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#clearAll, []),
|
||||
returnValue: _i3.Future<void>.value(),
|
||||
returnValueForMissingStub: _i3.Future<void>.value(),
|
||||
)
|
||||
as _i3.Future<void>);
|
||||
|
||||
@override
|
||||
_i3.Future<void> removeOldOperations({
|
||||
Duration? maxAge = const Duration(days: 7),
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#removeOldOperations, [], {#maxAge: maxAge}),
|
||||
returnValue: _i3.Future<void>.value(),
|
||||
returnValueForMissingStub: _i3.Future<void>.value(),
|
||||
)
|
||||
as _i3.Future<void>);
|
||||
|
||||
@override
|
||||
_i3.Future<List<Map<String, dynamic>>> getOperationsByType(
|
||||
String? operationType) =>
|
||||
String? operationType,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getOperationsByType,
|
||||
[operationType],
|
||||
),
|
||||
returnValue: _i3.Future<List<Map<String, dynamic>>>.value(
|
||||
<Map<String, dynamic>>[]),
|
||||
) as _i3.Future<List<Map<String, dynamic>>>);
|
||||
Invocation.method(#getOperationsByType, [operationType]),
|
||||
returnValue: _i3.Future<List<Map<String, dynamic>>>.value(
|
||||
<Map<String, dynamic>>[],
|
||||
),
|
||||
)
|
||||
as _i3.Future<List<Map<String, dynamic>>>);
|
||||
|
||||
@override
|
||||
_i3.Future<int> getCount() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getCount,
|
||||
[],
|
||||
),
|
||||
returnValue: _i3.Future<int>.value(0),
|
||||
) as _i3.Future<int>);
|
||||
_i3.Future<int> getCount() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#getCount, []),
|
||||
returnValue: _i3.Future<int>.value(0),
|
||||
)
|
||||
as _i3.Future<int>);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user