Skip to content

Commit b104939

Browse files
Merge pull request #23 from GoodRequest/feature/snapshot-testing
snapshot testing
2 parents 4eb1125 + 1e87d56 commit b104939

File tree

48 files changed

+1224
-4
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+1224
-4
lines changed

GoodSwiftUI-Sample/GoodSwiftUI-Sample.xcodeproj/project.pbxproj

Lines changed: 188 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@
99
/* Begin PBXBuildFile section */
1010
3F9F28482A3AECC700D92CA2 /* GRAsyncImage in Frameworks */ = {isa = PBXBuildFile; productRef = 3F9F28472A3AECC700D92CA2 /* GRAsyncImage */; };
1111
5D740EC629B0BE7300975B8C /* GoodSwiftUI in Frameworks */ = {isa = PBXBuildFile; productRef = 5D740EC529B0BE7300975B8C /* GoodSwiftUI */; };
12+
7837A1902E0EC10100322920 /* GRButton in Frameworks */ = {isa = PBXBuildFile; productRef = 7837A18F2E0EC10100322920 /* GRButton */; };
13+
7859231A2E0EBF8100AE0B16 /* InlineSnapshotTesting in Frameworks */ = {isa = PBXBuildFile; productRef = 785923192E0EBF8100AE0B16 /* InlineSnapshotTesting */; };
14+
7859231C2E0EBF8100AE0B16 /* SnapshotTesting in Frameworks */ = {isa = PBXBuildFile; productRef = 7859231B2E0EBF8100AE0B16 /* SnapshotTesting */; };
15+
7859231E2E0EBF8100AE0B16 /* SnapshotTestingCustomDump in Frameworks */ = {isa = PBXBuildFile; productRef = 7859231D2E0EBF8100AE0B16 /* SnapshotTestingCustomDump */; };
16+
78C2ACE02E12A0F700CD05C5 /* GRToggle in Frameworks */ = {isa = PBXBuildFile; productRef = 78C2ACDF2E12A0F700CD05C5 /* GRToggle */; };
17+
78EF6BA02E1E4ED000BCE708 /* GRInputField in Frameworks */ = {isa = PBXBuildFile; productRef = 78EF6B9F2E1E4ED000BCE708 /* GRInputField */; };
1218
/* End PBXBuildFile section */
1319

1420
/* Begin PBXContainerItemProxy section */
@@ -19,6 +25,13 @@
1925
remoteGlobalIDString = 5D740EA829B0BE0100975B8C;
2026
remoteInfo = "GoodSwiftUI-Sample";
2127
};
28+
785923132E0EBEE400AE0B16 /* PBXContainerItemProxy */ = {
29+
isa = PBXContainerItemProxy;
30+
containerPortal = 5D740EA129B0BE0100975B8C /* Project object */;
31+
proxyType = 1;
32+
remoteGlobalIDString = 5D740EA829B0BE0100975B8C;
33+
remoteInfo = "GoodSwiftUI-Sample";
34+
};
2235
/* End PBXContainerItemProxy section */
2336

2437
/* Begin PBXFileReference section */
@@ -27,6 +40,7 @@
2740
5D740EA929B0BE0100975B8C /* GoodSwiftUI-Sample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "GoodSwiftUI-Sample.app"; sourceTree = BUILT_PRODUCTS_DIR; };
2841
5D740EC329B0BE5F00975B8C /* GoodSwiftUI */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = GoodSwiftUI; path = ..; sourceTree = "<group>"; };
2942
78062C8D2CEDD3BE00281C04 /* GRButtonSampleView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GRButtonSampleView.swift; sourceTree = "<group>"; };
43+
7859230D2E0EBEE400AE0B16 /* GoodSwiftUI-SnapshotTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "GoodSwiftUI-SnapshotTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
3044
78B2DC2C2CF70B680053DF97 /* GRToggleSampleView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GRToggleSampleView.swift; sourceTree = "<group>"; };
3145
/* End PBXFileReference section */
3246

