Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
**/__Snapshots__/**/*.png
2 changes: 2 additions & 0 deletions .prefire.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
test_configuration:
template_file_path: custom_template.stencil
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>DesignSystem.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>1</integer>
</dict>
</dict>
</dict>
</plist>
167 changes: 63 additions & 104 deletions SampleWorkshopApp.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
objects = {

/* Begin PBXBuildFile section */
7ED0894B2F3B50BC0009DAB3 /* SnapshotTesting in Frameworks */ = {isa = PBXBuildFile; productRef = 7ED0894A2F3B50BC0009DAB3 /* SnapshotTesting */; };
7ED089512F3B531E0009DAB3 /* Prefire in Frameworks */ = {isa = PBXBuildFile; productRef = 7ED089502F3B531E0009DAB3 /* Prefire */; };
7ED089712F3B5AE00009DAB3 /* Prefire in Frameworks */ = {isa = PBXBuildFile; productRef = 7ED089702F3B5AE00009DAB3 /* Prefire */; };
A74FDA202F3A2674000A32F5 /* DesignSystem in Frameworks */ = {isa = PBXBuildFile; productRef = A74FDA212F3A2674000A32F5 /* DesignSystem */; };
/* End PBXBuildFile section */

Expand All @@ -18,19 +21,11 @@
remoteGlobalIDString = A74FD9E82F3A2672000A32F5;
remoteInfo = SampleWorkshopApp;
};
A74FDA012F3A2673000A32F5 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = A74FD9E12F3A2672000A32F5 /* Project object */;
proxyType = 1;
remoteGlobalIDString = A74FD9E82F3A2672000A32F5;
remoteInfo = SampleWorkshopApp;
};
/* End PBXContainerItemProxy section */

/* Begin PBXFileReference section */
A74FD9E92F3A2672000A32F5 /* SampleWorkshopApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SampleWorkshopApp.app; sourceTree = BUILT_PRODUCTS_DIR; };
A74FD9F62F3A2673000A32F5 /* SampleWorkshopAppTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SampleWorkshopAppTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
A74FDA002F3A2673000A32F5 /* SampleWorkshopAppUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SampleWorkshopAppUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */

