diff --git a/Package.resolved b/Package.resolved index c1029e1..0ac882f 100644 --- a/Package.resolved +++ b/Package.resolved @@ -3,19 +3,10 @@ { "identity" : "swift-snapshot-testing", "kind" : "remoteSourceControl", - "location" : "https://github.com/pointfreeco/swift-snapshot-testing", + "location" : "https://github.com/pimms/swift-snapshot-testing.git", "state" : { - "revision" : "8e68404f641300bfd0e37d478683bb275926760c", - "version" : "1.15.2" - } - }, - { - "identity" : "swift-syntax", - "kind" : "remoteSourceControl", - "location" : "https://github.com/apple/swift-syntax.git", - "state" : { - "revision" : "43c802fb7f96e090dde015344a94b5e85779eff1", - "version" : "509.1.0" + "revision" : "b44b563e6ddc5a613a107fb57626047a7f1d4e1a", + "version" : "1.9.666" } } ], diff --git a/Package.swift b/Package.swift index ba6f618..0863a9e 100644 --- a/Package.swift +++ b/Package.swift @@ -12,7 +12,7 @@ let package = Package( .library(name: "DemoKitSnapshot", targets: ["DemoKitSnapshot"]), ], dependencies: [ - .package(url: "https://github.com/pointfreeco/swift-snapshot-testing", exact: "1.15.2"), + .package(url: "https://github.com/pimms/swift-snapshot-testing.git", exact: "1.9.666"), ], targets: [ .target( diff --git a/Sources/DemoKitSnapshot/XCTestCase+Extensions.swift b/Sources/DemoKitSnapshot/XCTestCase+Extensions.swift index aa8d7b6..82b9c12 100644 --- a/Sources/DemoKitSnapshot/XCTestCase+Extensions.swift +++ b/Sources/DemoKitSnapshot/XCTestCase+Extensions.swift @@ -34,9 +34,6 @@ extension XCTestCase { public func snapshotTest( demoable: any Demoable, record: Bool = false, - // https://github.com/pointfreeco/swift-snapshot-testing/pull/628#issuecomment-1256363278 - precision: Float = 0.98, - perceptualPrecision: Float = 0.98, file: StaticString = #file, line: UInt = #line ) { @@ -53,10 +50,8 @@ extension XCTestCase { performSnapshots( viewController: viewController, record: record, - testName: demoable.identifier, + testName: demoable.identifier, tweakName: tweak.testName, - precision: precision, - perceptualPrecision: perceptualPrecision, file: file, line: line ) @@ -66,8 +61,6 @@ extension XCTestCase { viewController: viewController, record: record, testName: demoable.identifier, - precision: precision, - perceptualPrecision: perceptualPrecision, file: file, line: line ) @@ -152,12 +145,11 @@ extension XCTestCase { record: Bool, testName: String, tweakName: String? = nil, - precision: Float = 0.98, - perceptualPrecision: Float = 0.98, file: StaticString, line: UInt ) { UIView.setAnimationsEnabled(false) + let subpixelThreshold: UInt8 = 5 let userInterfaceStyle: [UIUserInterfaceStyle] = [.light, .dark] userInterfaceStyle.forEach { userInterfaceStyle in @@ -173,8 +165,7 @@ extension XCTestCase { matching: viewController, as: .image( on: device.imageConfig, - precision: precision, - perceptualPrecision: perceptualPrecision, + subpixelThreshold: subpixelThreshold, traits: traits ), named: name,