@@ -43,6 +57,7 @@
4357
/* Begin PBXFileSystemSynchronizedRootGroup section */
4458
0942DDDD2D91CB61006E7B2D /* GoodSwiftUI-UITests */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = "GoodSwiftUI-UITests"; sourceTree = "<group>"; };
4559
3F19A5DC2D41278600C91600 /* GoodSwiftUI-Sample */ = {isa = PBXFileSystemSynchronizedRootGroup; exceptions = (3F19A5E92D41278600C91600 /* PBXFileSystemSynchronizedBuildFileExceptionSet */, ); explicitFileTypes = {}; explicitFolders = (); path = "GoodSwiftUI-Sample"; sourceTree = "<group>"; };
60+
7859230E2E0EBEE400AE0B16 /* GoodSwiftUI-SnapshotTests */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = "GoodSwiftUI-SnapshotTests"; sourceTree = "<group>"; };
4661
/* End PBXFileSystemSynchronizedRootGroup section */
4762

4863
/* Begin PBXFrameworksBuildPhase section */
@@ -62,6 +77,19 @@
6277
);
6378
runOnlyForDeploymentPostprocessing = 0;
6479
};
80+
7859230A2E0EBEE400AE0B16 /* Frameworks */ = {
81+
isa = PBXFrameworksBuildPhase;
82+
buildActionMask = 2147483647;
83+
files = (
84+
78C2ACE02E12A0F700CD05C5 /* GRToggle in Frameworks */,
85+
78EF6BA02E1E4ED000BCE708 /* GRInputField in Frameworks */,
86+
7859231E2E0EBF8100AE0B16 /* SnapshotTestingCustomDump in Frameworks */,
87+
7837A1902E0EC10100322920 /* GRButton in Frameworks */,
88+
7859231A2E0EBF8100AE0B16 /* InlineSnapshotTesting in Frameworks */,
89+
7859231C2E0EBF8100AE0B16 /* SnapshotTesting in Frameworks */,
90+
);
91+
runOnlyForDeploymentPostprocessing = 0;
92+
};
6593
/* End PBXFrameworksBuildPhase section */
6694

6795
/* Begin PBXGroup section */
@@ -81,8 +109,10 @@
81109
5D740EC229B0BE5F00975B8C /* Packages */,
82110
3F19A5DC2D41278600C91600 /* GoodSwiftUI-Sample */,
83111
0942DDDD2D91CB61006E7B2D /* GoodSwiftUI-UITests */,
112+
7859230E2E0EBEE400AE0B16 /* GoodSwiftUI-SnapshotTests */,
84113
5D740EAA29B0BE0100975B8C /* Products */,
85114
3FA663A22D6F164F00269137 /* Recovered References */,
115+
7837A18E2E0EC10100322920 /* Frameworks */,
86116
);
87117
sourceTree = "<group>";
88118
};
@@ -91,6 +121,7 @@
91121
children = (
92122
5D740EA929B0BE0100975B8C /* GoodSwiftUI-Sample.app */,
93123
0942DDDC2D91CB61006E7B2D /* GoodSwiftUI-UITests.xctest */,
124+
7859230D2E0EBEE400AE0B16 /* GoodSwiftUI-SnapshotTests.xctest */,
94125
);
95126
name = Products;
96127
sourceTree = "<group>";
@@ -103,6 +134,13 @@
103134
name = Packages;
104135
sourceTree = "<group>";
105136
};
137+
7837A18E2E0EC10100322920 /* Frameworks */ = {
138+
isa = PBXGroup;
139+
children = (
140+
);
141+
name = Frameworks;
142+
sourceTree = "<group>";
143+
};
106144
/* End PBXGroup section */
107145

