Skip to content

Commit

Permalink
update snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiikhliustin committed Apr 29, 2024
1 parent 71e116a commit 991a47b
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 4 deletions.
9 changes: 8 additions & 1 deletion Buildio.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

/* Begin PBXBuildFile section */
3F17BABC27AC449F005CA881 /* BuildioUI in Frameworks */ = {isa = PBXBuildFile; productRef = 3F17BABB27AC449F005CA881 /* BuildioUI */; };
3F428FDA2BDFE46B00E999F5 /* Setup.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3F428FD92BDFE46B00E999F5 /* Setup.swift */; };
3F47282227A9DDF000C4CD88 /* app_icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 3F47282127A9DDF000C4CD88 /* app_icon.png */; };
3F68BCFF293D38750048A14F /* Shared.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3F68BCFE293D38750048A14F /* Shared.swift */; };
3F68BD02293D41090048A14F /* LoginScreenTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3F68BD01293D41090048A14F /* LoginScreenTests.swift */; };
Expand Down Expand Up @@ -54,6 +55,7 @@
3F17BABA27AC4487005CA881 /* BuildioUI */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = BuildioUI; path = Modules/BuildioUI; sourceTree = "<group>"; };
3F1AC92227A9D7D500DB3BB6 /* SwiftUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SwiftUI.framework; path = System/Library/Frameworks/SwiftUI.framework; sourceTree = SDKROOT; };
3F3295842735A623001994B0 /* Buildio (iOS).entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = "Buildio (iOS).entitlements"; sourceTree = "<group>"; };
3F428FD92BDFE46B00E999F5 /* Setup.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Setup.swift; sourceTree = "<group>"; };
3F47282127A9DDF000C4CD88 /* app_icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = app_icon.png; sourceTree = "<group>"; };
3F4E0354293D290800AB0322 /* BuildioUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = BuildioUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
3F68BCFE293D38750048A14F /* Shared.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Shared.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -190,6 +192,7 @@
children = (
3F68BD00293D41090048A14F /* Screens */,
3F68BCFE293D38750048A14F /* Shared.swift */,
3F428FD92BDFE46B00E999F5 /* Setup.swift */,
);
path = Sources;
sourceTree = "<group>";
Expand Down Expand Up @@ -334,6 +337,7 @@
3F68BD09293D42560048A14F /* SettingsScreenTests.swift in Sources */,
3F68BD0C293D42C40048A14F /* BuildScreenTests.swift in Sources */,
3F68BCFF293D38750048A14F /* Shared.swift in Sources */,
3F428FDA2BDFE46B00E999F5 /* Setup.swift in Sources */,
3F68BD04293D418A0048A14F /* BuildsScreenTests.swift in Sources */,
3FCBBA35293D665800647755 /* ArtifactsScreenTests.swift in Sources */,
3F68BD08293D42560048A14F /* AccountsScreenTests.swift in Sources */,
Expand Down Expand Up @@ -370,6 +374,7 @@
DEBUG_INFORMATION_FORMAT = dwarf;
DEVELOPMENT_TEAM = 6C4646EB2U;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_KEY_NSPrincipalClass = BuildioUITests.Setup;
INFOPLIST_KEY_UIStatusBarHidden = YES;
IPHONEOS_DEPLOYMENT_TARGET = 16.1;
MARKETING_VERSION = 1.0;
Expand All @@ -392,6 +397,7 @@
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = 6C4646EB2U;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_KEY_NSPrincipalClass = BuildioUITests.Setup;
INFOPLIST_KEY_UIStatusBarHidden = YES;
IPHONEOS_DEPLOYMENT_TARGET = 16.1;
MARKETING_VERSION = 1.0;
Expand All @@ -414,6 +420,7 @@
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = 6C4646EB2U;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_KEY_NSPrincipalClass = BuildioUITests.Setup;
INFOPLIST_KEY_UIStatusBarHidden = YES;
IPHONEOS_DEPLOYMENT_TARGET = 16.1;
MARKETING_VERSION = 1.0;
Expand Down Expand Up @@ -758,7 +765,7 @@
repositoryURL = "https://github.com/pointfreeco/swift-snapshot-testing";
requirement = {
kind = exactVersion;
version = 1.10.0;
version = 1.16.0;
};
};
/* End XCRemoteSwiftPackageReference section */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,17 @@
"repositoryURL": "https://github.com/pointfreeco/swift-snapshot-testing",
"state": {
"branch": null,
"revision": "f29e2014f6230cf7d5138fc899da51c7f513d467",
"version": "1.10.0"
"revision": "625ccca8570773dd84a34ee51a81aa2bc5a4f97a",
"version": "1.16.0"
}
},
{
"package": "swift-syntax",
"repositoryURL": "https://github.com/apple/swift-syntax",
"state": {
"branch": null,
"revision": "fa8f95c2d536d6620cc2f504ebe8a6167c9fc2dd",
"version": "510.0.1"
}
},
{
Expand Down
15 changes: 15 additions & 0 deletions BuildioUITests/Sources/Setup.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
//
// Setup.swift
// BuildioUITests
//
// Created by Sergey Khliustin on 29.04.2024.
//

import Foundation
import SnapshotTesting

final class Setup: NSObject {
override init() {
SnapshotTesting.diffTool = "ksdiff"
}
}
2 changes: 1 addition & 1 deletion BuildioUITests/Sources/Shared.swift
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ extension XCTActivity {
guard let image = app.windows.firstMatch.screenshot().image.removingBottomBar else { return }
let view = UIImageView(image: image)
let name = (ProcessInfo.processInfo.isMacCatalystApp ? "mac_" : "ios_") + testName
SnapshotTesting.assertSnapshot(matching: view, as: .image(perceptualPrecision: 0.92), file: file, testName: name, line: line)
SnapshotTesting.assertSnapshot(matching: view, as: .image(precision: 0.95, perceptualPrecision: 0.95), file: file, testName: name, line: line)
}
}

Expand Down

0 comments on commit 991a47b

Please sign in to comment.