Skip to content
Snippets Groups Projects

fix(vector-map): set zoom timeout for correct refresh of styles

Merged Miłosz Grocholewski requested to merge fix/MIN-109-zooming-on-macos into development
Files
11
@@ -51,7 +51,11 @@ describe('onMapLeftClick', () => {
it('dispatches updateLastClick and resets data if no feature at pixel', async () => {
const dispatch = jest.fn();
jest.spyOn(mapInstance, 'forEachFeatureAtPixel').mockImplementation((_, callback) => {
callback(new Feature({}), null as unknown as Layer, null as unknown as SimpleGeometry);
callback(
new Feature({ zIndex: 1 }),
null as unknown as Layer,
null as unknown as SimpleGeometry,
);
});
await onMapLeftClick(
mapSize,
@@ -74,7 +78,7 @@ describe('onMapLeftClick', () => {
const dispatch = jest.fn(() => ({
unwrap: jest.fn().mockResolvedValue(mockBioEntities),
}));
const feature = new Feature({ id: 1, type: FEATURE_TYPE.ALIAS });
const feature = new Feature({ id: 1, type: FEATURE_TYPE.ALIAS, zIndex: 1 });
jest.spyOn(mapInstance, 'forEachFeatureAtPixel').mockImplementation((_, callback) => {
callback(feature, null as unknown as Layer, null as unknown as SimpleGeometry);
});
@@ -98,7 +102,7 @@ describe('onMapLeftClick', () => {
const dispatch = jest.fn(() => ({
unwrap: jest.fn().mockResolvedValue(mockBioEntities),
}));
const feature = new Feature({ id: 1, type: FEATURE_TYPE.REACTION });
const feature = new Feature({ id: 1, type: FEATURE_TYPE.REACTION, zIndex: 1 });
jest.spyOn(mapInstance, 'forEachFeatureAtPixel').mockImplementation((_, callback) => {
callback(feature, null as unknown as Layer, null as unknown as SimpleGeometry);
});
Loading