Skip to content

Commit 408f052

Browse files
authored
Merge pull request #5 from apter-tech/change-content-view
change contentview
2 parents 773f376 + c1b2ed3 commit 408f052

File tree

8 files changed

+22
-9
lines changed

8 files changed

+22
-9
lines changed

.github/workflows/test_snapshot_test_ios.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@ on:
44
pull_request:
55
branches:
66
- main
7-
paths:
8-
- '.github/actions/snapshot_test_ios/action.yml'
9-
- '.github/workflows/test_snapshot_test_ios.yml'
107

118
jobs:
129
test_snapshot_test_ios:

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.DS_Store
2+
*.xcworkspace
3+
/Pods
4+
/*/__FailedSnapshots__

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# SnapshotArticle project by @apter-tech
2+
3+
Welcome to the SnapshotArticle project! This project combines the power of three essential tools—Swift-Snapshot-Testing, Sourcery, and GitHub Actions—to streamline and enhance your SwiftUI development process. You can read the whole story on [our blog](https://medium.com/p/e906de102558/edit).
4+
5+
## [Swift-Snapshot-Testing](https://github.com/pointfreeco/swift-snapshot-testing) integration
6+
Via [SPM](https://github.com/pointfreeco/swift-snapshot-testing#swift-package-manager)
7+
8+
## [Sourcery](https://github.com/krzysztofzablocki/Sourcery) integration
9+
Via [CocoaPods](https://github.com/krzysztofzablocki/Sourcery#installation)
10+
11+

SnapshotArticle.xcodeproj/project.pbxproj

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@
3333
01CB44543F614B69AEE58DE3 /* Pods_SnapshotArticle.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SnapshotArticle.framework; sourceTree = BUILT_PRODUCTS_DIR; };
3434
621BA060A9C61105BD6576A4 /* Pods-SnapshotArticle.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SnapshotArticle.debug.xcconfig"; path = "Target Support Files/Pods-SnapshotArticle/Pods-SnapshotArticle.debug.xcconfig"; sourceTree = "<group>"; };
3535
92D34A561CB043B8C2BA8413 /* Pods-SnapshotArticle.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SnapshotArticle.release.xcconfig"; path = "Target Support Files/Pods-SnapshotArticle/Pods-SnapshotArticle.release.xcconfig"; sourceTree = "<group>"; };
36+
D002AD482A860EF70046500F /* SnapshotArticleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SnapshotArticleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
3637
D05AD4052A7A418B007362F3 /* SnapshotArticleApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SnapshotArticleApp.swift; sourceTree = "<group>"; };
3738
D05AD4072A7A418B007362F3 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = "<group>"; };
3839
D05AD4092A7A418C007362F3 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
3940
D05AD40C2A7A418C007362F3 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = "<group>"; };
4041
D05AD4132A7A6210007362F3 /* SecondView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SecondView.swift; sourceTree = "<group>"; };
41-
D05AD41F2A7BEF24007362F3 /* SnapshotArticleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; name = SnapshotArticleTests.xctest; path = "/Users/robi/Development/Apter/SnapshotArticle/build/Debug-iphoneos/SnapshotArticleTests.xctest"; sourceTree = "<absolute>"; };
42-
D05AD4282A7BF6A3007362F3 /* Podfile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Podfile; sourceTree = "<group>"; };
42+
D05AD4282A7BF6A3007362F3 /* Podfile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Podfile; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.ruby; };
4343
D05AD42B2A7BF783007362F3 /* SnapshotTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SnapshotTest.swift; sourceTree = "<group>"; };
4444
D05AD42E2A7BF811007362F3 /* View+Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "View+Extensions.swift"; sourceTree = "<group>"; };
4545
D05AD43A2A8231C3007362F3 /* SnapshotArticle.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SnapshotArticle.app; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -92,6 +92,7 @@
9292
8AD50023BEA73622E104A975 /* Frameworks */,
9393
370939526343A7A3B7F680C6 /* Pods */,
9494
D05AD43A2A8231C3007362F3 /* SnapshotArticle.app */,
95+
D002AD482A860EF70046500F /* SnapshotArticleTests.xctest */,
9596
);
9697
sourceTree = "<group>";
9798
};
@@ -173,7 +174,7 @@
173174
D05AD4382A7BFB00007362F3 /* SnapshotTesting */,
174175
);
175176
productName = SnapshotArticleTests;
176-
productReference = D05AD41F2A7BEF24007362F3 /* SnapshotArticleTests.xctest */;
177+
productReference = D002AD482A860EF70046500F /* SnapshotArticleTests.xctest */;
177178
productType = "com.apple.product-type.bundle.unit-test";
178179
};
179180
/* End PBXNativeTarget section */
@@ -277,7 +278,7 @@
277278
);
278279
runOnlyForDeploymentPostprocessing = 0;
279280
shellPath = /bin/sh;
280-
shellScript = "";
281+
shellScript = "# After the first run you need to copy the output swift file into the project\nPods/Sourcery/bin/sourcery --sources ../SnapshotArticle --templates PreviewProvider.stencil --output SnapshotArticleTests/SnapshotTest.swift\n";
281282
};
282283
/* End PBXShellScriptBuildPhase section */
283284

SnapshotArticle/ContentView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ struct ContentView: View {
1111
var body: some View {
1212
NavigationView {
1313
VStack {
14-
Image(systemName: "globe")
14+
Image(systemName: "hand.wave")
1515
.imageScale(.large)
1616
.foregroundColor(.black.opacity(0.4))
1717
NavigationLink(destination: SecondView()) {

SnapshotArticle/SecondView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ struct SecondView: View {
2121
.frame(maxWidth: .infinity, maxHeight: .infinity)
2222
.background(.black)
2323
.foregroundColor(.green)
24-
Text("With black foreground and background")
24+
Text("With black background and foreground")
2525
.font(.body)
2626
.frame(maxWidth: .infinity, maxHeight: .infinity)
2727
.background(.black)
-1.27 KB
Loading
-2 Bytes
Loading

0 commit comments

Comments
 (0)