Skip to content

Commit 365ee1d

Browse files
committed
implementado SnapShotTest na ActivityDetails
1 parent afef91d commit 365ee1d

File tree

4 files changed

+41
-138
lines changed

4 files changed

+41
-138
lines changed

solutions/devsprint-caio-santos-7/FinanceApp.xcodeproj/project.pbxproj

Lines changed: 12 additions & 138 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
25C8174B28F608BF003127C0 /* AccountSummaryView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 25C8174A28F608BF003127C0 /* AccountSummaryView.swift */; };
1212
25C8174D28F60A0C003127C0 /* ViewCodable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 25C8174C28F60A0C003127C0 /* ViewCodable.swift */; };
1313
25C8175528F772FD003127C0 /* AccountSummaryViewTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 25C8175428F772FD003127C0 /* AccountSummaryViewTests.swift */; };
14+
65424F8C28F8CF8A00F7E8D4 /* ActivityDetailsViewTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65424F8B28F8CF8A00F7E8D4 /* ActivityDetailsViewTests.swift */; };
1415
98584A6D277E32C30028DBEA /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 98584A6C277E32C30028DBEA /* AppDelegate.swift */; };
1516
98584A6F277E32C30028DBEA /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 98584A6E277E32C30028DBEA /* SceneDelegate.swift */; };
1617
98584A76277E32C50028DBEA /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 98584A75277E32C50028DBEA /* Assets.xcassets */; };
@@ -36,7 +37,6 @@
3637
98C8A4E327C819DE00A630ED /* Contact.swift in Sources */ = {isa = PBXBuildFile; fileRef = 98C8A4E227C819DE00A630ED /* Contact.swift */; };
3738
98C8A4E527C81A3F00A630ED /* TransferResult.swift in Sources */ = {isa = PBXBuildFile; fileRef = 98C8A4E427C81A3F00A630ED /* TransferResult.swift */; };
3839
98C8A4E727C81A9C00A630ED /* UserProfile.swift in Sources */ = {isa = PBXBuildFile; fileRef = 98C8A4E627C81A9C00A630ED /* UserProfile.swift */; };
39-
A8A985E21DB09F86D3EECE24 /* Pods_FinanceApp_FinanceAppUITests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4A5A6F294F414949861585C4 /* Pods_FinanceApp_FinanceAppUITests.framework */; };
4040
D7292043FD377209482E7A09 /* Pods_FinanceApp.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 55C4E25CA63BCFCC105EC051 /* Pods_FinanceApp.framework */; };
4141
/* End PBXBuildFile section */
4242

@@ -48,13 +48,6 @@
4848
remoteGlobalIDString = 98584A68277E32C30028DBEA;
4949
remoteInfo = FinanceApp;
5050
};
51-
98584A8A277E32C60028DBEA /* PBXContainerItemProxy */ = {
52-
isa = PBXContainerItemProxy;
53-
containerPortal = 98584A61277E32C30028DBEA /* Project object */;
54-
proxyType = 1;
55-
remoteGlobalIDString = 98584A68277E32C30028DBEA;
56-
remoteInfo = FinanceApp;
57-
};
5851
/* End PBXContainerItemProxy section */
5952

