Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upgrade snapshot tests dependency (take 2) #1345

Merged
merged 14 commits into from
May 16, 2024
28 changes: 14 additions & 14 deletions Demo/Demo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,9 @@
objects = {

/* Begin PBXBuildFile section */
170CE96C2ABB3C680069759D /* DemoKitSnapshot in Frameworks */ = {isa = PBXBuildFile; productRef = 170CE96B2ABB3C680069759D /* DemoKitSnapshot */; };
172DCF2B2AB9C71200D890C2 /* HostingContentConfigurationCellDemoViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 172DCF2A2AB9C71200D890C2 /* HostingContentConfigurationCellDemoViewController.swift */; };
172E7504290FE28E00956AC2 /* HTMLTextDemoViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 172E7503290FE28E00956AC2 /* HTMLTextDemoViewController.swift */; };
1732932D29814F9100C68AD7 /* SwiftUILoadingIndicatorDemoView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1732932C29814F9100C68AD7 /* SwiftUILoadingIndicatorDemoView.swift */; };
17A869A32ABB349300A7054E /* DemoKit in Frameworks */ = {isa = PBXBuildFile; productRef = 17A869A22ABB349300A7054E /* DemoKit */; };
17BF44C929893E98001A5877 /* LoadingSwiftUIDemoView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17BF44C829893E98001A5877 /* LoadingSwiftUIDemoView.swift */; };
17EE085E2AA720AB00A623F2 /* FrontPageTransactionDemoViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17EE085D2AA720AB00A623F2 /* FrontPageTransactionDemoViewController.swift */; };
17EE08632AA8ABCC00A623F2 /* FrontPageTransactionListDemoViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17EE08622AA8ABCC00A623F2 /* FrontPageTransactionListDemoViewController.swift */; };
Expand Down Expand Up @@ -186,6 +184,8 @@
71C6AA992549D28800D78269 /* MessageUserRequiredData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 71C6AA982549D28800D78269 /* MessageUserRequiredData.swift */; };
8D68030CF404D02BA5F8A618 /* NumberedListDemoView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D68050D2A01257562243914 /* NumberedListDemoView.swift */; };
8D680A0AEE158DE3250140C2 /* CompactMarketsDemoView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D680BCAFCC5ACA549D1B6F3 /* CompactMarketsDemoView.swift */; };
90385C1B2B57C1170036B8A0 /* DemoKitSnapshot in Frameworks */ = {isa = PBXBuildFile; productRef = 90385C1A2B57C1170036B8A0 /* DemoKitSnapshot */; };
90385C1D2B57C18A0036B8A0 /* DemoKit in Frameworks */ = {isa = PBXBuildFile; productRef = 90385C1C2B57C18A0036B8A0 /* DemoKit */; };
91D637DA2488F70A0066D4D0 /* ConfettiDemoView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 91D637D92488F70A0066D4D0 /* ConfettiDemoView.swift */; };
9BA6C4A224336B9A009D417B /* DemoWrapperView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9BA6C4A124336B9A009D417B /* DemoWrapperView.swift */; };
9BBC904024FD252B0003D2D8 /* UITraitCollection+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9BBC903F24FD252B0003D2D8 /* UITraitCollection+Extensions.swift */; };
Expand Down Expand Up @@ -433,7 +433,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
17A869A32ABB349300A7054E /* DemoKit in Frameworks */,
90385C1D2B57C18A0036B8A0 /* DemoKit in Frameworks */,
46E77563242CFFA5008A5E93 /* FinniversKit.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand All @@ -442,7 +442,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
170CE96C2ABB3C680069759D /* DemoKitSnapshot in Frameworks */,
90385C1B2B57C1170036B8A0 /* DemoKitSnapshot in Frameworks */,
46E7759D242D6A8A008A5E93 /* FinniversKit.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -1817,7 +1817,7 @@
);
name = Demo;
packageProductDependencies = (
17A869A22ABB349300A7054E /* DemoKit */,
90385C1C2B57C18A0036B8A0 /* DemoKit */,
);
productName = Demo;
productReference = 46AE6FC0242BADC9007BB005 /* Demo.app */;
Expand All @@ -1838,7 +1838,7 @@
);
name = SnapshotTests;
packageProductDependencies = (
170CE96B2ABB3C680069759D /* DemoKitSnapshot */,
90385C1A2B57C1170036B8A0 /* DemoKitSnapshot */,
);
productName = SnapshotTests;
productReference = 46E7756C242D4736008A5E93 /* SnapshotTests.xctest */;
Expand Down Expand Up @@ -1874,7 +1874,7 @@
);
mainGroup = 46AE6FB7242BADC9007BB005;
packageReferences = (
17A869A12ABB349300A7054E /* XCRemoteSwiftPackageReference "DemoKit-iOS" */,
90385C192B57C1170036B8A0 /* XCRemoteSwiftPackageReference "DemoKit-iOS" */,
);
productRefGroup = 46AE6FC1242BADC9007BB005 /* Products */;
projectDirPath = "";
Expand Down Expand Up @@ -2401,25 +2401,25 @@
/* End XCConfigurationList section */

