summaryrefslogtreecommitdiff
path: root/app/src/androidTest/java/utils/CustomInteractions.java
diff options
context:
space:
mode:
authorcyberta <cyberta@riseup.net>2026-07-03 13:23:32 +0200
committercyberta <cyberta@riseup.net>2026-07-03 17:49:31 +0200
commitbe186e4eda72f14eb3b8f6fab76fbeda9d9fb175 (patch)
tree0a35c05944b7888aecf406bfb721434e8903f318 /app/src/androidTest/java/utils/CustomInteractions.java
parent1784fb5e60414808f21f4596959adf7a8b46e675 (diff)
fix and extend instrumentation tests used for automatted screenshots
Diffstat (limited to 'app/src/androidTest/java/utils/CustomInteractions.java')
-rw-r--r--app/src/androidTest/java/utils/CustomInteractions.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/app/src/androidTest/java/utils/CustomInteractions.java b/app/src/androidTest/java/utils/CustomInteractions.java
index 4890c20c..35f8b48f 100644
--- a/app/src/androidTest/java/utils/CustomInteractions.java
+++ b/app/src/androidTest/java/utils/CustomInteractions.java
@@ -18,7 +18,11 @@ public class CustomInteractions {
return tryResolve(viewInteraction, assertion, 10);
}
- public static @Nullable ViewInteraction tryResolve(ViewInteraction viewInteraction, ViewAssertion assertion, int maxTries) {
+ public static @Nullable ViewInteraction tryResolve(ViewInteraction viewInteraction, ViewAssertion assertion, int maxTries) {
+ return tryResolve(viewInteraction, assertion, maxTries, "");
+ }
+
+ public static @Nullable ViewInteraction tryResolve(ViewInteraction viewInteraction, ViewAssertion assertion, int maxTries, String message) {
ViewInteraction resolvedViewInteraction = null;
int attempt = 0;
boolean hasFound = false;
@@ -30,7 +34,7 @@ public class CustomInteractions {
}
hasFound = true;
} catch (NoMatchingViewException exception) {
- System.out.println("NoMatchingViewException - attempt: " + attempt + ". " + exception.getLocalizedMessage());
+ System.out.println("NoMatchingViewException " + message +" - attempt: " + attempt + ". " + exception.getLocalizedMessage());
attempt++;
if (attempt == maxTries) {
throw exception;