BGDIINF_SB-2668: Fixed empty drawing being saved and displayed in menu#325
Merged
BGDIINF_SB-2668: Fixed empty drawing being saved and displayed in menu#325
Conversation
61032fa to
8a0fa57
Compare
ae119d6 to
80f9493
Compare
jedef
reviewed
Dec 20, 2022
| } | ||
| return null | ||
| }, | ||
| isNewDrawing() { |
Contributor
There was a problem hiding this comment.
Shouldn't it be !this.kmlIds instead of !!this.kmlIds ? Fixing that should probably fix the problem you had with your cypress test, no?
Contributor
Author
There was a problem hiding this comment.
Good catch I changed it
Contributor
Author
There was a problem hiding this comment.
However this is not the issue of my test failing. The test is failing because the this.kmlIds is missing the adminId and create a new drawing instead of updating the existing. When doing the test manually it works. The issue is probably a timing issue with the kmlIds being on a store and updated in several places in the code. I simplified this logic in #326
Make sure that new empty drawing are not saved but that existing modified are saved even if empty.
When closing the drawing menu without creating any drawing an empty kml was created and added to the menu in the map displayed. The saveKml event was called two many times, now it is only called when the drawing effectively changes. I also renamed some function names to be more explicit.
This test when done manually works but failed on CY probably due to a bug in the complex kmlIds management. This should be fixed by BGDIINF_SB-2729.
2229f73 to
2a8ced7
Compare
pakb
approved these changes
Dec 21, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When closing the drawing menu without creating any drawing an empty kml was
created and added to the menu in the map displayed.
TODO:
Test link