WeTransfer / WeScan

Document Scanning Made Easy for iOS
MIT License
2.83k stars 550 forks source link

Copy snapshots to test bundle to solve SPM warning #363

Closed valeriyvan closed 1 year ago

valeriyvan commented 1 year ago

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 commented 1 year ago
Fails
:no_entry_sign: **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
:no_entry_sign: **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
:warning: 'gray' was deprecated in iOS 13.0: renamed to 'UIActivityIndicatorView.Style.medium'
:warning: 'init(source:)' was deprecated in iOS 12.0: Core Image Kernel Language API deprecated. (Define CI_SILENCE_GL_DEPRECATION to silence these warnings)
:warning: 'blackTranslucent' was deprecated in iOS 13.0: Use UIBarStyleBlack and set the translucent property to YES instead.
:warning: 'isAutoStillImageStabilizationEnabled' was deprecated in iOS 13.0
:warning: 'jpegPhotoDataRepresentation(forJPEGSampleBuffer:previewPhotoSampleBuffer:)' was deprecated in iOS 11.0
:warning: 'blackTranslucent' was deprecated in iOS 13.0: Use UIBarStyleBlack and set the translucent property to YES instead.
Messages
:book: WeScanTests: Executed 60 tests (2 failed, 0 retried, 0 skipped) in 14.252 seconds
:book: Slowest test: RectangleFeaturesFunnelTests/testAddAlternateImage() (4.870s)
:book: Slowest test: RectangleFeaturesFunnelTests/testAddPreviouslyDisplayedRect() (3.141s)
:book: Slowest test: RectangleFeaturesFunnelTests/testAddMinUnderThreshold() (3.022s)
:book: 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 :no_entry_sign: Danger Swift against 419b4d469148bda0947732ce845119a3cbe7f8c1

wetransferplatform commented 1 year ago

Congratulations! :tada: This was released as part of Release 3.0.0-beta.1 :rocket:

Generated by GitBuddy