mirror of
https://github.com/nix-community/nix-on-droid.git
synced 2025-11-08 19:46:07 +01:00
WIP: tests/emulator: avoid "ADD TO DICTIONARY" by sleeping
This commit is contained in:
parent
bab7c453f4
commit
fdcdea8a45
2 changed files with 2 additions and 12 deletions
|
|
@ -7,18 +7,13 @@ def run(d):
|
||||||
nod = d.app('com.termux.nix', url=APK)
|
nod = d.app('com.termux.nix', url=APK)
|
||||||
nod.permissions.allow_notifications()
|
nod.permissions.allow_notifications()
|
||||||
nod.launch()
|
nod.launch()
|
||||||
|
time.sleep(.5)
|
||||||
|
|
||||||
wait_for(d, 'Bootstrap zipball location')
|
wait_for(d, 'Bootstrap zipball location')
|
||||||
time.sleep(.5)
|
time.sleep(.5)
|
||||||
screenshot(d, 'initial')
|
screenshot(d, 'initial')
|
||||||
d.ui(className='android.widget.EditText').set_text(BOOTSTRAP_URL)
|
d.ui(className='android.widget.EditText').set_text(BOOTSTRAP_URL)
|
||||||
time.sleep(.5)
|
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')
|
screenshot(d, 'entered-url')
|
||||||
for i in range(2):
|
for i in range(2):
|
||||||
if 'text="OK"' not in d.ui.dump_hierarchy():
|
if 'text="OK"' not in d.ui.dump_hierarchy():
|
||||||
|
|
|
||||||
|
|
@ -7,18 +7,13 @@ def run(d):
|
||||||
nod = d.app('com.termux.nix', url=APK)
|
nod = d.app('com.termux.nix', url=APK)
|
||||||
nod.permissions.allow_notifications()
|
nod.permissions.allow_notifications()
|
||||||
nod.launch()
|
nod.launch()
|
||||||
|
time.sleep(.5)
|
||||||
|
|
||||||
wait_for(d, 'Bootstrap zipball location')
|
wait_for(d, 'Bootstrap zipball location')
|
||||||
time.sleep(.5)
|
time.sleep(.5)
|
||||||
screenshot(d, 'initial')
|
screenshot(d, 'initial')
|
||||||
d.ui(className='android.widget.EditText').set_text(BOOTSTRAP_URL)
|
d.ui(className='android.widget.EditText').set_text(BOOTSTRAP_URL)
|
||||||
time.sleep(.5)
|
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')
|
screenshot(d, 'entered-url')
|
||||||
for i in range(2):
|
for i in range(2):
|
||||||
if 'text="OK"' not in d.ui.dump_hierarchy():
|
if 'text="OK"' not in d.ui.dump_hierarchy():
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue