mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-01 08:16:49 +00:00
Added ViewCapture to all tests which implement AbstractLauncherUiTest.
This enables developers to watch failed tests in classes like TaplTestsQuickstep in the go/web-hv tool. Bug: 242867462 Test: Failed a test and verified that the TimeLapse bugreport entry showed up properly in the go/web-hv tool. Change-Id: Ic89af2a0e7102db52c52ddc668607a81c4809ed6
This commit is contained in:
@@ -72,6 +72,7 @@ import com.android.launcher3.util.rule.SamplerRule;
|
||||
import com.android.launcher3.util.rule.ScreenRecordRule;
|
||||
import com.android.launcher3.util.rule.ShellCommandRule;
|
||||
import com.android.launcher3.util.rule.TestStabilityRule;
|
||||
import com.android.launcher3.util.rule.ViewCaptureRule;
|
||||
|
||||
import org.junit.After;
|
||||
import org.junit.Assert;
|
||||
@@ -215,14 +216,15 @@ public abstract class AbstractLauncherUiTest {
|
||||
}
|
||||
|
||||
protected TestRule getRulesInsideActivityMonitor() {
|
||||
final ViewCaptureRule viewCaptureRule = new ViewCaptureRule();
|
||||
final RuleChain inner = RuleChain
|
||||
.outerRule(new PortraitLandscapeRunner(this))
|
||||
.around(new FailureWatcher(mDevice, mLauncher));
|
||||
.around(viewCaptureRule)
|
||||
.around(new FailureWatcher(mDevice, mLauncher, viewCaptureRule.getViewCapture()));
|
||||
|
||||
return TestHelpers.isInLauncherProcess()
|
||||
? RuleChain.outerRule(ShellCommandRule.setDefaultLauncher())
|
||||
.around(inner) :
|
||||
inner;
|
||||
? RuleChain.outerRule(ShellCommandRule.setDefaultLauncher()).around(inner)
|
||||
: inner;
|
||||
}
|
||||
|
||||
@Rule
|
||||
|
||||
Reference in New Issue
Block a user