Skip to content

Commit

Permalink
WIP: tests/emulator: avoid "ADD TO DICTIONARY" by sleeping
Browse files Browse the repository at this point in the history
  • Loading branch information
t184256 committed Jul 7, 2024
1 parent bab7c45 commit fdcdea8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
7 changes: 1 addition & 6 deletions tests/emulator/bootstrap_channels.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,13 @@ def run(d):
nod = d.app('com.termux.nix', url=APK)
nod.permissions.allow_notifications()
nod.launch()
time.sleep(.5)

wait_for(d, 'Bootstrap zipball location')
time.sleep(.5)
screenshot(d, 'initial')
d.ui(className='android.widget.EditText').set_text(BOOTSTRAP_URL)
time.sleep(.5)
if 'android:id/addToDictionaryButton' in d.ui.dump_hierarchy():
screenshot(d, 'add-to-dictionary-interferes')
d.ui.press('back')
time.sleep(.5)
screenshot(d, 'add-to-dictionary-back-pressed')
time.sleep(.5)
screenshot(d, 'entered-url')
for i in range(2):
if 'text="OK"' not in d.ui.dump_hierarchy():
Expand Down
7 changes: 1 addition & 6 deletions tests/emulator/bootstrap_flakes.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,13 @@ def run(d):
nod = d.app('com.termux.nix', url=APK)
nod.permissions.allow_notifications()
nod.launch()
time.sleep(.5)

wait_for(d, 'Bootstrap zipball location')
time.sleep(.5)
screenshot(d, 'initial')
d.ui(className='android.widget.EditText').set_text(BOOTSTRAP_URL)
time.sleep(.5)
if 'android:id/addToDictionaryButton' in d.ui.dump_hierarchy():
screenshot(d, 'add-to-dictionary-interferes')
d.ui.press('back')
time.sleep(.5)
screenshot(d, 'add-to-dictionary-back-pressed')
time.sleep(.5)
screenshot(d, 'entered-url')
for i in range(2):
if 'text="OK"' not in d.ui.dump_hierarchy():
Expand Down

0 comments on commit fdcdea8

Please sign in to comment.