From 3807ee4c54e7233958c0b5572c260072a97b028d Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Wed, 6 Nov 2024 11:12:15 -0800 Subject: [PATCH] tests: functional: Wait for uninstall page load before uninstalling - Many functional test failures in the Gitlab CI pipeline show that uninstall form was attempted to submitted while still in the app page. After clicking on the uninstall menu item, we are not waiting for the page to load fully. Fix this by waiting for page load. This change is expected to fix most of the functional tests failures in the pipeline. Tests: - Ran bepasty functional tests. Signed-off-by: Sunil Mohan Adapa 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 b1060575f..40f7f7cff 100644 --- a/plinth/tests/functional/__init__.py +++ b/plinth/tests/functional/__init__.py @@ -424,7 +424,9 @@ def uninstall(browser, app_name): if not uninstall_item: pytest.skip('App cannot be uninstalled') + uninstall_page_url = uninstall_item[0]['href'] uninstall_item[0].click() + wait_for_page_update(browser, expected_url=uninstall_page_url) submit(browser, form_class='form-uninstall') while True: