deluge: tests: functional: Fix deluge client logged in detection

Tests:
 - All deluge functional tests pass and monitored that there are no
 unreasonable delays in deluge web client while tests are running.

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
This commit is contained in:
Veiko Aasa 2025-01-07 11:14:27 +02:00 committed by Joseph Nuthalapati
parent 78cba1e217
commit fbd6adeac1
No known key found for this signature in database
GPG Key ID: 5398F00A2FA43C35

View File

@ -83,7 +83,6 @@ def _ensure_logged_in(browser):
def logged_in():
active_window_title = _get_active_window_title(browser)
# Change Default Password window appears once.
if active_window_title == 'Change Default Password':
_click_active_window_button(browser, 'No')
@ -92,7 +91,8 @@ def _ensure_logged_in(browser):
browser.find_by_id('_password').first.fill('deluge')
_click_active_window_button(browser, 'Login')
return browser.is_element_not_present_by_css('#add .x-item-disabled')
return browser.is_element_present_by_css(
'.x-deluge-statusbar.x-connected')
functional.eventually(logged_in)