108146
/* Begin PBXNativeTarget section */
@@ -153,6 +191,35 @@
153191
productReference = 5D740EA929B0BE0100975B8C /* GoodSwiftUI-Sample.app */;
154192
productType = "com.apple.product-type.application";
155193
};
194+
7859230C2E0EBEE400AE0B16 /* GoodSwiftUI-SnapshotTests */ = {
195+
isa = PBXNativeTarget;
196+
buildConfigurationList = 785923172E0EBEE400AE0B16 /* Build configuration list for PBXNativeTarget "GoodSwiftUI-SnapshotTests" */;
197+
buildPhases = (
198+
785923092E0EBEE400AE0B16 /* Sources */,
199+
7859230A2E0EBEE400AE0B16 /* Frameworks */,
200+
7859230B2E0EBEE400AE0B16 /* Resources */,
201+
);
202+
buildRules = (
203+
);
204+
dependencies = (
205+
785923142E0EBEE400AE0B16 /* PBXTargetDependency */,
206+
);
207+
fileSystemSynchronizedGroups = (
208+
7859230E2E0EBEE400AE0B16 /* GoodSwiftUI-SnapshotTests */,
209+
);
210+
name = "GoodSwiftUI-SnapshotTests";
211+
packageProductDependencies = (
212+
785923192E0EBF8100AE0B16 /* InlineSnapshotTesting */,
213+
7859231B2E0EBF8100AE0B16 /* SnapshotTesting */,
214+
7859231D2E0EBF8100AE0B16 /* SnapshotTestingCustomDump */,
215+
7837A18F2E0EC10100322920 /* GRButton */,
216+
78C2ACDF2E12A0F700CD05C5 /* GRToggle */,
217+
78EF6B9F2E1E4ED000BCE708 /* GRInputField */,
218+
);
219+
productName = "GoodSwiftUI-SnapshotTests";
220+
productReference = 7859230D2E0EBEE400AE0B16 /* GoodSwiftUI-SnapshotTests.xctest */;
221+
productType = "com.apple.product-type.bundle.ui-testing";
222+
};
156223
/* End PBXNativeTarget section */
157224

158225
/* Begin PBXProject section */
@@ -170,6 +237,10 @@
170237
5D740EA829B0BE0100975B8C = {
171238
CreatedOnToolsVersion = 14.2;
172239
};
240+
7859230C2E0EBEE400AE0B16 = {
241+
CreatedOnToolsVersion = 16.2;
242+
TestTargetID = 5D740EA829B0BE0100975B8C;
243+
};
173244
};
174245
};
175246
buildConfigurationList = 5D740EA429B0BE0100975B8C /* Build configuration list for PBXProject "GoodSwiftUI-Sample" */;
@@ -181,12 +252,16 @@
181252
Base,
182253
);
183254
mainGroup = 5D740EA029B0BE0100975B8C;
255+
packageReferences = (
256+
785923182E0EBF8100AE0B16 /* XCRemoteSwiftPackageReference "swift-snapshot-testing" */,
257+
);
184258
productRefGroup = 5D740EAA29B0BE0100975B8C /* Products */;
185259
projectDirPath = "";
186260
projectRoot = "";
187261
targets = (
188262
5D740EA829B0BE0100975B8C /* GoodSwiftUI-Sample */,
189263
0942DDDB2D91CB61006E7B2D /* GoodSwiftUI-UITests */,
264+
7859230C2E0EBEE400AE0B16 /* GoodSwiftUI-SnapshotTests */,
190265
);
191266
};
192267
/* End PBXProject section */
@@ -206,6 +281,13 @@
206281
);
207282
runOnlyForDeploymentPostprocessing = 0;
208283
};
284+
7859230B2E0EBEE400AE0B16 /* Resources */ = {
285+
isa = PBXResourcesBuildPhase;
286+
buildActionMask = 2147483647;
287+
files = (
288+
);
289+
runOnlyForDeploymentPostprocessing = 0;
290+
};
209291
/* End PBXResourcesBuildPhase section */
210292

211293
/* Begin PBXSourcesBuildPhase section */
@@ -223,6 +305,13 @@
223305
);
224306
runOnlyForDeploymentPostprocessing = 0;
225307
};
308+
785923092E0EBEE400AE0B16 /* Sources */ = {
309+
isa = PBXSourcesBuildPhase;
310+
buildActionMask = 2147483647;
311+
files = (
312+
);
313+
runOnlyForDeploymentPostprocessing = 0;
314+
};
226315
/* End PBXSourcesBuildPhase section */
227316

