Skip to content

Commit

Permalink
Fixes on tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
Joaoaraujo97 committed Jun 17, 2024
1 parent 38ec4a7 commit 014e298
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 28 deletions.
13 changes: 8 additions & 5 deletions ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 51;
objectVersion = 54;
objects = {

/* Begin PBXBuildFile section */
Expand Down Expand Up @@ -165,7 +165,7 @@
97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1300;
LastUpgradeCheck = 1510;
ORGANIZATIONNAME = "";
TargetAttributes = {
97C146ED1CF9000F007C117D = {
Expand Down Expand Up @@ -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 = (
Expand Down Expand Up @@ -266,6 +268,7 @@
};
9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1300"
LastUpgradeVersion = "1510"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
1 change: 0 additions & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ dependencies:
# Keep dependency locked, as we need it to be the exact same in `memo-editor`
flutter_quill: ^9.3.3
purchases_flutter: ^6.29.1
purchases_ui_flutter: ^6.29.1

dev_dependencies:
flutter_test:
Expand Down
10 changes: 2 additions & 8 deletions test/data/serializers/collection_memos_serializer_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ void main() {
description: 'This collection represents a collection.',
category: 'Category',
tags: const ['Tag 1', 'Tag 2'],
isAvailable: false,
isPremium: false,
appStoreId: 'appStoreId',
contributors: [const Contributor(name: 'name')],
memosMetadata: [
MemoCollectionMetadata(
Expand Down Expand Up @@ -76,13 +77,6 @@ void main() {
},
throwsA(isA<TypeError>()),
);
expect(
() {
final rawCollection = completeFixture()..remove(CollectionMemosKeys.isAvailable);
serializer.from(rawCollection);
},
throwsA(isA<TypeError>()),
);
expect(
() {
final rawCollection = completeFixture()..remove(CollectionMemosKeys.contributors);
Expand Down
13 changes: 4 additions & 9 deletions test/data/serializers/collection_serializer_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -68,13 +69,6 @@ void main() {
},
throwsA(isA<TypeError>()),
);
expect(
() {
final rawCollection = completeFixture()..remove(CollectionKeys.isAvailable);
serializer.from(rawCollection);
},
throwsA(isA<TypeError>()),
);
expect(
() {
final rawCollection = completeFixture()..remove(CollectionKeys.contributors);
Expand Down Expand Up @@ -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},
Expand Down
3 changes: 2 additions & 1 deletion test/domain/models/collection_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
3 changes: 2 additions & 1 deletion test/domain/transients/collection_memos_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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 [])],
Expand Down
3 changes: 2 additions & 1 deletion test/fixtures/collection.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"Tag 1",
"Tag 2"
],
"isAvailable": false,
"isPremium": false,
"appStoreId": "appStoreId",
"uniqueMemosAmount": 1,
"uniqueMemoExecutionsAmount": 0,
"executionsAmounts": {
Expand Down
4 changes: 3 additions & 1 deletion test/fixtures/collection_memos.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
"Tag 1",
"Tag 2"
],
"isAvailable": false,
"isPremium": false,
"appStoreId": "appStoreId",
"playStoreId": null,
"memos": []
}

0 comments on commit 014e298

Please sign in to comment.