From e492a78b9b3b81fd9dd07433c578d71eca1dc83d Mon Sep 17 00:00:00 2001 From: mso7nueh Date: Wed, 23 Apr 2025 11:48:27 +0300 Subject: [PATCH] fix(ci/cd): test-flight --- Build-tf | 1 + pubspec.yaml | 9 +- .../services/profile_service_test.mocks.dart | 556 ++++++++++-------- 3 files changed, 327 insertions(+), 239 deletions(-) diff --git a/Build-tf b/Build-tf index b1547956..e3719bdd 100644 --- a/Build-tf +++ b/Build-tf @@ -6,6 +6,7 @@ export LC_ALL=en_US.UTF-8 flutter clean flutter pub get +flutter pub upgrade flutter pub run build_runner build --delete-conflicting-outputs flutter build ipa --export-options-plist=Support/ExportOptions.plist --release diff --git a/pubspec.yaml b/pubspec.yaml index f05371bf..24b34ed7 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -18,7 +18,7 @@ dependencies: cached_network_image: ^3.4.1 flutter_svg: ^2.0.17 equatable: ^2.0.7 - freezed_annotation: ^2.4.4 + freezed_annotation: ^3.0.0 json_annotation: ^4.9.0 validators: ^3.0.0 path_provider: ^2.1.5 @@ -71,14 +71,13 @@ dependencies: dependency_overrides: intl: ^0.19.0 connectivity_plus: ^6.1.2 - analyzer: ^6.2.0 dev_dependencies: build_runner: ^2.4.15 - freezed: ^2.5.8 - json_serializable: ^6.9.4 + freezed: ^3.0.6 + json_serializable: ^6.9.5 retrofit_generator: ^9.1.9 - mockito: ^5.4.5 + mockito: ^5.4.6 flutter_test: sdk: flutter diff --git a/test/features/profile/services/profile_service_test.mocks.dart b/test/features/profile/services/profile_service_test.mocks.dart index 9680c015..134899c4 100644 --- a/test/features/profile/services/profile_service_test.mocks.dart +++ b/test/features/profile/services/profile_service_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.5 from annotations +// Mocks generated by Mockito 5.4.6 from annotations // in eatvio_app/test/features/profile/services/profile_service_test.dart. // Do not manually edit this file. @@ -34,26 +34,46 @@ import 'package:mockito/mockito.dart' as _i1; // ignore_for_file: subtype_of_sealed_class class _FakeProfileModel_0 extends _i1.SmartFake implements _i2.ProfileModel { - _FakeProfileModel_0(Object parent, Invocation parentInvocation) - : super(parent, parentInvocation); + _FakeProfileModel_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); } class _FakeProfileDetailsModel_1 extends _i1.SmartFake implements _i2.ProfileDetailsModel { - _FakeProfileDetailsModel_1(Object parent, Invocation parentInvocation) - : super(parent, parentInvocation); + _FakeProfileDetailsModel_1( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); } class _FakeSubPaginationModel_2 extends _i1.SmartFake implements _i3.SubPaginationModel { - _FakeSubPaginationModel_2(Object parent, Invocation parentInvocation) - : super(parent, parentInvocation); + _FakeSubPaginationModel_2( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); } class _FakeChosenDietsPaginationModel_3 extends _i1.SmartFake implements _i4.ChosenDietsPaginationModel { - _FakeChosenDietsPaginationModel_3(Object parent, Invocation parentInvocation) - : super(parent, parentInvocation); + _FakeChosenDietsPaginationModel_3( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); } /// A class which mocks [ProfileService]. @@ -63,78 +83,106 @@ class MockProfileService extends _i1.Mock implements _i5.ProfileService { @override _i6.Future<_i2.ProfileModel> getProfileBySlug({required String? slug}) => (super.noSuchMethod( - Invocation.method(#getProfileBySlug, [], {#slug: slug}), - returnValue: _i6.Future<_i2.ProfileModel>.value( - _FakeProfileModel_0( - this, - Invocation.method(#getProfileBySlug, [], {#slug: slug}), - ), - ), - returnValueForMissingStub: _i6.Future<_i2.ProfileModel>.value( - _FakeProfileModel_0( - this, - Invocation.method(#getProfileBySlug, [], {#slug: slug}), - ), - ), - ) - as _i6.Future<_i2.ProfileModel>); + Invocation.method( + #getProfileBySlug, + [], + {#slug: slug}, + ), + returnValue: _i6.Future<_i2.ProfileModel>.value(_FakeProfileModel_0( + this, + Invocation.method( + #getProfileBySlug, + [], + {#slug: slug}, + ), + )), + returnValueForMissingStub: + _i6.Future<_i2.ProfileModel>.value(_FakeProfileModel_0( + this, + Invocation.method( + #getProfileBySlug, + [], + {#slug: slug}, + ), + )), + ) as _i6.Future<_i2.ProfileModel>); @override - _i6.Future<_i2.ProfileModel> getMyProfile() => - (super.noSuchMethod( - Invocation.method(#getMyProfile, []), - returnValue: _i6.Future<_i2.ProfileModel>.value( - _FakeProfileModel_0(this, Invocation.method(#getMyProfile, [])), - ), - returnValueForMissingStub: _i6.Future<_i2.ProfileModel>.value( - _FakeProfileModel_0(this, Invocation.method(#getMyProfile, [])), - ), - ) - as _i6.Future<_i2.ProfileModel>); + _i6.Future<_i2.ProfileModel> getMyProfile() => (super.noSuchMethod( + Invocation.method( + #getMyProfile, + [], + ), + returnValue: _i6.Future<_i2.ProfileModel>.value(_FakeProfileModel_0( + this, + Invocation.method( + #getMyProfile, + [], + ), + )), + returnValueForMissingStub: + _i6.Future<_i2.ProfileModel>.value(_FakeProfileModel_0( + this, + Invocation.method( + #getMyProfile, + [], + ), + )), + ) as _i6.Future<_i2.ProfileModel>); @override _i6.Future<_i2.ProfileDetailsModel> getMyProfileDetails() => (super.noSuchMethod( - Invocation.method(#getMyProfileDetails, []), - returnValue: _i6.Future<_i2.ProfileDetailsModel>.value( - _FakeProfileDetailsModel_1( - this, - Invocation.method(#getMyProfileDetails, []), - ), - ), - returnValueForMissingStub: - _i6.Future<_i2.ProfileDetailsModel>.value( - _FakeProfileDetailsModel_1( - this, - Invocation.method(#getMyProfileDetails, []), - ), - ), - ) - as _i6.Future<_i2.ProfileDetailsModel>); + Invocation.method( + #getMyProfileDetails, + [], + ), + returnValue: _i6.Future<_i2.ProfileDetailsModel>.value( + _FakeProfileDetailsModel_1( + this, + Invocation.method( + #getMyProfileDetails, + [], + ), + )), + returnValueForMissingStub: _i6.Future<_i2.ProfileDetailsModel>.value( + _FakeProfileDetailsModel_1( + this, + Invocation.method( + #getMyProfileDetails, + [], + ), + )), + ) as _i6.Future<_i2.ProfileDetailsModel>); @override - _i6.Future<_i2.ProfileDetailsModel> getProfileDetailsBySlug({ - required String? slug, - }) => + _i6.Future<_i2.ProfileDetailsModel> getProfileDetailsBySlug( + {required String? slug}) => (super.noSuchMethod( - Invocation.method(#getProfileDetailsBySlug, [], {#slug: slug}), - returnValue: _i6.Future<_i2.ProfileDetailsModel>.value( - _FakeProfileDetailsModel_1( - this, - Invocation.method(#getProfileDetailsBySlug, [], {#slug: slug}), - ), - ), - returnValueForMissingStub: - _i6.Future<_i2.ProfileDetailsModel>.value( - _FakeProfileDetailsModel_1( - this, - Invocation.method(#getProfileDetailsBySlug, [], { - #slug: slug, - }), - ), - ), - ) - as _i6.Future<_i2.ProfileDetailsModel>); + Invocation.method( + #getProfileDetailsBySlug, + [], + {#slug: slug}, + ), + returnValue: _i6.Future<_i2.ProfileDetailsModel>.value( + _FakeProfileDetailsModel_1( + this, + Invocation.method( + #getProfileDetailsBySlug, + [], + {#slug: slug}, + ), + )), + returnValueForMissingStub: _i6.Future<_i2.ProfileDetailsModel>.value( + _FakeProfileDetailsModel_1( + this, + Invocation.method( + #getProfileDetailsBySlug, + [], + {#slug: slug}, + ), + )), + ) as _i6.Future<_i2.ProfileDetailsModel>); @override _i6.Future addCircumference({ @@ -143,53 +191,59 @@ class MockProfileService extends _i1.Mock implements _i5.ProfileService { required int? hipCircumference, }) => (super.noSuchMethod( - Invocation.method(#addCircumference, [], { - #chestCircumference: chestCircumference, - #waistCircumference: waistCircumference, - #hipCircumference: hipCircumference, - }), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) - as _i6.Future); + Invocation.method( + #addCircumference, + [], + { + #chestCircumference: chestCircumference, + #waistCircumference: waistCircumference, + #hipCircumference: hipCircumference, + }, + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); @override - _i6.Future addWeight({required double? weight}) => - (super.noSuchMethod( - Invocation.method(#addWeight, [], {#weight: weight}), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) - as _i6.Future); + _i6.Future addWeight({required double? weight}) => (super.noSuchMethod( + Invocation.method( + #addWeight, + [], + {#weight: weight}, + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); @override - _i6.Future> getBlogPostByAuthorSlug({ - required String? slug, - }) => + _i6.Future> getBlogPostByAuthorSlug( + {required String? slug}) => (super.noSuchMethod( - Invocation.method(#getBlogPostByAuthorSlug, [], {#slug: slug}), - returnValue: _i6.Future>.value( - <_i7.FeedBlogPostModel>[], - ), - returnValueForMissingStub: - _i6.Future>.value( - <_i7.FeedBlogPostModel>[], - ), - ) - as _i6.Future>); + Invocation.method( + #getBlogPostByAuthorSlug, + [], + {#slug: slug}, + ), + returnValue: _i6.Future>.value( + <_i7.FeedBlogPostModel>[]), + returnValueForMissingStub: + _i6.Future>.value( + <_i7.FeedBlogPostModel>[]), + ) as _i6.Future>); @override _i6.Future> getWeight({required String? period}) => (super.noSuchMethod( - Invocation.method(#getWeight, [], {#period: period}), - returnValue: _i6.Future>.value( - <_i8.WeightModel>[], - ), - returnValueForMissingStub: _i6.Future>.value( - <_i8.WeightModel>[], - ), - ) - as _i6.Future>); + Invocation.method( + #getWeight, + [], + {#period: period}, + ), + returnValue: + _i6.Future>.value(<_i8.WeightModel>[]), + returnValueForMissingStub: + _i6.Future>.value(<_i8.WeightModel>[]), + ) as _i6.Future>); @override _i6.Future> getWeightBySlug({ @@ -197,34 +251,35 @@ class MockProfileService extends _i1.Mock implements _i5.ProfileService { required String? slug, }) => (super.noSuchMethod( - Invocation.method(#getWeightBySlug, [], { - #period: period, - #slug: slug, - }), - returnValue: _i6.Future>.value( - <_i8.WeightModel>[], - ), - returnValueForMissingStub: _i6.Future>.value( - <_i8.WeightModel>[], - ), - ) - as _i6.Future>); + Invocation.method( + #getWeightBySlug, + [], + { + #period: period, + #slug: slug, + }, + ), + returnValue: + _i6.Future>.value(<_i8.WeightModel>[]), + returnValueForMissingStub: + _i6.Future>.value(<_i8.WeightModel>[]), + ) as _i6.Future>); @override - _i6.Future> getCircumferences({ - required String? period, - }) => + _i6.Future> getCircumferences( + {required String? period}) => (super.noSuchMethod( - Invocation.method(#getCircumferences, [], {#period: period}), - returnValue: _i6.Future>.value( - <_i9.CircumferenceModel>[], - ), - returnValueForMissingStub: - _i6.Future>.value( - <_i9.CircumferenceModel>[], - ), - ) - as _i6.Future>); + Invocation.method( + #getCircumferences, + [], + {#period: period}, + ), + returnValue: _i6.Future>.value( + <_i9.CircumferenceModel>[]), + returnValueForMissingStub: + _i6.Future>.value( + <_i9.CircumferenceModel>[]), + ) as _i6.Future>); @override _i6.Future> getCircumferencesBySlug({ @@ -232,19 +287,20 @@ class MockProfileService extends _i1.Mock implements _i5.ProfileService { required String? slug, }) => (super.noSuchMethod( - Invocation.method(#getCircumferencesBySlug, [], { - #period: period, - #slug: slug, - }), - returnValue: _i6.Future>.value( - <_i9.CircumferenceModel>[], - ), - returnValueForMissingStub: - _i6.Future>.value( - <_i9.CircumferenceModel>[], - ), - ) - as _i6.Future>); + Invocation.method( + #getCircumferencesBySlug, + [], + { + #period: period, + #slug: slug, + }, + ), + returnValue: _i6.Future>.value( + <_i9.CircumferenceModel>[]), + returnValueForMissingStub: + _i6.Future>.value( + <_i9.CircumferenceModel>[]), + ) as _i6.Future>); @override _i6.Future<_i3.SubPaginationModel> getSubscribers({ @@ -252,30 +308,39 @@ class MockProfileService extends _i1.Mock implements _i5.ProfileService { String? query, }) => (super.noSuchMethod( - Invocation.method(#getSubscribers, [], { + Invocation.method( + #getSubscribers, + [], + { + #slug: slug, + #query: query, + }, + ), + returnValue: + _i6.Future<_i3.SubPaginationModel>.value(_FakeSubPaginationModel_2( + this, + Invocation.method( + #getSubscribers, + [], + { #slug: slug, #query: query, - }), - returnValue: _i6.Future<_i3.SubPaginationModel>.value( - _FakeSubPaginationModel_2( - this, - Invocation.method(#getSubscribers, [], { - #slug: slug, - #query: query, - }), - ), - ), - returnValueForMissingStub: _i6.Future<_i3.SubPaginationModel>.value( - _FakeSubPaginationModel_2( - this, - Invocation.method(#getSubscribers, [], { - #slug: slug, - #query: query, - }), - ), - ), - ) - as _i6.Future<_i3.SubPaginationModel>); + }, + ), + )), + returnValueForMissingStub: + _i6.Future<_i3.SubPaginationModel>.value(_FakeSubPaginationModel_2( + this, + Invocation.method( + #getSubscribers, + [], + { + #slug: slug, + #query: query, + }, + ), + )), + ) as _i6.Future<_i3.SubPaginationModel>); @override _i6.Future<_i3.SubPaginationModel> getSubscriptions({ @@ -283,84 +348,107 @@ class MockProfileService extends _i1.Mock implements _i5.ProfileService { String? query, }) => (super.noSuchMethod( - Invocation.method(#getSubscriptions, [], { + Invocation.method( + #getSubscriptions, + [], + { + #slug: slug, + #query: query, + }, + ), + returnValue: + _i6.Future<_i3.SubPaginationModel>.value(_FakeSubPaginationModel_2( + this, + Invocation.method( + #getSubscriptions, + [], + { #slug: slug, #query: query, - }), - returnValue: _i6.Future<_i3.SubPaginationModel>.value( - _FakeSubPaginationModel_2( - this, - Invocation.method(#getSubscriptions, [], { - #slug: slug, - #query: query, - }), - ), - ), - returnValueForMissingStub: _i6.Future<_i3.SubPaginationModel>.value( - _FakeSubPaginationModel_2( - this, - Invocation.method(#getSubscriptions, [], { - #slug: slug, - #query: query, - }), - ), - ), - ) - as _i6.Future<_i3.SubPaginationModel>); + }, + ), + )), + returnValueForMissingStub: + _i6.Future<_i3.SubPaginationModel>.value(_FakeSubPaginationModel_2( + this, + Invocation.method( + #getSubscriptions, + [], + { + #slug: slug, + #query: query, + }, + ), + )), + ) as _i6.Future<_i3.SubPaginationModel>); @override - _i6.Future subscribe({required String? slug}) => - (super.noSuchMethod( - Invocation.method(#subscribe, [], {#slug: slug}), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) - as _i6.Future); + _i6.Future subscribe({required String? slug}) => (super.noSuchMethod( + Invocation.method( + #subscribe, + [], + {#slug: slug}, + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); @override - _i6.Future unsubscribe({required String? slug}) => - (super.noSuchMethod( - Invocation.method(#unsubscribe, [], {#slug: slug}), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) - as _i6.Future); + _i6.Future unsubscribe({required String? slug}) => (super.noSuchMethod( + Invocation.method( + #unsubscribe, + [], + {#slug: slug}, + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); @override _i6.Future uploadPhoto({required _i10.File? photo}) => (super.noSuchMethod( - Invocation.method(#uploadPhoto, [], {#photo: photo}), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) - as _i6.Future); + Invocation.method( + #uploadPhoto, + [], + {#photo: photo}, + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); @override - _i6.Future deletePhoto() => - (super.noSuchMethod( - Invocation.method(#deletePhoto, []), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) - as _i6.Future); + _i6.Future deletePhoto() => (super.noSuchMethod( + Invocation.method( + #deletePhoto, + [], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); @override _i6.Future<_i4.ChosenDietsPaginationModel> getChosenDiets() => (super.noSuchMethod( - Invocation.method(#getChosenDiets, []), - returnValue: _i6.Future<_i4.ChosenDietsPaginationModel>.value( - _FakeChosenDietsPaginationModel_3( - this, - Invocation.method(#getChosenDiets, []), - ), - ), - returnValueForMissingStub: - _i6.Future<_i4.ChosenDietsPaginationModel>.value( - _FakeChosenDietsPaginationModel_3( - this, - Invocation.method(#getChosenDiets, []), - ), - ), - ) - as _i6.Future<_i4.ChosenDietsPaginationModel>); + Invocation.method( + #getChosenDiets, + [], + ), + returnValue: _i6.Future<_i4.ChosenDietsPaginationModel>.value( + _FakeChosenDietsPaginationModel_3( + this, + Invocation.method( + #getChosenDiets, + [], + ), + )), + returnValueForMissingStub: + _i6.Future<_i4.ChosenDietsPaginationModel>.value( + _FakeChosenDietsPaginationModel_3( + this, + Invocation.method( + #getChosenDiets, + [], + ), + )), + ) as _i6.Future<_i4.ChosenDietsPaginationModel>); }