pedrovgs / Shot

Screenshot testing library for Android
Apache License 2.0
1.19k stars 116 forks source link

Fix Compose JSON parsing #286

Closed olegosipenko closed 2 years ago

olegosipenko commented 2 years ago

:pushpin: References

:tophat: What is the goal?

Processing of screenshot results on Compose fails because of the issue with Jackson being not able to create a reader to process JSON results. This is a workaround to parse those results without help of Jackson.

How is it being implemented?

Instead of parsing the the ComposeScreenshotSuite with the help of Jackson, the manual parsing of AST implemented. This also aligns the parsing process with another implementation flow for legacy view system in ScreenshotsSuiteJsonParser, where the manual AST parsing happens. I also did some refactoring to improve code structure in ScreenshotsComposeSuiteJsonParser.

How can it be tested?