tests: functional: Fix incorrect skipping of install tests

Fixes: #2529.

Tests:

- Run functional tests on bepasty. Without the patch, many tests are skipped.
With the patch, all tests are executed. Introducing a sleep delay in
Package.is_available() method also works.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
This commit is contained in:
Sunil Mohan Adapa 2025-08-18 21:10:08 -07:00 committed by Veiko Aasa
parent 4e1ee2371f
commit a0b2625c6a
No known key found for this signature in database
GPG Key ID: 478539CAE680674E

View File

@ -464,6 +464,10 @@ def install(browser, app_name):
browser.visit(browser.url)
elif browser.is_element_present_by_css('.alert-danger'):
break
elif (browser.is_element_present_by_css('.app-checking-availability')
and not browser.find_by_css(
'.app-checking-availability').has_class('d-none')):
time.sleep(0.1)
elif browser.is_element_present_by_css(install_button_css):
install_button = browser.find_by_css(install_button_css).first
if install_button['disabled']: