Skip to content

Commit 68118be

Browse files
committed
Test: add full UI interaction flow - dismiss dialog, click Ubuntu, enter creds, select SSH
1 parent 9e3b6f0 commit 68118be

1 file changed

Lines changed: 63 additions & 30 deletions

File tree

.github/workflows/test.yml

Lines changed: 63 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,6 @@ jobs:
8383
8484
echo "=== Installing APK ==="
8585
adb install -r app/build/outputs/apk/debug/app-debug.apk
86-
INSTALL_EXIT=$?
87-
echo "Install exit code: $INSTALL_EXIT"
8886
8987
echo "=== Verify package installed ==="
9088
adb shell pm list packages | grep ubuntuandroid || echo "PACKAGE NOT FOUND"
@@ -98,42 +96,77 @@ jobs:
9896
9997
echo "=== Launching app ==="
10098
adb shell am start -W -n com.scisammy.ubuntuandroid/tech.ula.MainActivity
101-
LAUNCH_EXIT=$?
102-
echo "Launch exit code: $LAUNCH_EXIT"
103-
10499
sleep 10
105100
106-
echo "=== Check if app is running ==="
107-
adb shell dumpsys activity activities | grep -i "ubuntuandroid" | head -5
108-
109-
echo "=== UI dump after 10s ==="
101+
echo "=== UI after launch ==="
110102
adb shell uiautomator dump /sdcard/ui1.xml || true
111103
adb pull /sdcard/ui1.xml /tmp/ui1.xml || true
112104
cat /tmp/ui1.xml | sed 's/>/>\n/g' | grep -o 'text="[^"]*"' | grep -v 'text=""'
113105
114-
echo "=== Logcat errors after launch ==="
115-
adb logcat -d | grep -iE " F " | grep -vi "DEBUG" | tail -20 || echo "no fatal logs"
116-
adb logcat -d | grep -iE "AndroidRuntime|FATAL|CRASH|ubuntuandroid" | tail -30 || echo "no crash logs"
117-
adb logcat -d | grep -iE "tech\.ula|UlaApp|ServerService|LocalServer|MissingExec|FailedExec|startSSH|execInProot|proot|busybox|setupLinks" | tail -50 || echo "no ula logs"
118-
119-
echo "=== Support directory ==="
120-
adb shell ls -la /data/data/com.scisammy.ubuntuandroid/files/support/ 2>/dev/null || echo "support dir not found"
121-
122-
echo "=== Files directory ==="
123-
adb shell ls -la /data/data/com.scisammy.ubuntuandroid/files/ 2>/dev/null || echo "files dir not found"
124-
125-
echo "=== Filesystem directories ==="
126-
adb shell find /data/data/com.scisammy.ubuntuandroid/files/ -maxdepth 2 -type d 2>/dev/null || echo "cannot list"
127-
128-
echo "=== Native libs check ==="
129-
adb shell ls -la /data/app/ 2>/dev/null | grep ubuntuandroid || echo "not in /data/app"
130-
adb shell pm path com.scisammy.ubuntuandroid || echo "package path not found"
106+
echo "=== Dismissing error report dialog (tap NOT REALLY) ==="
107+
adb shell input tap 278 143
108+
sleep 3
109+
110+
echo "=== Tapping Ubuntu ==="
111+
adb shell input tap 540 496
112+
sleep 5
113+
114+
echo "=== UI after tapping Ubuntu ==="
115+
adb shell uiautomator dump /sdcard/ui2.xml || true
116+
adb pull /sdcard/ui2.xml /tmp/ui2.xml || true
117+
cat /tmp/ui2.xml | tr '>' '\n' | grep -E 'text="[^"]' | head -20
118+
119+
echo "=== Entering credentials ==="
120+
adb shell input tap 540 300
121+
sleep 1
122+
adb shell input text "user"
123+
adb shell input keyevent 61
124+
sleep 0.5
125+
adb shell input text "password"
126+
adb shell input keyevent 61
127+
sleep 0.5
128+
adb shell input text "password"
129+
sleep 1
130+
131+
echo "=== Pressing OK ==="
132+
adb shell input keyevent 66
133+
sleep 5
134+
135+
echo "=== UI after credentials ==="
136+
adb shell uiautomator dump /sdcard/ui3.xml || true
137+
adb pull /sdcard/ui3.xml /tmp/ui3.xml || true
138+
cat /tmp/ui3.xml | tr '>' '\n' | grep -E 'text="[^"]' | head -20
139+
140+
echo "=== Selecting SSH ==="
141+
adb shell input tap 540 400
142+
sleep 1
143+
adb shell input keyevent 66
144+
sleep 5
145+
146+
echo "=== UI after SSH selection ==="
147+
adb shell uiautomator dump /sdcard/ui4.xml || true
148+
adb pull /sdcard/ui4.xml /tmp/ui4.xml || true
149+
cat /tmp/ui4.xml | tr '>' '\n' | grep -E 'text="[^"]' | head -20
150+
151+
echo "=== Waiting for download + setup (3 min) ==="
152+
for i in $(seq 1 12); do
153+
sleep 15
154+
echo "--- Check $((i * 15))s ---"
155+
adb shell uiautomator dump /sdcard/ui_check.xml || true
156+
adb pull /sdcard/ui_check.xml /tmp/ui_check.xml || true
157+
cat /tmp/ui_check.xml | tr '>' '\n' | grep -oE 'text="[^"]*"' | grep -v 'text=""' | head -15
158+
done
159+
160+
echo "=== Final UI ==="
161+
adb shell uiautomator dump /sdcard/ui_final.xml || true
162+
adb pull /sdcard/ui_final.xml /tmp/ui_final.xml || true
163+
cat /tmp/ui_final.xml | tr '>' '\n' | grep -oE 'text="[^"]*"' | grep -v 'text=""' | head -30
164+
165+
echo "=== Logcat ula tags ==="
166+
adb logcat -d | grep -iE "tech\.ula|ServerService|LocalServer|MissingExec|FailedExec|startSSH|execInProot|proot|busybox|setupLinks|UlaApp" | tail -80 || echo "no ula logs"
131167
132168
echo "=== Processes ==="
133-
adb shell ps -A | grep -iE "proot|dropbear|busybox|sshd|ubuntuandroid|ula" || echo "no relevant processes"
134-
135-
echo "=== Logcat all errors ==="
136-
adb logcat -d | grep " E " | grep -vi "chromium|DEBUG|sentry|Looper|InputMethod|Accessibility|DecorView|OpenGL|EGL|SurfaceFlinger|libEGL|ConfigStore|android.hardware" | tail -20 || echo "no errors"
169+
adb shell ps -A | grep -iE "proot|dropbear|busybox|sshd" || echo "no server processes"
137170
138171
echo "=== Screenshot ==="
139172
adb shell screencap -p /sdcard/screen.png || true

0 commit comments

Comments
 (0)