Skip to content

Commit

Permalink
fix test pos
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrey Kuznecov committed Jun 7, 2024
1 parent 87aa2be commit 35340ab
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 12 deletions.
1 change: 1 addition & 0 deletions test/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ window.Deck2gisLayer = Deck2gisLayer;
window.initDeck = initDeck;
window.Deck = Deck;
window.HexagonLayer = HexagonLayer;
window.Polyline = mapgl.Polyline;
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/screenshots/__screenshots__/plugin/add_hexagon-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
37 changes: 27 additions & 10 deletions test/screenshots/plugin.screen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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' });
});
Expand All @@ -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,
},
},
];
Expand Down
6 changes: 4 additions & 2 deletions test/test.d.ts
Original file line number Diff line number Diff line change
@@ -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;
Expand Down

0 comments on commit 35340ab

Please sign in to comment.