-
-
Notifications
You must be signed in to change notification settings - Fork 257
[fix] Fixed unsaved changes alert for readonly map #560 #1014
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[fix] Fixed unsaved changes alert for readonly map #560 #1014
Conversation
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 openwisp#560 Signed-off-by: DragnEmperor <[email protected]>
8dc4e3d to
9961e59
Compare
devkapilbansal
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @DragnEmperor can we have a test for this to ensure this feature might not break in future?
nemesifier
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pandafy did we already have an unsaved changes alert test somewhere or not yet?
@nemesifier I checked the tests and we do have test case for unsaved changes alert. But for readonly user the field names are a bit different which lead to the alert being triggered. |
@nemesifier are you referencing to this test? openwisp-controller/openwisp_controller/config/tests/test_selenium.py Lines 301 to 354 in 1745a0a
|
@pandafy yes thanks! @DragnEmperor can you add a similar test in the geo app which replicates the bug (test should fail) when the fix is missing please? |
Sure! |
Added a selenium test case for readonly user to check if unsaved changes alert is triggered on device admin page. Signed-off-by: DragnEmperor <[email protected]>
Checklist
Reference to Existing Issue
Closes #560.
Description of Changes
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.