Add Android support
Opened this issue · 0 comments
Trying to assert a snapshot in an android Instrumentation test will make it fail with:
java.nio.file.FileSystemException: /__snapshots__: Read-only file system
This happens because the test runs inside a test app installed on the device/emulator. The way to work around this is to create a plugin that starts by pushing all snapshots with ADB before the test, then snapshots are saved to the device, then plugin extracts them again after the test. This is how https://facebook.github.io/screenshot-tests-for-android/ is doing.
Still not sure if support for android instrumentation tests is needed, since the current sample app uses Robolectric and Radiography to snapshot a text version of it. With some more Radiography renders for styling attributes and proper sizing, maybe it is enough to snapshot individual views/view hierarchies.