Skip to content

Commit

Permalink
Revert "upgrade-snapshot-tests-dependency-fix (#5)"
Browse files Browse the repository at this point in the history
This reverts commit de28e39.
  • Loading branch information
Adrian Sergheev committed Jan 25, 2024
1 parent de28e39 commit 0c5c070
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions Sources/DemoKitSnapshot/XCTestCase+Extensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
) {
Expand All @@ -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
)
Expand All @@ -66,8 +61,6 @@ extension XCTestCase {
viewController: viewController,
record: record,
testName: demoable.identifier,
precision: precision,
perceptualPrecision: perceptualPrecision,
file: file,
line: line
)
Expand Down Expand Up @@ -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
Expand All @@ -173,8 +165,7 @@ extension XCTestCase {
matching: viewController,
as: .image(
on: device.imageConfig,
precision: precision,
perceptualPrecision: perceptualPrecision,
subpixelThreshold: subpixelThreshold,
traits: traits
),
named: name,
Expand Down

0 comments on commit 0c5c070

Please sign in to comment.