From 861796d21b7a7fa44ec92c5506a8b2f2c2098441 Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Mon, 6 Jan 2025 13:54:44 -0800 Subject: [PATCH] nextcloud: tests: functional: Fix test for modified structure of UI - The DOM structure of the nextcloud UI seems to have changed. Tests: - In functional tests, with the updated code, test_create_folder test passes. Signed-off-by: Sunil Mohan Adapa Reviewed-by: James Valleroy --- plinth/modules/nextcloud/tests/test_functional.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plinth/modules/nextcloud/tests/test_functional.py b/plinth/modules/nextcloud/tests/test_functional.py index 6c8833162..6bce73eb2 100644 --- a/plinth/modules/nextcloud/tests/test_functional.py +++ b/plinth/modules/nextcloud/tests/test_functional.py @@ -112,7 +112,8 @@ def _class(klass): def _create_folder(browser, folder_name): """Create a folder in the Nextcloud files app.""" # Click on the '+ New' button in the header - xpath = f'//div[{_class("action-item")} and @menu-title="New"]//button' + xpath = f'//div[{_class("action-item")}]' \ + '//button[.//*[contains(text(),"New")]]' browser.find_by_xpath(xpath).first.click() # Click on the 'New folder' pop down menu item