Closed lin-d-hop closed 4 months ago
@lin-d-hop tested this locally and added a test group to staging to test current published development version and all works perfectly now. Solved in #313, video included below.
https://www.awesomescreenshot.com/video/26994377?key=5b67e0e7f0ebd3dd028b0ec788eab0e0
Tested with lines, markers, polys, adding drawn elements and also data layer elements.
Everything appears to copy across as expected now. Hooary!
Seems like it would be good to have unit tests added to this....
@ms0ur1s I think that this was a combination of issues:
Something wasn't working with the API request which made it hang, but now seems to be working. It's hard to know what this was, now that it's working, so would be difficult to write a UT for it. Unless we tried writing a bunch of UTs around the 'copy to datagroup' feature to catch things that might break in the future. It would be quite speculative so don't think it would rank highly in the benefit:cost ratio. There are more immediately beneficial things than trying to write lots of speculative UTs, such as BE crash analytics and better logging.
There is a front-end bug which is still there but not noticeable if the copy happens quickly. The popup still shows undefined
for a split second, because this line of code in DrawingPopup doesn't include all of the required component's parameters, such as type
.
{mode === MODE.SAVING && <PopupStatus mode={MODE.SAVING} />}
I've fixed this here https://github.com/DigitalCommons/land-explorer-front-end/commit/4af9566ab0755118e3514ce863f44fef90127853 and cherry picked it to master so it's included in the release.
UTs wouldn't be catch bugs like this on the FE. The automated tests that would catch bugs like this would be a visual regression tests using something like https://garris.github.io/BackstopJS/ I'm not sure how reliable these tests are but I think we should give it a go for a user flow such as this, to see how well it works.
Describe the bug We added the feature to add a marker/poly/line to a data layer.
On attempting to use this feature I just get an endless load.
To Reproduce Steps to reproduce the behavior:
This marker has a name, so I'm wondering if the fact it is 'undefined' is relevant here. Same happens for lines/polys, named and unnamed.
Expected behaviour The marker/line/poly should be added to the appropratei data layer, and thus I can view it from any account with access to that data layer.
Context (please complete the following information):