/* Begin PBXFileSystemSynchronizedRootGroup section */
Expand All @@ -56,6 +51,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
7ED089712F3B5AE00009DAB3 /* Prefire in Frameworks */,
A74FDA202F3A2674000A32F5 /* DesignSystem in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand All @@ -64,25 +60,28 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
A74FD9FD2F3A2673000A32F5 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
7ED089512F3B531E0009DAB3 /* Prefire in Frameworks */,
7ED0894B2F3B50BC0009DAB3 /* SnapshotTesting in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
7ED0894F2F3B531E0009DAB3 /* Frameworks */ = {
isa = PBXGroup;
children = (
);
name = Frameworks;
sourceTree = "<group>";
};
A74FD9E02F3A2672000A32F5 = {
isa = PBXGroup;
children = (
A74FD9EB2F3A2672000A32F5 /* SampleWorkshopApp */,
A74FD9F92F3A2673000A32F5 /* SampleWorkshopAppTests */,
A74FDA032F3A2673000A32F5 /* SampleWorkshopAppUITests */,
7ED0894F2F3B531E0009DAB3 /* Frameworks */,
A74FD9EA2F3A2672000A32F5 /* Products */,
);
sourceTree = "<group>";
Expand All @@ -92,7 +91,6 @@
children = (
A74FD9E92F3A2672000A32F5 /* SampleWorkshopApp.app */,
A74FD9F62F3A2673000A32F5 /* SampleWorkshopAppTests.xctest */,
A74FDA002F3A2673000A32F5 /* SampleWorkshopAppUITests.xctest */,
);
name = Products;
sourceTree = "<group>";
Expand All @@ -118,6 +116,7 @@
name = SampleWorkshopApp;
packageProductDependencies = (
A74FDA212F3A2674000A32F5 /* DesignSystem */,
7ED089702F3B5AE00009DAB3 /* Prefire */,
);
productName = SampleWorkshopApp;
productReference = A74FD9E92F3A2672000A32F5 /* SampleWorkshopApp.app */;
Expand All @@ -134,41 +133,21 @@
buildRules = (
);
dependencies = (
7ED0894E2F3B52EE0009DAB3 /* PBXTargetDependency */,
A74FD9F82F3A2673000A32F5 /* PBXTargetDependency */,
);
fileSystemSynchronizedGroups = (
A74FD9F92F3A2673000A32F5 /* SampleWorkshopAppTests */,
);
name = SampleWorkshopAppTests;
packageProductDependencies = (
7ED0894A2F3B50BC0009DAB3 /* SnapshotTesting */,
7ED089502F3B531E0009DAB3 /* Prefire */,
);
productName = SampleWorkshopAppTests;
productReference = A74FD9F62F3A2673000A32F5 /* SampleWorkshopAppTests.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
A74FD9FF2F3A2673000A32F5 /* SampleWorkshopAppUITests */ = {
isa = PBXNativeTarget;
buildConfigurationList = A74FDA102F3A2673000A32F5 /* Build configuration list for PBXNativeTarget "SampleWorkshopAppUITests" */;
buildPhases = (
A74FD9FC2F3A2673000A32F5 /* Sources */,
A74FD9FD2F3A2673000A32F5 /* Frameworks */,
A74FD9FE2F3A2673000A32F5 /* Resources */,
);
buildRules = (
);
dependencies = (
A74FDA022F3A2673000A32F5 /* PBXTargetDependency */,
);
fileSystemSynchronizedGroups = (
A74FDA032F3A2673000A32F5 /* SampleWorkshopAppUITests */,
);
name = SampleWorkshopAppUITests;
packageProductDependencies = (
);
productName = SampleWorkshopAppUITests;
productReference = A74FDA002F3A2673000A32F5 /* SampleWorkshopAppUITests.xctest */;
productType = "com.apple.product-type.bundle.ui-testing";
};
/* End PBXNativeTarget section */

/* Begin PBXProject section */
Expand All @@ -186,10 +165,6 @@
CreatedOnToolsVersion = 16.4;
TestTargetID = A74FD9E82F3A2672000A32F5;
};
A74FD9FF2F3A2673000A32F5 = {
CreatedOnToolsVersion = 16.4;
TestTargetID = A74FD9E82F3A2672000A32F5;
};
};
};
buildConfigurationList = A74FD9E42F3A2672000A32F5 /* Build configuration list for PBXProject "SampleWorkshopApp" */;
Expand All @@ -203,6 +178,8 @@
minimizedProjectReferenceProxies = 1;
packageReferences = (
A74FDA222F3A2674000A32F5 /* XCLocalSwiftPackageReference "DesignSystem" */,
7ED089492F3B50BC0009DAB3 /* XCRemoteSwiftPackageReference "swift-snapshot-testing" */,
7ED0894C2F3B52DA0009DAB3 /* XCRemoteSwiftPackageReference "Prefire" */,
);
preferredProjectObjectVersion = 77;
productRefGroup = A74FD9EA2F3A2672000A32F5 /* Products */;
Expand All @@ -211,7 +188,6 @@
targets = (
A74FD9E82F3A2672000A32F5 /* SampleWorkshopApp */,
A74FD9F52F3A2673000A32F5 /* SampleWorkshopAppTests */,
A74FD9FF2F3A2673000A32F5 /* SampleWorkshopAppUITests */,
);
};
/* End PBXProject section */
Expand All @@ -231,13 +207,6 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
A74FD9FE2F3A2673000A32F5 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
Expand All @@ -255,25 +224,17 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
A74FD9FC2F3A2673000A32F5 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */

/* Begin PBXTargetDependency section */
A74FD9F82F3A2673000A32F5 /* PBXTargetDependency */ = {
7ED0894E2F3B52EE0009DAB3 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = A74FD9E82F3A2672000A32F5 /* SampleWorkshopApp */;
targetProxy = A74FD9F72F3A2673000A32F5 /* PBXContainerItemProxy */;
productRef = 7ED0894D2F3B52EE0009DAB3 /* PrefireTestsPlugin */;
};
A74FDA022F3A2673000A32F5 /* PBXTargetDependency */ = {
A74FD9F82F3A2673000A32F5 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = A74FD9E82F3A2672000A32F5 /* SampleWorkshopApp */;
targetProxy = A74FDA012F3A2673000A32F5 /* PBXContainerItemProxy */;
targetProxy = A74FD9F72F3A2673000A32F5 /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */

Expand Down Expand Up @@ -487,38 +448,6 @@
};
name = Release;
};
A74FDA112F3A2673000A32F5 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.example.SampleWorkshopAppUITests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_EMIT_LOC_STRINGS = NO;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
TEST_TARGET_NAME = SampleWorkshopApp;
};
name = Debug;
};
A74FDA122F3A2673000A32F5 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.example.SampleWorkshopAppUITests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_EMIT_LOC_STRINGS = NO;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
TEST_TARGET_NAME = SampleWorkshopApp;
};
name = Release;
};
/* End XCBuildConfiguration section */