/* Begin XCRemoteSwiftPackageReference section */
17A869A12ABB349300A7054E /* XCRemoteSwiftPackageReference "DemoKit-iOS" */ = {
90385C192B57C1170036B8A0 /* XCRemoteSwiftPackageReference "DemoKit-iOS" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/finn-no/DemoKit-iOS.git";
repositoryURL = "https://github.com/finn-no/DemoKit-iOS";
requirement = {
kind = exactVersion;
version = 0.4.2;
version = 0.4.3;
};
};
/* End XCRemoteSwiftPackageReference section */

/* Begin XCSwiftPackageProductDependency section */
170CE96B2ABB3C680069759D /* DemoKitSnapshot */ = {
90385C1A2B57C1170036B8A0 /* DemoKitSnapshot */ = {
isa = XCSwiftPackageProductDependency;
package = 17A869A12ABB349300A7054E /* XCRemoteSwiftPackageReference "DemoKit-iOS" */;
package = 90385C192B57C1170036B8A0 /* XCRemoteSwiftPackageReference "DemoKit-iOS" */;
productName = DemoKitSnapshot;
};
17A869A22ABB349300A7054E /* DemoKit */ = {
90385C1C2B57C18A0036B8A0 /* DemoKit */ = {
isa = XCSwiftPackageProductDependency;
package = 17A869A12ABB349300A7054E /* XCRemoteSwiftPackageReference "DemoKit-iOS" */;
package = 90385C192B57C1170036B8A0 /* XCRemoteSwiftPackageReference "DemoKit-iOS" */;
productName = DemoKit;
};
/* End XCSwiftPackageProductDependency section */
Expand Down
11 changes: 6 additions & 5 deletions Demo/SnapshotTests/ComponentViewTests.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
//
// Copyright © 2018 FINN AS. All rights reserved.
//

import XCTest
import FinniversKit
@testable import Demo
Expand All @@ -10,7 +6,12 @@ import DemoKitSnapshot
@MainActor
class ComponentViewTests: XCTestCase {
private func snapshot(_ component: ComponentDemoViews, record: Bool = false, line: UInt = #line) {
snapshotTest(demoable: component.demoable, record: record, line: line)
snapshotTest(
demoable: component.demoable,
record: record,
precision: 0.98,
line: line
)
}

// MARK: - Tests
Expand Down
4 changes: 0 additions & 4 deletions Demo/SnapshotTests/DnaViewTests.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
//
// Copyright © 2018 FINN AS. All rights reserved.
//

@testable import Demo
import XCTest
import FinniversKit
Expand Down
4 changes: 0 additions & 4 deletions Demo/SnapshotTests/SwiftUIViewTests.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
//
// Copyright © 2018 FINN AS. All rights reserved.
//

@testable import Demo
import XCTest
import SwiftUI
Expand Down
4 changes: 0 additions & 4 deletions Demo/SnapshotTests/TableViewCellViewsTests.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
//
// Copyright © 2018 FINN AS. All rights reserved.
//

import FinniversKit
import XCTest
@testable import Demo
Expand Down
6 changes: 3 additions & 3 deletions Demo/SnapshotTests/XCTestCastExtensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ extension XCTestCase {
testName: String = #function,
line: UInt = #line
) {
let subpixelThreshold: UInt8 = 5
var snapshotting: Snapshotting = .image(on: .iPhoneX, subpixelThreshold: subpixelThreshold)
let perceptualPrecision: Float = 0.98
var snapshotting: Snapshotting = .image(on: .iPhoneX, perceptualPrecision: perceptualPrecision)
if let delay = delay {
snapshotting = .wait(for: delay, on: snapshotting)
}
Expand All @@ -30,7 +30,7 @@ extension XCTestCase {
)

if includeIPad {
var snapshotting: Snapshotting = .image(on: .iPadPro11, subpixelThreshold: subpixelThreshold)
var snapshotting: Snapshotting = .image(on: .iPadPro11, perceptualPrecision: perceptualPrecision)
if let delay = delay {
snapshotting = .wait(for: delay, on: snapshotting)
}
Expand Down
24 changes: 17 additions & 7 deletions FinniversKit.xcworkspace/xcshareddata/swiftpm/Package.resolved
Original file line number Diff line number Diff line change
@@ -1,21 +1,31 @@
{
"originHash" : "8b7645d551ea3328d17fbc8edfb5b9ec03080b168c4bc1a90a4b4aee5564d9de",
"pins" : [
{
"identity" : "demokit-ios",
"kind" : "remoteSourceControl",
"location" : "https://github.com/finn-no/DemoKit-iOS.git",
"location" : "https://github.com/finn-no/DemoKit-iOS",
"state" : {
"revision" : "0fc2fb8bb8fac93f2be9d07df65074082ca34753",
"version" : "0.4.2"
"revision" : "ac26057c3071f386f58427d77dacac98c1d32729",
"version" : "0.4.3"
}
},
{
"identity" : "swift-snapshot-testing",
"kind" : "remoteSourceControl",
"location" : "https://github.com/pimms/swift-snapshot-testing.git",
"location" : "https://github.com/pointfreeco/swift-snapshot-testing",
"state" : {
"revision" : "b44b563e6ddc5a613a107fb57626047a7f1d4e1a",
"version" : "1.9.666"
"revision" : "625ccca8570773dd84a34ee51a81aa2bc5a4f97a",
"version" : "1.16.0"
}
},
{
"identity" : "swift-syntax",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-syntax",
"state" : {
"revision" : "fa8f95c2d536d6620cc2f504ebe8a6167c9fc2dd",
"version" : "510.0.1"
}
},
{
Expand All @@ -28,5 +38,5 @@
}
}
],
"version" : 2
"version" : 3
}