Saving view capture data before cleaning it in ViewCaptureRule

This makes it reliably available to FailureWatcher who saves the
 artifact afterwards.

Test: local, presubmit
Flag: N/A
Bug: 286251603
Change-Id: I11b4854684f6ba5c798096eac223760d76f004b1
This commit is contained in:
vadimt
2023-06-15 16:19:17 -07:00
parent 62f24f63ad
commit 95c1dc70b4
4 changed files with 19 additions and 14 deletions

View File

@@ -207,7 +207,7 @@ public abstract class AbstractLauncherUiTest {
final ViewCaptureRule viewCaptureRule = new ViewCaptureRule(mActivityMonitor::getActivity);
final RuleChain inner = RuleChain
.outerRule(new PortraitLandscapeRunner(this))
.around(new FailureWatcher(mDevice, mLauncher, viewCaptureRule.getViewCapture()))
.around(new FailureWatcher(mLauncher, viewCaptureRule::getViewCaptureData))
.around(viewCaptureRule)
.around(new ViewCaptureAnalysisRule(viewCaptureRule.getViewCapture()));