From 7e8cda14a751d01e8147624b60ab533365b41ef1 Mon Sep 17 00:00:00 2001 From: vadimt Date: Thu, 15 Jul 2021 17:41:31 -0700 Subject: [PATCH] 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 --- .../com/android/launcher3/tapl/LauncherInstrumentation.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java b/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java index c4d46ee07d..5129943f79 100644 --- a/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java +++ b/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java @@ -504,9 +504,8 @@ public final class LauncherInstrumentation { 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() {