Skip to content

Commit

Permalink
Tiles 6597 empty styles (#37)
Browse files Browse the repository at this point in the history
* empty style

* --openssl-legacy-provider and update command

* removed --openssl-legacy-provider
  • Loading branch information
kityan authored Jul 26, 2024
1 parent 35340ab commit 70ffb67
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 6 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"prettier:write": "prettier --write \"./**/*.{ts,tsx,js,json,html,css,md}\"",
"lint": "tslint -p tsconfig.json 'src/**/*.ts' 'demo/**/*.ts'",
"test:screenshots": "webpack --test && TEST_SUITE=screenshots jest --forceExit --projects test/screenshots --colors",
"test:screenshots:update": "webpack --test && TEST_SUITE=screenshots jest --forceExit --projects test/screenshots --colors -u",
"test:screenshots:watch": "webpack --test && TEST_SUITE=screenshots jest --forceExit --watchAll --projects test/screenshots --colors",
"test:screenshots:no-headless": "webpack --test && NO_HEADLESS=true TEST_SUITE=screenshots jest --forceExit --projects test/screenshots --colors"
},
Expand Down
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 70ffb67

Please sign in to comment.