Skip to content

Commit

Permalink
empty style
Browse files Browse the repository at this point in the history
  • Loading branch information
kityan committed Jul 26, 2024
1 parent 35340ab commit 48b4256
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 6 deletions.
10 changes: 10 additions & 0 deletions test/puppeteer/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,13 @@ export async function makeSnapshot(
export async function waitForMapReady(page: PuppeteerPage) {
await page.waitForFunction(() => window.map.isIdle());
}

export const emptyStyle = {
version: 1,
name: '',
background: {
color: '#f5f2e0',
},
layers: [],
icons: {},
};
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.
17 changes: 11 additions & 6 deletions test/screenshots/plugin.screen.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { pageSetUp, Page } from '../puppeteer';
import { API_KEY, DEFAULT_STYLE } from '../puppeteer/config';
import { API_KEY } from '../puppeteer/config';
import {
makeScreenshotsPath,
makeSnapshot,
initMapWithOptions,
defaultFontsPath,
waitForMapReady,
emptyStyle,
} from '../puppeteer/utils';
import { HexagonLayer } from '@deck.gl/aggregation-layers/typed';
import * as puppeteer from 'puppeteer';
Expand All @@ -16,7 +17,8 @@ describe('Base tests', () => {
beforeEach(async () => {
page = await pageSetUp();
await initMapWithOptions(page, {
style: DEFAULT_STYLE,
//@ts-ignore
style: emptyStyle,
styleOptions: {
fontsPath: defaultFontsPath,
},
Expand All @@ -30,9 +32,12 @@ describe('Base tests', () => {
await waitForMapReady(page);
await page.evaluate(() => {
window.polyline = new window.Polyline(window.map, {
coordinates: [[59, 24], [59.296872, 24.261885]],
coordinates: [
[59, 24],
[59.296872, 24.261885],
],
});
})
});
await page.evaluate(() => {
window.deckgl = window.initDeck(window.map, window.Deck, { antialiasing: 'msaa' });
});
Expand Down Expand Up @@ -70,13 +75,13 @@ describe('Base tests', () => {
},
{
point: {
lon: 59.299030,
lon: 59.29903,
lat: 24.254414,
},
},
{
point: {
lon: 59.299030,
lon: 59.29903,
lat: 24.254413,
},
},
Expand Down

0 comments on commit 48b4256

Please sign in to comment.