228317
/* Begin PBXTargetDependency section */
@@ -231,6 +320,11 @@
231320
target = 5D740EA829B0BE0100975B8C /* GoodSwiftUI-Sample */;
232321
targetProxy = 0942DDE22D91CB61006E7B2D /* PBXContainerItemProxy */;
233322
};
323+
785923142E0EBEE400AE0B16 /* PBXTargetDependency */ = {
324+
isa = PBXTargetDependency;
325+
target = 5D740EA829B0BE0100975B8C /* GoodSwiftUI-Sample */;
326+
targetProxy = 785923132E0EBEE400AE0B16 /* PBXContainerItemProxy */;
327+
};
234328
/* End PBXTargetDependency section */
235329

236330
/* Begin XCBuildConfiguration section */
@@ -461,6 +555,53 @@
461555
};
462556
name = Release;
463557
};
558+
785923152E0EBEE400AE0B16 /* Debug */ = {
559+
isa = XCBuildConfiguration;
560+
buildSettings = {
561+
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
562+
CODE_SIGN_STYLE = Automatic;
563+
CURRENT_PROJECT_VERSION = 1;
564+
DEVELOPMENT_TEAM = SYBRVMM79X;
565+
ENABLE_USER_SCRIPT_SANDBOXING = YES;
566+
GCC_C_LANGUAGE_STANDARD = gnu17;
567+
GENERATE_INFOPLIST_FILE = YES;
568+
IPHONEOS_DEPLOYMENT_TARGET = 18.2;
569+
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
570+
MARKETING_VERSION = 1.0;
571+
OTHER_SWIFT_FLAGS = "";
572+
PRODUCT_BUNDLE_IDENTIFIER = "com.GoodSwiftUI-SnapshotTests";
573+
PRODUCT_NAME = "$(TARGET_NAME)";
574+
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)";
575+
SWIFT_EMIT_LOC_STRINGS = NO;
576+
SWIFT_VERSION = 5.0;
577+
TARGETED_DEVICE_FAMILY = "1,2";
578+
TEST_TARGET_NAME = "GoodSwiftUI-Sample";
579+
};
580+
name = Debug;
581+
};
582+
785923162E0EBEE400AE0B16 /* Release */ = {
583+
isa = XCBuildConfiguration;
584+
buildSettings = {
585+
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
586+
CODE_SIGN_STYLE = Automatic;
587+
CURRENT_PROJECT_VERSION = 1;
588+
DEVELOPMENT_TEAM = SYBRVMM79X;
589+
ENABLE_USER_SCRIPT_SANDBOXING = YES;
590+
GCC_C_LANGUAGE_STANDARD = gnu17;
591+
GENERATE_INFOPLIST_FILE = YES;
592+
IPHONEOS_DEPLOYMENT_TARGET = 18.2;
593+
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
594+
MARKETING_VERSION = 1.0;
595+
OTHER_SWIFT_FLAGS = "";
596+
PRODUCT_BUNDLE_IDENTIFIER = "com.GoodSwiftUI-SnapshotTests";
597+
PRODUCT_NAME = "$(TARGET_NAME)";
598+
SWIFT_EMIT_LOC_STRINGS = NO;
599+
SWIFT_VERSION = 5.0;
600+
TARGETED_DEVICE_FAMILY = "1,2";
601+
TEST_TARGET_NAME = "GoodSwiftUI-Sample";
602+
};
603+
name = Release;
604+
};
464605
/* End XCBuildConfiguration section */
465606

466607
/* Begin XCConfigurationList section */
@@ -491,8 +632,28 @@
491632
defaultConfigurationIsVisible = 0;
492633
defaultConfigurationName = Release;
493634
};
635+
785923172E0EBEE400AE0B16 /* Build configuration list for PBXNativeTarget "GoodSwiftUI-SnapshotTests" */ = {
636+
isa = XCConfigurationList;
637+
buildConfigurations = (
638+
785923152E0EBEE400AE0B16 /* Debug */,
639+
785923162E0EBEE400AE0B16 /* Release */,
640+
);
641+
defaultConfigurationIsVisible = 0;
642+
defaultConfigurationName = Release;
643+
};
494644
/* End XCConfigurationList section */
495645

