From fdcdea8a45569b773f02f585672c286d4354f8f3 Mon Sep 17 00:00:00 2001 From: Alexander Sosedkin Date: Mon, 8 Jul 2024 00:32:55 +0200 Subject: [PATCH] WIP: tests/emulator: avoid "ADD TO DICTIONARY" by sleeping --- tests/emulator/bootstrap_channels.py | 7 +------ tests/emulator/bootstrap_flakes.py | 7 +------ 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/tests/emulator/bootstrap_channels.py b/tests/emulator/bootstrap_channels.py index 2dd77a2..3c14756 100644 --- a/tests/emulator/bootstrap_channels.py +++ b/tests/emulator/bootstrap_channels.py @@ -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(): diff --git a/tests/emulator/bootstrap_flakes.py b/tests/emulator/bootstrap_flakes.py index ae944f4..226de7f 100644 --- a/tests/emulator/bootstrap_flakes.py +++ b/tests/emulator/bootstrap_flakes.py @@ -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():