diff --git a/test/index.ts b/test/index.ts index 381df5c..b20bd03 100644 --- a/test/index.ts +++ b/test/index.ts @@ -6,3 +6,4 @@ window.Deck2gisLayer = Deck2gisLayer; window.initDeck = initDeck; window.Deck = Deck; window.HexagonLayer = HexagonLayer; +window.Polyline = mapgl.Polyline; diff --git a/test/screenshots/__screenshots__/plugin/add_and_delete_hexagon-snap.png b/test/screenshots/__screenshots__/plugin/add_and_delete_hexagon-snap.png index a3a11e8..4fbf049 100644 Binary files a/test/screenshots/__screenshots__/plugin/add_and_delete_hexagon-snap.png and b/test/screenshots/__screenshots__/plugin/add_and_delete_hexagon-snap.png differ diff --git a/test/screenshots/__screenshots__/plugin/add_hexagon-snap.png b/test/screenshots/__screenshots__/plugin/add_hexagon-snap.png index dddbbce..c0d3dc4 100644 Binary files a/test/screenshots/__screenshots__/plugin/add_hexagon-snap.png and b/test/screenshots/__screenshots__/plugin/add_hexagon-snap.png differ diff --git a/test/screenshots/__screenshots__/plugin/resize_viewport-snap.png b/test/screenshots/__screenshots__/plugin/resize_viewport-snap.png index 7f51ca8..92b3066 100644 Binary files a/test/screenshots/__screenshots__/plugin/resize_viewport-snap.png and b/test/screenshots/__screenshots__/plugin/resize_viewport-snap.png differ diff --git a/test/screenshots/plugin.screen.ts b/test/screenshots/plugin.screen.ts index f5f41aa..7877332 100644 --- a/test/screenshots/plugin.screen.ts +++ b/test/screenshots/plugin.screen.ts @@ -24,10 +24,15 @@ describe('Base tests', () => { copyright: false, zoomControl: false, key: API_KEY, - zoom: 12.5, - center: [55.296872, 25.261885], + zoom: 12.2, + center: [59.296872, 24.261885], }); await waitForMapReady(page); + await page.evaluate(() => { + window.polyline = new window.Polyline(window.map, { + coordinates: [[59, 24], [59.296872, 24.261885]], + }); + }) await page.evaluate(() => { window.deckgl = window.initDeck(window.map, window.Deck, { antialiasing: 'msaa' }); }); @@ -41,26 +46,38 @@ describe('Base tests', () => { const data = [ { point: { - lon: 55.296872, - lat: 25.261885, + lon: 59.296872, + lat: 24.261885, + }, + }, + { + point: { + lon: 59.296644, + lat: 24.262364, + }, + }, + { + point: { + lon: 59.299031, + lat: 24.254415, }, }, { point: { - lon: 55.296644, - lat: 25.262364, + lon: 59.299031, + lat: 24.254415, }, }, { point: { - lon: 55.299031, - lat: 25.254415, + lon: 59.299030, + lat: 24.254414, }, }, { point: { - lon: 55.299031, - lat: 25.254415, + lon: 59.299030, + lat: 24.254413, }, }, ]; diff --git a/test/test.d.ts b/test/test.d.ts index ca9ac06..1f10cee 100644 --- a/test/test.d.ts +++ b/test/test.d.ts @@ -1,13 +1,15 @@ -import type { Map } from '@2gis/mapgl/types'; +import type { Map, Polyline } from '@2gis/mapgl/types'; import { Deck2gisLayer, initDeck } from '../src'; declare global { interface Window { + Deck2gisLayer: typeof Deck2gisLayer; + Polyline: typeof Polyline; map: Map; deck2gisLayer: Deck2gisLayer; - Deck2gisLayer: typeof Deck2gisLayer; initDeck: initDeck; deckgl: any; + polyline: mapgl.Polyline; sdk: any; Deck: any; HexagonLayer: any;