Open jywarren opened 6 years ago
@jywarren I can try breaking it to first timer issue
@jywarren Do you have any other UI tests in mind? I will create FTOs for the same
@jywarren We have basic UI tests, do you have any more in mind?
We might add one to try to simulate the steps described in https://github.com/publiclab/leaflet-blurred-location/issues/105 -- i.e. move to a location using a Leaflet panTo()
command, then use jQuery to uncheck the "blurred" checkbox, then use panTo()
again, and see if we can use the test to demonstrate that the displayed fields are not properly truncated. This would be a great test!
Will add a test for isBlurred as soon as the PR is merged
@jywarren Added a test #138
@jywarren adding test for newly added scale!!
I also just turned on test coverage reporting in CodeClimate!
This has been marked as a good candidate for becoming a first-timers-only issue like these, meaning that it's simple, self-contained, and with some extra formatting, could be a great entry point for a new contributor. If you're familiar enough with this code, please consider reformatting or reposting it as a first-timers-only issue, and then ping @publiclab/reviewers to get it labelled. Or, if this is not your first time, try to solve it yourself!
We're occasionally seeing features get broken by later additions, especially UI features which are harder to test. But we do have UI tests in Jasmine:
https://github.com/publiclab/leaflet-blurred-location/blob/c7f4ebb72657ba456150dd965633ba5d1824c4c3/spec/javascripts/ui_spec.js#L4-L14
Let's add some more -- checking that, for example, different fields update correctly when the map is panned. Let's look at the events that trigger behaviors in our interface code:
https://github.com/publiclab/leaflet-blurred-location/blob/c7f4ebb72657ba456150dd965633ba5d1824c4c3/src/ui/Interface.js#L38
And add some UI tests to ensure these actually happen -- that way our code will be less brittle when new changes are added!
Any help with this much appreciated!