From ca38a914414397f72a071a3b56bf056caf39b518 Mon Sep 17 00:00:00 2001 From: Gagan Deep Date: Fri, 31 Jan 2025 18:29:25 +0530 Subject: [PATCH] [tests] Fixed "test_restoring_deleted_device" test The test was failing due to changes in openwisp-controller. (cherry picked from commit 9bc3d6634a8bd67f20d6d97e2fd7c8ef6175558c) --- openwisp_monitoring/tests/test_selenium.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openwisp_monitoring/tests/test_selenium.py b/openwisp_monitoring/tests/test_selenium.py index df4dcc81..be526537 100644 --- a/openwisp_monitoring/tests/test_selenium.py +++ b/openwisp_monitoring/tests/test_selenium.py @@ -145,7 +145,7 @@ def test_restoring_deleted_device(self): reverse(f'admin:{self.config_app_label}_device_delete', args=[device.id]) ) self.web_driver.find_element( - By.XPATH, '//*[@id="content"]/form/div/input[2]' + by=By.CSS_SELECTOR, value='#content form input[type="submit"]' ).click() self.assertEqual(Device.objects.count(), 0) self.assertEqual(DeviceConnection.objects.count(), 0)