google / jetpack-camera-app

Apache License 2.0
152 stars 29 forks source link

Fix ImageCaptureDeviceTest #219

Closed davidjiagoogle closed 5 months ago

davidjiagoogle commented 5 months 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.