6053
/* Begin PBXFileReference section */
@@ -67,6 +60,7 @@
6760
4A5A6F294F414949861585C4 /* Pods_FinanceApp_FinanceAppUITests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_FinanceApp_FinanceAppUITests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
6861
55C4E25CA63BCFCC105EC051 /* Pods_FinanceApp.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_FinanceApp.framework; sourceTree = BUILT_PRODUCTS_DIR; };
6962
61A71CDF7B0095F152A3CD4E /* Pods-FinanceApp-FinanceAppUITests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-FinanceApp-FinanceAppUITests.debug.xcconfig"; path = "Target Support Files/Pods-FinanceApp-FinanceAppUITests/Pods-FinanceApp-FinanceAppUITests.debug.xcconfig"; sourceTree = "<group>"; };
63+
65424F8B28F8CF8A00F7E8D4 /* ActivityDetailsViewTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ActivityDetailsViewTests.swift; sourceTree = "<group>"; };
7064
6989344458FFDBA154C3EC32 /* Pods-FinanceApp-FinanceAppUITests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-FinanceApp-FinanceAppUITests.release.xcconfig"; path = "Target Support Files/Pods-FinanceApp-FinanceAppUITests/Pods-FinanceApp-FinanceAppUITests.release.xcconfig"; sourceTree = "<group>"; };
7165
98584A69277E32C30028DBEA /* FinanceApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = FinanceApp.app; sourceTree = BUILT_PRODUCTS_DIR; };
7266
98584A6C277E32C30028DBEA /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
@@ -75,7 +69,6 @@
7569
98584A78277E32C50028DBEA /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
7670
98584A7A277E32C50028DBEA /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
7771
98584A7F277E32C60028DBEA /* FinanceAppTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = FinanceAppTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
78-
98584A89277E32C60028DBEA /* FinanceAppUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = FinanceAppUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
7972
98584AA4277E35E90028DBEA /* HomeViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeViewController.swift; sourceTree = "<group>"; };
8073
98584AA6277E35F10028DBEA /* HomeView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeView.swift; sourceTree = "<group>"; };
8174
98584AC2277E42E80028DBEA /* FinanceService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FinanceService.swift; sourceTree = "<group>"; };
@@ -118,14 +111,6 @@
118111
);
119112
runOnlyForDeploymentPostprocessing = 0;
120113
};
121-
98584A86277E32C60028DBEA /* Frameworks */ = {
122-
isa = PBXFrameworksBuildPhase;
123-
buildActionMask = 2147483647;
124-
files = (
125-
A8A985E21DB09F86D3EECE24 /* Pods_FinanceApp_FinanceAppUITests.framework in Frameworks */,
126-
);
127-
runOnlyForDeploymentPostprocessing = 0;
128-
};
129114
/* End PBXFrameworksBuildPhase section */
130115

131116
/* Begin PBXGroup section */
@@ -141,6 +126,7 @@
141126
25C8175228F772BE003127C0 /* Screens */ = {
142127
isa = PBXGroup;
143128
children = (
129+
65424F8A28F8CF6300F7E8D4 /* ActivityDetails */,
144130
25C8175328F772C5003127C0 /* Components */,
145131
);
146132
path = Screens;
@@ -167,6 +153,14 @@
167153
path = Pods;
168154
sourceTree = "<group>";
169155
};
156+
65424F8A28F8CF6300F7E8D4 /* ActivityDetails */ = {
157+
isa = PBXGroup;
158+
children = (
159+
65424F8B28F8CF8A00F7E8D4 /* ActivityDetailsViewTests.swift */,
160+
);
161+
path = ActivityDetails;
162+
sourceTree = "<group>";
163+
};
170164
820E387591A4D6261F2D6AF5 /* Frameworks */ = {
171165
isa = PBXGroup;
172166
children = (
@@ -182,7 +176,6 @@
182176
children = (
183177
98584A6B277E32C30028DBEA /* FinanceApp */,
184178
98584A82277E32C60028DBEA /* FinanceAppTests */,
185-
98584A8C277E32C60028DBEA /* FinanceAppUITests */,
186179
98584A6A277E32C30028DBEA /* Products */,
187180
51E5AEA143646311ECCE5A29 /* Pods */,
188181
820E387591A4D6261F2D6AF5 /* Frameworks */,
@@ -194,7 +187,6 @@
194187
children = (
195188
98584A69277E32C30028DBEA /* FinanceApp.app */,
196189
98584A7F277E32C60028DBEA /* FinanceAppTests.xctest */,
197-
98584A89277E32C60028DBEA /* FinanceAppUITests.xctest */,
198190
);
199191
name = Products;
200192
sourceTree = "<group>";
@@ -221,13 +213,6 @@
221213
path = FinanceAppTests;
222214
sourceTree = "<group>";
223215
};
224-
98584A8C277E32C60028DBEA /* FinanceAppUITests */ = {
225-
isa = PBXGroup;
226-
children = (
227-
);
228-
path = FinanceAppUITests;
229-
sourceTree = "<group>";
230-
};
231216
98584A9C277E350D0028DBEA /* AppDelegate */ = {
232217
isa = PBXGroup;
233218
children = (
@@ -393,25 +378,6 @@
393378
productReference = 98584A7F277E32C60028DBEA /* FinanceAppTests.xctest */;
394379
productType = "com.apple.product-type.bundle.unit-test";
395380
};
396-
98584A88277E32C60028DBEA /* FinanceAppUITests */ = {
397-
isa = PBXNativeTarget;
398-
buildConfigurationList = 98584A99277E32C60028DBEA /* Build configuration list for PBXNativeTarget "FinanceAppUITests" */;
399-
buildPhases = (
400-
393A39408D8B880CDB2FAB8A /* [CP] Check Pods Manifest.lock */,
401-
98584A85277E32C60028DBEA /* Sources */,
402-
98584A86277E32C60028DBEA /* Frameworks */,
403-
98584A87277E32C60028DBEA /* Resources */,
404-
);
405-
buildRules = (
406-
);
407-
dependencies = (
408-
98584A8B277E32C60028DBEA /* PBXTargetDependency */,
409-
);
410-
name = FinanceAppUITests;
411-
productName = FinanceAppUITests;
412-
productReference = 98584A89277E32C60028DBEA /* FinanceAppUITests.xctest */;
413-
productType = "com.apple.product-type.bundle.ui-testing";
414-
};
415381
/* End PBXNativeTarget section */
416382

417383
/* Begin PBXProject section */
@@ -429,10 +395,6 @@
429395
CreatedOnToolsVersion = 13.2.1;
430396
TestTargetID = 98584A68277E32C30028DBEA;
431397
};
432-
98584A88277E32C60028DBEA = {
433-
CreatedOnToolsVersion = 13.2.1;
434-
TestTargetID = 98584A68277E32C30028DBEA;
435-
};
436398
};
437399
};
438400
buildConfigurationList = 98584A64277E32C30028DBEA /* Build configuration list for PBXProject "FinanceApp" */;
@@ -450,7 +412,6 @@
450412
targets = (
451413
98584A68277E32C30028DBEA /* FinanceApp */,
452414
98584A7E277E32C60028DBEA /* FinanceAppTests */,
453-
98584A88277E32C60028DBEA /* FinanceAppUITests */,
454415
);
455416
};
456417
/* End PBXProject section */
@@ -472,13 +433,6 @@
472433
);
473434
runOnlyForDeploymentPostprocessing = 0;
474435
};
475-
98584A87277E32C60028DBEA /* Resources */ = {
476-
isa = PBXResourcesBuildPhase;
477-
buildActionMask = 2147483647;
478-
files = (
479-
);
480-
runOnlyForDeploymentPostprocessing = 0;
481-
};
482436
/* End PBXResourcesBuildPhase section */
483437

