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

Copy snapshots to test bundle to solve SPM warning #363

Merged
merged 2 commits into from
Jun 26, 2023

Conversation

valeriyvan
Copy link
Contributor

There's a warning about 16 unhandled resources when running build in command line. PR addresses this warning by adding to package manifest instruction to copy resources to test bundle and exclude Info.plist.

warning: 'wescan': found 16 file(s) which are unhandled; explicitly declare them as resources or exclude from the target
/Users/***/WeScan/Tests/WeScanTests/__Snapshots__/VisionRectangleDetectorTests/testCorrectlyDetectsAndReturnsQuadilateral.1.png
/Users/***/WeScan/Tests/WeScanTests/__Snapshots__/ReviewViewControllerTests/testImageIsCorrectlyRotated90.1.png
/Users/***/WeScan/Tests/WeScanTests/__Snapshots__/ReviewViewControllerTests/testEnhancedImage.1.png
/Users/***/WeScan/Tests/WeScanTests/__Snapshots__/ReviewViewControllerTests/testImageIsCorrectlyRotated180.1.png
/Users/***/WeScan/Tests/WeScanTests/__Snapshots__/UIImageTests/testRotateRightFacingImageCorrectly.1.png
/Users/***/WeScan/Tests/WeScanTests/Info.plist
/Users/***/WeScan/Tests/WeScanTests/__Snapshots__/UIImageTests/testRotateLeftFacingImageCorrectly.1.png
/Users/***/WeScan/Tests/WeScanTests/__Snapshots__/VisionRectangleDetectorTests/testCorrectlyDetectsAndReturnsQuadilateralPixelBuffer.1.png
/Users/***/WeScan/Tests/WeScanTests/__Snapshots__/ReviewViewControllerTests/testDemoImageIsCorrect.1.png
/Users/***/WeScan/Tests/WeScanTests/__Snapshots__/CIRectangleDetectorTests/testCorrectlyDetectsAndReturnsQuadilateral.1.png
/Users/***/WeScan/Tests/WeScanTests/__Snapshots__/UIImageTests/testRotateUpFacingImageCorrectly.1.png
/Users/***/WeScan/Tests/WeScanTests/__Snapshots__/UIImageTests/testRotateDefaultFacingImageCorrectly.1.png
/Users/***/WeScan/Tests/WeScanTests/__Snapshots__/ReviewViewControllerTests/testImageIsCorrectlyRotated360.1.png
/Users/***/WeScan/Tests/WeScanTests/__Snapshots__/ReviewViewControllerTests/testImageIsCorrectlyRotated270.1.png
/Users/***/WeScan/Tests/WeScanTests/__Snapshots__/UIImageTests/testRotateDownFacingImageCorrectly.1.png
/Users/***/WeScan/Tests/WeScanTests/__Snapshots__/UIImageTests/testRotateImageCorrectly.1.png

@wetransferplatform
Copy link
Collaborator

Fails
🚫

CIRectangleDetectorTests.testCorrectlyDetectsAndReturnsQuadilateral():
failed - Snapshot does not match reference.

@−
"/Users/vagrant/git/Tests/WeScanTests/Snapshots/CIRectangleDetectorTests/testCorrectlyDetectsAndReturnsQuadilateral.1.png"
@+
"/Users/vagrant/Library/Developer/CoreSimulator/Devices/D7CA41A8-547E-4DC0-9C53-FF5A41928CA5/data/tmp/CIRectangleDetectorTests/testCorrectlyDetectsAndReturnsQuadilateral.1.png"

To configure output for a custom diff tool, like Kaleidoscope:

SnapshotTesting.diffTool = "ksdiff"

Actual perceptual precision 0.69906247 is less than required 0.97

🚫

VisionRectangleDetectorTests.testCorrectlyDetectsAndReturnsQuadilateral():
failed - Snapshot does not match reference.

@−
"/Users/vagrant/git/Tests/WeScanTests/Snapshots/VisionRectangleDetectorTests/testCorrectlyDetectsAndReturnsQuadilateral.1.png"
@+
"/Users/vagrant/Library/Developer/CoreSimulator/Devices/D7CA41A8-547E-4DC0-9C53-FF5A41928CA5/data/tmp/VisionRectangleDetectorTests/testCorrectlyDetectsAndReturnsQuadilateral.1.png"

To configure output for a custom diff tool, like Kaleidoscope:

SnapshotTesting.diffTool = "ksdiff"

Newly-taken snapshot does not match reference.

Warnings
⚠️ 'gray' was deprecated in iOS 13.0: renamed to 'UIActivityIndicatorView.Style.medium'
⚠️

'init(source:)' was deprecated in iOS 12.0: Core Image Kernel Language API deprecated. (Define CI_SILENCE_GL_DEPRECATION to silence these warnings)

⚠️ 'blackTranslucent' was deprecated in iOS 13.0: Use UIBarStyleBlack and set the translucent property to YES instead.
⚠️ 'isAutoStillImageStabilizationEnabled' was deprecated in iOS 13.0
⚠️ 'jpegPhotoDataRepresentation(forJPEGSampleBuffer:previewPhotoSampleBuffer:)' was deprecated in iOS 11.0
⚠️ 'blackTranslucent' was deprecated in iOS 13.0: Use UIBarStyleBlack and set the translucent property to YES instead.
Messages
📖 WeScanTests: Executed 60 tests (2 failed, 0 retried, 0 skipped) in 14.252 seconds
📖 Slowest test: RectangleFeaturesFunnelTests/testAddAlternateImage() (4.870s)
📖 Slowest test: RectangleFeaturesFunnelTests/testAddPreviouslyDisplayedRect() (3.141s)
📖 Slowest test: RectangleFeaturesFunnelTests/testAddMinUnderThreshold() (3.022s)
📖

View more details on Bitrise

Code Coverage Report

Name Coverage
WeScan 37.73% ⚠️

SwiftLint found issues

Severity File Reason
Warning Package.swift:28 Colons should be next to the identifier when specifying a type and next to the key in dictionary literals (colon)

Generated by 🚫 Danger Swift against 419b4d4

Copy link
Contributor

@AvdLee AvdLee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution!

@@ -25,8 +25,10 @@ let package = Package(
"WeScan",
.product(name: "SnapshotTesting", package: "swift-snapshot-testing")
],
exclude:["Info.plist"],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
exclude:["Info.plist"],
exclude: ["Info.plist"],

But oh well 🤷

@BasThomas BasThomas merged commit 6c3b9cf into WeTransfer:master Jun 26, 2023
@valeriyvan valeriyvan deleted the copy branch June 26, 2023 11:59
@wetransferplatform
Copy link
Collaborator

Congratulations! 🎉 This was released as part of Release 3.0.0-beta.1 🚀

Generated by GitBuddy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants