Comments (10)
Recording snapshots will fail the test, if you change that to haveValidSnapshot
then it should work 👍
from nimble-snapshots.
Hi Ash,
I did try both. When I run recordSnapshot, I don't see any newly created image (.png file) of the view.
When I run haveValidSnapshot, that also fails (because there is no reference image).
On a separate note --
What's the default directory for the reference images?
From the README, I think it's ReferenceImages in Test directory. Does the ReferenceImages dir get created automatically, or we need to create it? Because I didn't see any directory getting created after I ran the recordSnapshot.
Even after I create it manually, I don't see any images in it after recordSnapshot.
from nimble-snapshots.
I think it's created automatically, did you try a git status
to see if any new folders were created?
from nimble-snapshots.
I just ran git status and there aren't any newly created folders.
Do you know why recordSnapshot is not creating any images?
Any easy way to diagnose it?
from nimble-snapshots.
At that point, the problem could be with FBSnapshots - I'm afraid without any useful error messages from your logs - you're on your own, throw some breakpoints around
from nimble-snapshots.
Let me see if FBSnapshots work by itself in my project.
I will let you know. Thanks for the quick response. 👍
from nimble-snapshots.
So far, I have been running my tests on a real iPhone.
Then, I read on the FBSnapshotTestCase page:
Your unit test must be an "application test", not a "logic test." (That is, it must be run within the Simulator so that it has access to UIKit.)
Not sure what it means. But, when I ran a test with FBSnapshotTestcase on a simulator, it worked!
Then, I ran Nimble_Snapshots on a simulator and it worked too.
Can you please explain why it only works on a simulator? Is it expected to work when running tests on real hardware?
from nimble-snapshots.
Likely because FBSnapshots needs access to your source code to find the refernce images, it can't get the code if it's running on a different computer
from nimble-snapshots.
re: application vs logic tests - app tests are run inside your application, logic tests are tests that don't need to run inside an application
from nimble-snapshots.
closing due to inactivity
from nimble-snapshots.
Related Issues (20)
- Snapshot ViewController together with keyboard.
- Migrate to new CI provider HOT 2
- Is it possible to add option to avoid the suffix in the snapshots HOT 1
- compiler error on building with Nimble-Snapshots 9.1.0 using Carthage on Xcode 12.5, Swift 5.4 HOT 4
- Create release that includes Package.swift HOT 1
- 9.2.0 podspec validation problem HOT 2
- Release with ios-snapshot-test-case 8.0.0 HOT 3
- Can't import FBSnapshotTestCase in HaveValidSnapshot.swift after update to iOSSanpshotTestCase 8.0.0 HOT 15
- Swift Package Manager - class name is not removed from snapshot image name HOT 3
- Support for SwiftUI? HOT 14
- Release with Nimble v11 support HOT 3
- Fix CI
- Type 'XCTContext' has no member 'runActivity' HOT 9
- Extra underscore in snapshot filename with 9.5.1 compared to 9.4.0
- Is there a possibility to record the failed snapshot automatically? HOT 2
- Pull Request 268 Released? HOT 4
- Can we have a new version for SPM which is compatible with nimble 12? HOT 1
- Xcode 15/Swift 5.9 Problems HOT 3
- Lastest versions not available on cocoapod sources HOT 2
- Xcode 15 support and Nimble dependency HOT 7
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 nimble-snapshots.