WIP: tests/emulator: avoid "ADD TO DICTIONARY" by sleeping

This commit is contained in:
Alexander Sosedkin 2024-07-08 00:32:55 +02:00
parent bab7c453f4
commit fdcdea8a45
2 changed files with 2 additions and 12 deletions

View file

@ -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():

View file

@ -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():