/* Begin XCConfigurationList section */
Expand Down Expand Up @@ -549,15 +478,6 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
A74FDA102F3A2673000A32F5 /* Build configuration list for PBXNativeTarget "SampleWorkshopAppUITests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
A74FDA112F3A2673000A32F5 /* Debug */,
A74FDA122F3A2673000A32F5 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */

/* Begin XCLocalSwiftPackageReference section */
Expand All @@ -567,7 +487,46 @@
};
/* End XCLocalSwiftPackageReference section */

/* Begin XCRemoteSwiftPackageReference section */
7ED089492F3B50BC0009DAB3 /* XCRemoteSwiftPackageReference "swift-snapshot-testing" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/tdrhq/swift-snapshot-testing";
requirement = {
kind = exactVersion;
version = "1.18.6-sb";
};
};
7ED0894C2F3B52DA0009DAB3 /* XCRemoteSwiftPackageReference "Prefire" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/BarredEwe/Prefire.git";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 5.4.1;
};
};
/* End XCRemoteSwiftPackageReference section */

/* Begin XCSwiftPackageProductDependency section */
7ED0894A2F3B50BC0009DAB3 /* SnapshotTesting */ = {
isa = XCSwiftPackageProductDependency;
package = 7ED089492F3B50BC0009DAB3 /* XCRemoteSwiftPackageReference "swift-snapshot-testing" */;
productName = SnapshotTesting;
};
7ED0894D2F3B52EE0009DAB3 /* PrefireTestsPlugin */ = {
isa = XCSwiftPackageProductDependency;
package = 7ED0894C2F3B52DA0009DAB3 /* XCRemoteSwiftPackageReference "Prefire" */;
productName = "plugin:PrefireTestsPlugin";
};
7ED089502F3B531E0009DAB3 /* Prefire */ = {
isa = XCSwiftPackageProductDependency;
package = 7ED0894C2F3B52DA0009DAB3 /* XCRemoteSwiftPackageReference "Prefire" */;
productName = Prefire;
};
7ED089702F3B5AE00009DAB3 /* Prefire */ = {
isa = XCSwiftPackageProductDependency;
package = 7ED0894C2F3B52DA0009DAB3 /* XCRemoteSwiftPackageReference "Prefire" */;
productName = Prefire;
};
A74FDA212F3A2674000A32F5 /* DesignSystem */ = {
isa = XCSwiftPackageProductDependency;
productName = DesignSystem;
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Bucket
uuid = "C5D96C5E-0A45-4542-9DC9-B93EECE6BD67"
type = "1"
version = "2.0">
</Bucket>
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>SampleWorkshopApp.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
</dict>
</dict>
</dict>
</plist>
4 changes: 2 additions & 2 deletions SampleWorkshopApp/AboutView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,14 @@ struct AboutView: View {
}
}

#Preview("Light") {
#Preview("About_Light") {
NavigationStack {
AboutView()
}
.preferredColorScheme(.light)
}

#Preview("Dark") {
#Preview("About_Dark") {
NavigationStack {
AboutView()
}
Expand Down
7 changes: 5 additions & 2 deletions SampleWorkshopApp/SupportChatView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import SwiftUI
import DesignSystem
import Prefire

struct ChatMessage: Identifiable {
let id = UUID()
Expand Down Expand Up @@ -101,12 +102,14 @@ extension SupportChatView {
]
}

#Preview("Light") {
#Preview("SupportChatView_Light") {
SupportChatView(messages: SupportChatView.sampleMessages)
.preferredColorScheme(.light)
.prefireIgnored()
}

#Preview("Dark") {
#Preview("SupportChatView_Dark") {
SupportChatView(messages: SupportChatView.sampleMessages)
.preferredColorScheme(.dark)
.prefireIgnored()
}
Loading