Skip to content

Commit 8dc4e3d

Browse files
committed
[chores] Fixed unsaved changes alert for readonly map #560
For readonly mode the field name used to track geometry field is different leading to its json value not being parsed, hence leading to unsaved_changes alert. A small change of addition of the said field in 'jsonValues' of 'unsaved_changes.js' Fixed it. Also increased the timeout for waiting of success message present for selenium test of device admin to tackle TimeoutException. Closes #560 Signed-off-by: DragnEmperor <[email protected]>
1 parent 1745a0a commit 8dc4e3d

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

openwisp_controller/config/static/config/js/unsaved_changes.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"config-0-config",
1212
"config-0-context",
1313
"devicelocation-0-geometry",
14+
"geometry",
1415
];
1516
// ignore fields that have no name attribute, begin with "_" or "initial-"
1617
if (

openwisp_controller/geo/tests/test_selenium.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ class TestDeviceAdminSelenium(
2727
def _get_prefix(cls):
2828
return cls.inline_field_prefix
2929

30+
# set timeout to 5 seconds to allow enough time for presence of elements
31+
def wait_for_presence(self, by, value, timeout=5, driver=None):
32+
return super().wait_for_presence(by, value, timeout, driver)
33+
3034
def _fill_device_form(self):
3135
org = self._get_org()
3236
self.find_element(by=By.NAME, value='mac_address').send_keys(

0 commit comments

Comments
 (0)