Skip to content

Commit 488c8a2

Browse files
authored
Feature snapshot test (#196)
* corrigindo teste de snapshot e gerando snapshot * deletando arquivo da pasta solutions
1 parent 6afe2e3 commit 488c8a2

File tree

4 files changed

+44
-1
lines changed

4 files changed

+44
-1
lines changed

solutions/devsprint-matheus-reis-8/GitHubApp.xcodeproj/project.pbxproj

+4
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
9826D9102788B8EA00E05400 /* SettingsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9826D90F2788B8EA00E05400 /* SettingsView.swift */; };
3434
9826D9132788BAC200E05400 /* DebugViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9826D9122788BAC200E05400 /* DebugViewController.swift */; };
3535
C18492CA29DCB15400043B88 /* RepositoryCellView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C18492C929DCB15400043B88 /* RepositoryCellView.swift */; };
36+
C19CC14529DE1FD100E604F1 /* RepositoryCellViewTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C19CC14429DE1FD100E604F1 /* RepositoryCellViewTests.swift */; };
3637
/* End PBXBuildFile section */
3738

3839
/* Begin PBXContainerItemProxy section */
@@ -83,6 +84,7 @@
8384
9826D9122788BAC200E05400 /* DebugViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DebugViewController.swift; sourceTree = "<group>"; };
8485
B22BF462A559B5AA593DB184 /* Pods-GitHubApp-GitHubAppUITests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-GitHubApp-GitHubAppUITests.debug.xcconfig"; path = "Target Support Files/Pods-GitHubApp-GitHubAppUITests/Pods-GitHubApp-GitHubAppUITests.debug.xcconfig"; sourceTree = "<group>"; };
8586
C18492C929DCB15400043B88 /* RepositoryCellView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RepositoryCellView.swift; sourceTree = "<group>"; };
87+
C19CC14429DE1FD100E604F1 /* RepositoryCellViewTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RepositoryCellViewTests.swift; sourceTree = "<group>"; };
8688
D3A41DBB4385986B06ADD4B6 /* Pods-GitHubApp.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-GitHubApp.debug.xcconfig"; path = "Target Support Files/Pods-GitHubApp/Pods-GitHubApp.debug.xcconfig"; sourceTree = "<group>"; };
8789
D50A9E30BE32837E97FA533F /* Pods_GitHubApp.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_GitHubApp.framework; sourceTree = BUILT_PRODUCTS_DIR; };
8890
EB2CADBCCEAADDC1903E7E60 /* Pods-GitHubApp.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-GitHubApp.release.xcconfig"; path = "Target Support Files/Pods-GitHubApp/Pods-GitHubApp.release.xcconfig"; sourceTree = "<group>"; };
@@ -181,6 +183,7 @@
181183
9826D8CA2788B40800E05400 /* GitHubAppTests */ = {
182184
isa = PBXGroup;
183185
children = (
186+
C19CC14429DE1FD100E604F1 /* RepositoryCellViewTests.swift */,
184187
9826D8CB2788B40800E05400 /* GitHubAppTests.swift */,
185188
0989B90E29DF52660033E72C /* LoadingViewTests.swift */,
186189
);
@@ -541,6 +544,7 @@
541544
isa = PBXSourcesBuildPhase;
542545
buildActionMask = 2147483647;
543546
files = (
547+
C19CC14529DE1FD100E604F1 /* RepositoryCellViewTests.swift in Sources */,
544548
9826D8CC2788B40800E05400 /* GitHubAppTests.swift in Sources */,
545549
0989B90F29DF52660033E72C /* LoadingViewTests.swift in Sources */,
546550
);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
//
2+
// SnapshotTestRepositoryViewCell.swift
3+
// GitHubAppTests
4+
//
5+
// Created by GISELE TOLEDO on 05/04/23.
6+
//
7+
8+
import XCTest
9+
import SnapshotTesting
10+
11+
@testable import GitHubApp
12+
13+
14+
class RepositoryCellViewTests: XCTestCase {
15+
16+
override func setUpWithError() throws {
17+
// Put setup code here. This method is called before the invocation of each test method in the class.
18+
}
19+
20+
override func tearDownWithError() throws {
21+
// Put teardown code here. This method is called after the invocation of each test method in the class.
22+
}
23+
24+
func testRepositoryCellView() throws {
25+
let view = RepositoryCellView()
26+
27+
view.updateView(with: .init(repositoryName: "challenge-github-app", userName: "giseletoledo"))
28+
29+
assertSnapshot(matching: view, as: .image(size: .init(width: 375, height: 70)))
30+
}
31+
32+
func testPerformanceExample() throws {
33+
// This is an example of a performance test case.
34+
self.measure {
35+
// Put the code you want to measure the time of here.
36+
}
37+
}
38+
}
39+

solutions/devsprint-matheus-reis-8/Podfile.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ SPEC CHECKSUMS:
1313

1414
PODFILE CHECKSUM: ddf04402787fa42c500f5724d8ff155a39472aa6
1515

16-
COCOAPODS: 1.11.3
16+
COCOAPODS: 1.12.0

0 commit comments

Comments
 (0)