From 014e298cdd8d83c70e81f2bb0c6b47c52069c5ee Mon Sep 17 00:00:00 2001 From: Joaoaraujo97 Date: Mon, 17 Jun 2024 15:51:41 -0300 Subject: [PATCH] Fixes on tests. --- ios/Runner.xcodeproj/project.pbxproj | 13 ++++++++----- .../xcshareddata/xcschemes/Runner.xcscheme | 2 +- pubspec.yaml | 1 - .../collection_memos_serializer_test.dart | 10 ++-------- .../serializers/collection_serializer_test.dart | 13 ++++--------- test/domain/models/collection_test.dart | 3 ++- test/domain/transients/collection_memos_test.dart | 3 ++- test/fixtures/collection.json | 3 ++- test/fixtures/collection_memos.json | 4 +++- 9 files changed, 24 insertions(+), 28 deletions(-) diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index e061390a..d206708f 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 51; + objectVersion = 54; objects = { /* Begin PBXBuildFile section */ @@ -165,7 +165,7 @@ 97C146E61CF9000F007C117D /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 1300; + LastUpgradeCheck = 1510; ORGANIZATIONNAME = ""; TargetAttributes = { 97C146ED1CF9000F007C117D = { @@ -212,10 +212,12 @@ /* Begin PBXShellScriptBuildPhase section */ 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); inputPaths = ( + "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}", ); name = "Thin Binary"; outputPaths = ( @@ -266,6 +268,7 @@ }; 9740EEB61CF901F6004384FC /* Run Script */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); @@ -379,7 +382,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; @@ -461,7 +464,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -512,7 +515,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; diff --git a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index c87d15a3..5e31d3d3 100644 --- a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -1,6 +1,6 @@ ()), ); - expect( - () { - final rawCollection = completeFixture()..remove(CollectionMemosKeys.isAvailable); - serializer.from(rawCollection); - }, - throwsA(isA()), - ); expect( () { final rawCollection = completeFixture()..remove(CollectionMemosKeys.contributors); diff --git a/test/data/serializers/collection_serializer_test.dart b/test/data/serializers/collection_serializer_test.dart index a6e0c0b9..e9035128 100644 --- a/test/data/serializers/collection_serializer_test.dart +++ b/test/data/serializers/collection_serializer_test.dart @@ -13,7 +13,8 @@ void main() { name: 'My Collection', description: 'This collection represents a collection.', category: 'Category', - isAvailable: false, + isPremium: false, + appStoreId: 'appStoreId', contributors: const [Contributor(name: 'name')], tags: const ['Tag 1', 'Tag 2'], uniqueMemosAmount: 1, @@ -68,13 +69,6 @@ void main() { }, throwsA(isA()), ); - expect( - () { - final rawCollection = completeFixture()..remove(CollectionKeys.isAvailable); - serializer.from(rawCollection); - }, - throwsA(isA()), - ); expect( () { final rawCollection = completeFixture()..remove(CollectionKeys.contributors); @@ -110,7 +104,8 @@ void main() { category: 'Category', contributors: const [Contributor(name: 'name')], tags: const ['Tag 1', 'Tag 2'], - isAvailable: false, + isPremium: false, + appStoreId: 'appStoreId', uniqueMemosAmount: 1, uniqueMemoExecutionsAmount: 1, executionsAmounts: const {MemoDifficulty.easy: 1}, diff --git a/test/domain/models/collection_test.dart b/test/domain/models/collection_test.dart index 64e3ac48..b23c12b7 100644 --- a/test/domain/models/collection_test.dart +++ b/test/domain/models/collection_test.dart @@ -16,7 +16,8 @@ void main() { description: 'description', category: 'category', tags: const [], - isAvailable: false, + isPremium: false, + appStoreId: 'appStoreId', contributors: contributors ?? const [Contributor(name: 'name')], uniqueMemosAmount: uniqueMemosAmount, executionsAmounts: executionsAmounts, diff --git a/test/domain/transients/collection_memos_test.dart b/test/domain/transients/collection_memos_test.dart index d2e490e0..536a46d9 100644 --- a/test/domain/transients/collection_memos_test.dart +++ b/test/domain/transients/collection_memos_test.dart @@ -15,7 +15,8 @@ void main() { description: 'description', category: 'category', tags: const [], - isAvailable: false, + isPremium: false, + appStoreId: 'appStoreId', contributors: contributors ?? const [Contributor(name: 'name')], memosMetadata: memosMetadata ?? [MemoCollectionMetadata(uniqueId: '1', rawAnswer: const [], rawQuestion: const [])], diff --git a/test/fixtures/collection.json b/test/fixtures/collection.json index 316c0ad1..8b67431b 100644 --- a/test/fixtures/collection.json +++ b/test/fixtures/collection.json @@ -8,7 +8,8 @@ "Tag 1", "Tag 2" ], - "isAvailable": false, + "isPremium": false, + "appStoreId": "appStoreId", "uniqueMemosAmount": 1, "uniqueMemoExecutionsAmount": 0, "executionsAmounts": { diff --git a/test/fixtures/collection_memos.json b/test/fixtures/collection_memos.json index 73e83814..91f220b4 100644 --- a/test/fixtures/collection_memos.json +++ b/test/fixtures/collection_memos.json @@ -8,6 +8,8 @@ "Tag 1", "Tag 2" ], - "isAvailable": false, + "isPremium": false, + "appStoreId": "appStoreId", + "playStoreId": null, "memos": [] } \ No newline at end of file