From 7b154aa4f85cdabaf7c84d7b1a1cd6fa85f66ecd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Mon, 10 Mar 2025 21:59:02 +0100 Subject: [PATCH] tests: update for Thunderbird version/config in Whonix 17 Only press 'Get Messages' button to trigger the password prompt. In Whonix, at this point the mail folders list is not available yet, so cannot click 'Inbox' before entering the password. --- tests/test_thunderbird.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/test_thunderbird.py b/tests/test_thunderbird.py index eb8d4ba..c8a5d6a 100644 --- a/tests/test_thunderbird.py +++ b/tests/test_thunderbird.py @@ -158,7 +158,7 @@ def enter_imap_passwd(tb): )) except tree.SearchError: # check new mail so client can realize IMAP requires entering a password - get_messages(tb) + get_messages(tb, button_only=True) # password entry pass_prompt = tb.app.findChild(orPredicate( GenericPredicate(name='Enter your password for user', roleName='frame'), @@ -268,7 +268,7 @@ def configure_openpgp_account(tb): 'click') -def get_messages(tb): +def get_messages(tb, button_only=False): try: # TB >= 115 try: @@ -277,6 +277,8 @@ def get_messages(tb): except tree.SearchError: # TB < 128 tb.app.button('Get Messages').doActionNamed('press') + if button_only: + return tb.app.child(name='Inbox.*', roleName='tree item').doActionNamed( 'activate') except tree.SearchError: @@ -285,6 +287,8 @@ def get_messages(tb): roleName='table row').doActionNamed('activate') tb.app.button('Get Messages').doActionNamed('press') tb.app.menuItem('Get All New Messages').doActionNamed('click') + if button_only: + return tb.app.child(name='Inbox.*', roleName='table row').doActionNamed( 'activate')