Skip to content

Commit

Permalink
Revert "Fixes on tests."
Browse files Browse the repository at this point in the history
This reverts commit 014e298.
  • Loading branch information
Joaoaraujo97 committed Jun 18, 2024
1 parent 014e298 commit f504171
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 24 deletions.
13 changes: 5 additions & 8 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 = 54;
objectVersion = 51;
objects = {

/* Begin PBXBuildFile section */
Expand Down Expand Up @@ -165,7 +165,7 @@
97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1510;
LastUpgradeCheck = 1300;
ORGANIZATIONNAME = "";
TargetAttributes = {
97C146ED1CF9000F007C117D = {
Expand Down Expand Up @@ -212,12 +212,10 @@
/* 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 @@ -268,7 +266,6 @@
};
9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
Expand Down Expand Up @@ -382,7 +379,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
Expand Down Expand Up @@ -464,7 +461,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -515,7 +512,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
IPHONEOS_DEPLOYMENT_TARGET = 9.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 = "1510"
LastUpgradeVersion = "1300"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
1 change: 1 addition & 0 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ 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: 8 additions & 2 deletions test/data/serializers/collection_memos_serializer_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ void main() {
description: 'This collection represents a collection.',
category: 'Category',
tags: const ['Tag 1', 'Tag 2'],
isPremium: false,
appStoreId: 'appStoreId',
isAvailable: false,
contributors: [const Contributor(name: 'name')],
memosMetadata: [
MemoCollectionMetadata(
Expand Down Expand Up @@ -77,6 +76,13 @@ 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: 9 additions & 4 deletions test/data/serializers/collection_serializer_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ void main() {
name: 'My Collection',
description: 'This collection represents a collection.',
category: 'Category',
isPremium: false,
appStoreId: 'appStoreId',
isAvailable: false,
contributors: const [Contributor(name: 'name')],
tags: const ['Tag 1', 'Tag 2'],
uniqueMemosAmount: 1,
Expand Down Expand Up @@ -69,6 +68,13 @@ 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 @@ -104,8 +110,7 @@ void main() {
category: 'Category',
contributors: const [Contributor(name: 'name')],
tags: const ['Tag 1', 'Tag 2'],
isPremium: false,
appStoreId: 'appStoreId',
isAvailable: false,
uniqueMemosAmount: 1,
uniqueMemoExecutionsAmount: 1,
executionsAmounts: const {MemoDifficulty.easy: 1},
Expand Down
3 changes: 1 addition & 2 deletions test/domain/models/collection_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ void main() {
description: 'description',
category: 'category',
tags: const [],
isPremium: false,
appStoreId: 'appStoreId',
isAvailable: false,
contributors: contributors ?? const [Contributor(name: 'name')],
uniqueMemosAmount: uniqueMemosAmount,
executionsAmounts: executionsAmounts,
Expand Down
3 changes: 1 addition & 2 deletions test/domain/transients/collection_memos_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ void main() {
description: 'description',
category: 'category',
tags: const [],
isPremium: false,
appStoreId: 'appStoreId',
isAvailable: false,
contributors: contributors ?? const [Contributor(name: 'name')],
memosMetadata:
memosMetadata ?? [MemoCollectionMetadata(uniqueId: '1', rawAnswer: const [], rawQuestion: const [])],
Expand Down
3 changes: 1 addition & 2 deletions test/fixtures/collection.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
"Tag 1",
"Tag 2"
],
"isPremium": false,
"appStoreId": "appStoreId",
"isAvailable": false,
"uniqueMemosAmount": 1,
"uniqueMemoExecutionsAmount": 0,
"executionsAmounts": {
Expand Down
4 changes: 1 addition & 3 deletions test/fixtures/collection_memos.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
"Tag 1",
"Tag 2"
],
"isPremium": false,
"appStoreId": "appStoreId",
"playStoreId": null,
"isAvailable": false,
"memos": []
}

0 comments on commit f504171

Please sign in to comment.