functional-tests: Fail fast on install failure

Tested against ejabberd's failing installation. The entire test suite
gets marked as failed if the application installation fails.

Fixes #1902 #1895

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
This commit is contained in:
Joseph Nuthalapati 2020-07-08 05:54:58 +05:30 committed by Veiko Aasa
parent c544160a94
commit 01a757c38a
No known key found for this signature in database
GPG Key ID: 478539CAE680674E

View File

@ -297,6 +297,8 @@ def install(browser, app_name):
time.sleep(0.1)
elif browser.is_element_present_by_css('.neterror'):
browser.visit(browser.url)
elif browser.is_element_present_by_css('.alert-danger'):
break
elif browser.is_element_present_by_css(install_button_css):
install_button = browser.find_by_css(install_button_css).first
if install_button['disabled']: