google / jetpack-camera-app

Apache License 2.0
116 stars 25 forks source link

Fix ImageCaptureDeviceTest #219

Closed davidjiagoogle closed 3 weeks ago

davidjiagoogle commented 1 month ago

Convert some of the uiDevice.findObject() and uiDevice.wait() to composeTestRule. In external intent launches, the using composeTestRule.waitUtil() for the snackBar causes a strange behavior, so that one remains using uiDevice.wait().

Instead of the convoluted implementation before, added runScenarioTestForResult() for simpler code and better readability.

For image_capture() failure we were experiencing in presubmit, removed the assertion on deleteFileInDireAfterTimestamp() and assert the lastModifiedTime of the folder. I cannot repro the failure on my device, so I hope this may fix it.