484438
/* Begin PBXShellScriptBuildPhase section */
@@ -504,28 +458,6 @@
504458
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
505459
showEnvVarsInLog = 0;
506460
};
507-
393A39408D8B880CDB2FAB8A /* [CP] Check Pods Manifest.lock */ = {
508-
isa = PBXShellScriptBuildPhase;
509-
buildActionMask = 2147483647;
510-
files = (
511-
);
512-
inputFileListPaths = (
513-
);
514-
inputPaths = (
515-
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
516-
"${PODS_ROOT}/Manifest.lock",
517-
);
518-
name = "[CP] Check Pods Manifest.lock";
519-
outputFileListPaths = (
520-
);
521-
outputPaths = (
522-
"$(DERIVED_FILE_DIR)/Pods-FinanceApp-FinanceAppUITests-checkManifestLockResult.txt",
523-
);
524-
runOnlyForDeploymentPostprocessing = 0;
525-
shellPath = /bin/sh;
526-
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
527-
showEnvVarsInLog = 0;
528-
};
529461
68BF10F55AF59FA516E57803 /* [CP] Check Pods Manifest.lock */ = {
530462
isa = PBXShellScriptBuildPhase;
531463
buildActionMask = 2147483647;
@@ -604,17 +536,11 @@
604536
isa = PBXSourcesBuildPhase;
605537
buildActionMask = 2147483647;
606538
files = (
539+
65424F8C28F8CF8A00F7E8D4 /* ActivityDetailsViewTests.swift in Sources */,
607540
25C8175528F772FD003127C0 /* AccountSummaryViewTests.swift in Sources */,
608541
);
609542
runOnlyForDeploymentPostprocessing = 0;
610543
};
611-
98584A85277E32C60028DBEA /* Sources */ = {
612-
isa = PBXSourcesBuildPhase;
613-
buildActionMask = 2147483647;
614-
files = (
615-
);
616-
runOnlyForDeploymentPostprocessing = 0;
617-
};
618544
/* End PBXSourcesBuildPhase section */
619545

620546
/* Begin PBXTargetDependency section */
@@ -623,11 +549,6 @@
623549
target = 98584A68277E32C30028DBEA /* FinanceApp */;
624550
targetProxy = 98584A80277E32C60028DBEA /* PBXContainerItemProxy */;
625551
};
626-
98584A8B277E32C60028DBEA /* PBXTargetDependency */ = {
627-
isa = PBXTargetDependency;
628-
target = 98584A68277E32C30028DBEA /* FinanceApp */;
629-
targetProxy = 98584A8A277E32C60028DBEA /* PBXContainerItemProxy */;
630-
};
631552
/* End PBXTargetDependency section */
632553

