Skip to content

Commit

Permalink
WIP: pure experimentation in swiping off error message
Browse files Browse the repository at this point in the history
  • Loading branch information
t184256 committed Jul 6, 2024
1 parent 874c805 commit 9211bb1
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/emulator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,11 @@ jobs:
# 34: sometimes work, but doesn't seem stable, even w/o caching images
script:
- android_integration
- bootstrap_flakes
- bootstrap_channels
- poke_around
- test_channels_uiautomator
- test_channels_shell
# bootstrap_flakes
# bootstrap_channels
# poke_around
# test_channels_uiautomator
# test_channels_shell

steps:
- name: Checkout repository
Expand Down
18 changes: 18 additions & 0 deletions tests/emulator/android_integration.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import time

import bootstrap_channels

from common import screenshot, wait_for
Expand Down Expand Up @@ -42,6 +44,21 @@ def run(d):
wait_for(d, 'https://dontkillmyapp.com')
screenshot(d, 'am-wants-permission')

# ... there's a notification now, get rid of it
time.sleep(1)
screenshot(d, 'am-wants-permission-second-later')
if 'text="TermuxAm Socket Server Error"' in d.ui.dump_hierarchy():
d.ui.open_notification()
screenshot(d, 'notification-opened')
d.ui(text='TermuxAm Socket Server Error').click()
time.sleep(.25)
screenshot(d, 'error-notification-clicked')
if 'text="TermuxAm Socket Server Error"' in d.ui.dump_hierarchy():
d.ui(text='TermuxAm Socket Server Error').swipe_ext('right')
screenshot(d, 'error-notification-swiped-right')
d.ui.press('back')
screenshot(d, 'back')

# Grant nix app 'Draw over other apps' permission
nod.permissions += 'android.permission.SYSTEM_ALERT_WINDOW'

Expand All @@ -51,6 +68,7 @@ def run(d):
screenshot(d, 'settings-opening')
wait_for(d, 'Search settings')
wait_for(d, 'Network')
screenshot(d, 'settings-awaited')
d.ui.press('back')
screenshot(d, 'back-from-settings')

Expand Down

0 comments on commit 9211bb1

Please sign in to comment.