Skip to content

BGDIINF_SB-2668: Fixed empty drawing being saved and displayed in menu#325

Merged
ltshb merged 4 commits intodevelopfrom
bug-BGDIINF_SB-2668-empty-drawing
Dec 21, 2022
Merged

BGDIINF_SB-2668: Fixed empty drawing being saved and displayed in menu#325
ltshb merged 4 commits intodevelopfrom
bug-BGDIINF_SB-2668-empty-drawing

Conversation

@ltshb
Copy link
Contributor

@ltshb ltshb commented Dec 14, 2022

When closing the drawing menu without creating any drawing an empty kml was
created and added to the menu in the map displayed.

TODO:

  • add e2e test for this use case

Test link

@ltshb ltshb requested a review from jedef December 14, 2022 09:37
@github-actions github-actions bot added the bug label Dec 14, 2022
@ltshb ltshb force-pushed the bug-BGDIINF_SB-2668-empty-drawing branch from 61032fa to 8a0fa57 Compare December 14, 2022 14:06
@ltshb ltshb requested a review from pakb December 14, 2022 14:49
@ltshb ltshb force-pushed the bug-BGDIINF_SB-2668-empty-drawing branch 3 times, most recently from ae119d6 to 80f9493 Compare December 15, 2022 13:13
}
return null
},
isNewDrawing() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't it be !this.kmlIds instead of !!this.kmlIds ? Fixing that should probably fix the problem you had with your cypress test, no?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch I changed it

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
@ltshb ltshb force-pushed the bug-BGDIINF_SB-2668-empty-drawing branch from 2229f73 to 2a8ced7 Compare December 21, 2022 08:38
@ltshb ltshb requested a review from jedef December 21, 2022 08:38
@ltshb ltshb merged commit 9899b39 into develop Dec 21, 2022
@ltshb ltshb deleted the bug-BGDIINF_SB-2668-empty-drawing branch December 21, 2022 10:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants