Comments (10)
Thanks for reporting the issue (and PR, which I'll look at shortly)! Re: your suggestions:
- Allow to look in Bundle resources for the snapshot file
- Allow a run-time file search to find the path of the snapshot
Either of these sound like viable solutions, though we wanna think over the ramifications a bit.
Why there is
StaticString
forfile
parameter inassertSnapshot
instead ofString
?
I think this is an oversight that we can fix.
from swift-snapshot-testing.
It could be environment variables like IMAGE_DIFF_DIR
and FB_REFERENCE_IMAGE_DIR
in iOSSnapshotTestCase.
from swift-snapshot-testing.
And just one small related question. Why there is StaticString
for file
parameter in assertSnapshot
instead of String
? So there is no way to pass a run-time requested string even from the caller's side.
from swift-snapshot-testing.
@vox-humana Unfortunately file
needs to be passed to XCTFail
as a StaticString
, so this interface can't be changed.
from swift-snapshot-testing.
@stephencelis Oh, I see, it is sad. Thank you.
from swift-snapshot-testing.
With the #file
macro changing its output in a future release of Swift (perhaps 5.4?), what's the plan to address storage paths? Having a standard ENV variable would at least be helpful to prevent general chaos over the #file
-> #filePath
transition
from swift-snapshot-testing.
Good afternoon, any news one this ?
from swift-snapshot-testing.
Xcode Cloud also runs the tests on a different machine to the build machine, so this suggestion would help there too. I'm currently using the technique discussed in this thread (#553) to make the snapshots accessible to the tests, but having the library support this case natively would be a cool addition!
from swift-snapshot-testing.
Any news on this? @stephencelis
from swift-snapshot-testing.
Any news regarding this?
from swift-snapshot-testing.
Related Issues (20)
- Timeout Error During Snapshot Testing with WKWebView
- Snapshots tests fail when Json returns in different order, HOT 1
- macCatalyst: Snapshots generated differ a lot between local computer and a MacStadium M1 mac mini HOT 1
- Run success on local and xcode on CI Runner but test failed when using fastlane run_tests HOT 5
- Text-based snapshots break across platforms due to line ending differences HOT 2
- Undefined symbols Linker command failed with exit code 1. HOT 1
- Snapshot adds imported module's name that fails match with reference shapshot
- Deadlock in inline snapshot testing HOT 4
- What's the way to use `assertSnapshot` in async test? HOT 3
- How to snapshot on special iOS version? HOT 1
- Optimizing Image Handling in Swift Snapshot Testing
- Snapshot of table view with combine receiver happens too late HOT 1
- swift-syntax 510.0.0 update not possible HOT 1
- How to generate iPhone 15 Snapshots with Xcode 15, as view.swift doesn't contain those dimensions HOT 1
- I get "Process completed with exit code 65" when I use "assertSnapshot(of: vc, as: .image)" function on GitHub Actions.
- `diffTool` have a Swift 6 warning on Xcode 15.3 with Strict Concurrency Checking set to Complete HOT 3
- Privacy manifest for AppStore releases HOT 1
- "The file “...” couldn’t be opened because you don’t have permission to view it" after switching branch
- Privacy manifest file / Privacy Rules HOT 1
- Blank diff snapshot
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from swift-snapshot-testing.