Skip to content

Commit

Permalink
Remove test "don't opens the tooltip marker moseover while dragging m…
Browse files Browse the repository at this point in the history
…ap," which was added multiple times.
  • Loading branch information
theGOTOguy committed Dec 23, 2022
1 parent 690f639 commit f5a57c1
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions spec/suites/layer/TooltipSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -501,25 +501,6 @@ describe('Tooltip', () => {
expect(tooltip.isOpen()).to.be.ok();
});

it('don\'t opens the tooltip on marker mouseover while dragging map', () => {
// Sometimes the mouse is moving faster then the map while dragging and then the marker can be hover and
// the tooltip opened / closed.
const layer = L.marker(center).addTo(map).bindTooltip('Tooltip');
const tooltip = layer.getTooltip();

// simulate map dragging
map.dragging.moving = () => true;

happen.at('mouseover', 210, 195);
expect(tooltip.isOpen()).to.be(false);

// simulate map not dragging anymore
map.dragging.moving = () => false;

happen.at('mouseover', 210, 195);
expect(tooltip.isOpen()).to.be.ok();
});

it('opens tooltip with passed latlng position while initializing', () => {
const tooltip = new L.Tooltip(center)
.addTo(map);
Expand Down

0 comments on commit f5a57c1

Please sign in to comment.