646+
/* Begin XCRemoteSwiftPackageReference section */
647+
785923182E0EBF8100AE0B16 /* XCRemoteSwiftPackageReference "swift-snapshot-testing" */ = {
648+
isa = XCRemoteSwiftPackageReference;
649+
repositoryURL = "https://github.com/pointfreeco/swift-snapshot-testing.git";
650+
requirement = {
651+
kind = upToNextMajorVersion;
652+
minimumVersion = 1.18.4;
653+
};
654+
};
655+
/* End XCRemoteSwiftPackageReference section */
656+
496657
/* Begin XCSwiftPackageProductDependency section */
497658
3F9F28472A3AECC700D92CA2 /* GRAsyncImage */ = {
498659
isa = XCSwiftPackageProductDependency;
@@ -502,6 +663,33 @@
502663
isa = XCSwiftPackageProductDependency;
503664
productName = GoodSwiftUI;
504665
};
666+
7837A18F2E0EC10100322920 /* GRButton */ = {
667+
isa = XCSwiftPackageProductDependency;
668+
productName = GRButton;
669+
};
670+
785923192E0EBF8100AE0B16 /* InlineSnapshotTesting */ = {
671+
isa = XCSwiftPackageProductDependency;
672+
package = 785923182E0EBF8100AE0B16 /* XCRemoteSwiftPackageReference "swift-snapshot-testing" */;
673+
productName = InlineSnapshotTesting;
674+
};
675+
7859231B2E0EBF8100AE0B16 /* SnapshotTesting */ = {
676+
isa = XCSwiftPackageProductDependency;
677+
package = 785923182E0EBF8100AE0B16 /* XCRemoteSwiftPackageReference "swift-snapshot-testing" */;
678+
productName = SnapshotTesting;
679+
};
680+
7859231D2E0EBF8100AE0B16 /* SnapshotTestingCustomDump */ = {
681+
isa = XCSwiftPackageProductDependency;
682+
package = 785923182E0EBF8100AE0B16 /* XCRemoteSwiftPackageReference "swift-snapshot-testing" */;
683+
productName = SnapshotTestingCustomDump;
684+
};
685+
78C2ACDF2E12A0F700CD05C5 /* GRToggle */ = {
686+
isa = XCSwiftPackageProductDependency;
687+
productName = GRToggle;
688+
};
689+
78EF6B9F2E1E4ED000BCE708 /* GRInputField */ = {
690+
isa = XCSwiftPackageProductDependency;
691+
productName = GRInputField;
692+
};
505693
/* End XCSwiftPackageProductDependency section */
506694
};
507695
rootObject = 5D740EA129B0BE0100975B8C /* Project object */;

GoodSwiftUI-Sample/GoodSwiftUI-Sample.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved

Lines changed: 31 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

GoodSwiftUI-Sample/GoodSwiftUI-Sample.xcodeproj/xcshareddata/xcschemes/GoodSwiftUI-Sample.xcscheme

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,17 @@
4545
ReferencedContainer = "container:GoodSwiftUI-Sample.xcodeproj">
4646
</BuildableReference>
4747
</TestableReference>
48+
<TestableReference
49+
skipped = "NO"
50+
parallelizable = "YES">
51+
<BuildableReference
52+
BuildableIdentifier = "primary"
53+
BlueprintIdentifier = "7859230C2E0EBEE400AE0B16"
54+
BuildableName = "GoodSwiftUI-SnapshotTests.xctest"
55+
BlueprintName = "GoodSwiftUI-SnapshotTests"
56+
ReferencedContainer = "container:GoodSwiftUI-Sample.xcodeproj">
57+
</BuildableReference>
58+
</TestableReference>
4859
</Testables>
4960
</TestAction>
5061
<LaunchAction

0 commit comments

Comments
 (0)