633554
/* Begin PBXVariantGroup section */
@@ -858,44 +779,6 @@
858779
};
859780
name = Release;
860781
};
861-
98584A9A277E32C60028DBEA /* Debug */ = {
862-
isa = XCBuildConfiguration;
863-
baseConfigurationReference = 61A71CDF7B0095F152A3CD4E /* Pods-FinanceApp-FinanceAppUITests.debug.xcconfig */;
864-
buildSettings = {
865-
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
866-
CODE_SIGN_STYLE = Automatic;
867-
CURRENT_PROJECT_VERSION = 1;
868-
DEVELOPMENT_TEAM = B8F644M47X;
869-
GENERATE_INFOPLIST_FILE = YES;
870-
MARKETING_VERSION = 1.0;
871-
PRODUCT_BUNDLE_IDENTIFIER = com.devpass.FinanceAppUITests;
872-
PRODUCT_NAME = "$(TARGET_NAME)";
873-
SWIFT_EMIT_LOC_STRINGS = NO;
874-
SWIFT_VERSION = 5.0;
875-
TARGETED_DEVICE_FAMILY = "1,2";
876-
TEST_TARGET_NAME = FinanceApp;
877-
};
878-
name = Debug;
879-
};
880-
98584A9B277E32C60028DBEA /* Release */ = {
881-
isa = XCBuildConfiguration;
882-
baseConfigurationReference = 6989344458FFDBA154C3EC32 /* Pods-FinanceApp-FinanceAppUITests.release.xcconfig */;
883-
buildSettings = {
884-
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
885-
CODE_SIGN_STYLE = Automatic;
886-
CURRENT_PROJECT_VERSION = 1;
887-
DEVELOPMENT_TEAM = B8F644M47X;
888-
GENERATE_INFOPLIST_FILE = YES;
889-
MARKETING_VERSION = 1.0;
890-
PRODUCT_BUNDLE_IDENTIFIER = com.devpass.FinanceAppUITests;
891-
PRODUCT_NAME = "$(TARGET_NAME)";
892-
SWIFT_EMIT_LOC_STRINGS = NO;
893-
SWIFT_VERSION = 5.0;
894-
TARGETED_DEVICE_FAMILY = "1,2";
895-
TEST_TARGET_NAME = FinanceApp;
896-
};
897-
name = Release;
898-
};
899782
/* End XCBuildConfiguration section */
900783

901784
/* Begin XCConfigurationList section */
@@ -926,15 +809,6 @@
926809
defaultConfigurationIsVisible = 0;
927810
defaultConfigurationName = Release;
928811
};
929-
98584A99277E32C60028DBEA /* Build configuration list for PBXNativeTarget "FinanceAppUITests" */ = {
930-
isa = XCConfigurationList;
931-
buildConfigurations = (
932-
98584A9A277E32C60028DBEA /* Debug */,
933-
98584A9B277E32C60028DBEA /* Release */,
934-
);
935-
defaultConfigurationIsVisible = 0;
936-
defaultConfigurationName = Release;
937-
};
938812
/* End XCConfigurationList section */
939813
};
940814
rootObject = 98584A61277E32C30028DBEA /* Project object */;
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
//
2+
// ActivityDetailsViewTests.swift
3+
// FinanceAppTests
4+
//
5+
// Created by Gabriel de Castro Chaves on 13/10/22.
6+
//
7+
8+
@testable import FinanceApp
9+
import SnapshotTesting
10+
import XCTest
11+
12+
final class ActivityDetailsViewTests: XCTestCase {
13+
14+
override class func setUp() {
15+
// SnapshotTesting.isRecording = true
16+
}
17+
18+
func testLoadingComponent() {
19+
let component = ActivityDetailsViewController()
20+
//component.backgroundColor = .yellow
21+
assertSnapshot(matching: component, as: .image(on: .iPhoneX))
22+
}
23+
24+
func testLoadedComponent() {
25+
let component = ActivityDetailsViewController()
26+
//component.backgroundColor = .yellow
27+
assertSnapshot(matching: component, as: .image(on: .iPhoneX))
28+
}
29+
}
Loading
Loading

0 commit comments

Comments
 (0)