Further improving TAPL error messages
Old:
java.lang.AssertionError: http://go/tapl test failure:
Context: getting widget No Config in widgets list => resulting visible state is Widgets;
Details: Widgets container didn't become scrollable
New:
java.lang.AssertionError: http://go/tapl test failure: Widgets container didn't become scrollable;
Context: getting widget No Config in widgets list; now visible state is Widgets
Test: local runs
Bug: 187761685
Change-Id: I77a5b9133f577af27182f823e1130c371863e065
diff --git a/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java b/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java
index c4d46ee..5129943 100644
--- a/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java
+++ b/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java
@@ -504,9 +504,8 @@
void fail(String message) {
checkForAnomaly();
Assert.fail(formatSystemHealthMessage(formatErrorWithEvents(
- "http://go/tapl test failure:\nContext: " + getContextDescription()
- + " => resulting visible state is " + getVisibleStateMessage()
- + ";\nDetails: " + message, true)));
+ "http://go/tapl test failure: " + message + ";\nContext: " + getContextDescription()
+ + "; now visible state is " + getVisibleStateMessage(), true)));
}
private String getContextDescription() {