From 01a757c38ab5434df3e20b31fa178351bf5e3544 Mon Sep 17 00:00:00 2001 From: Joseph Nuthalapati Date: Wed, 8 Jul 2020 05:54:58 +0530 Subject: [PATCH] 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 Reviewed-by: Veiko Aasa --- plinth/tests/functional/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plinth/tests/functional/__init__.py b/plinth/tests/functional/__init__.py index c0ecaa4ea..2886b418c 100644 --- a/plinth/tests/functional/__init__.py +++ b/plinth/tests/functional/__init__.py @@ -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']: