Skip to content

Commit 70ffb67

Browse files
authored
Tiles 6597 empty styles (#37)
* empty style * --openssl-legacy-provider and update command * removed --openssl-legacy-provider
1 parent 35340ab commit 70ffb67

File tree

6 files changed

+22
-6
lines changed

6 files changed

+22
-6
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"prettier:write": "prettier --write \"./**/*.{ts,tsx,js,json,html,css,md}\"",
1818
"lint": "tslint -p tsconfig.json 'src/**/*.ts' 'demo/**/*.ts'",
1919
"test:screenshots": "webpack --test && TEST_SUITE=screenshots jest --forceExit --projects test/screenshots --colors",
20+
"test:screenshots:update": "webpack --test && TEST_SUITE=screenshots jest --forceExit --projects test/screenshots --colors -u",
2021
"test:screenshots:watch": "webpack --test && TEST_SUITE=screenshots jest --forceExit --watchAll --projects test/screenshots --colors",
2122
"test:screenshots:no-headless": "webpack --test && NO_HEADLESS=true TEST_SUITE=screenshots jest --forceExit --projects test/screenshots --colors"
2223
},

test/puppeteer/utils.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,3 +92,13 @@ export async function makeSnapshot(
9292
export async function waitForMapReady(page: PuppeteerPage) {
9393
await page.waitForFunction(() => window.map.isIdle());
9494
}
95+
96+
export const emptyStyle = {
97+
version: 1,
98+
name: '',
99+
background: {
100+
color: '#f5f2e0',
101+
},
102+
layers: [],
103+
icons: {},
104+
};
Loading
Loading
Loading

test/screenshots/plugin.screen.ts

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
import { pageSetUp, Page } from '../puppeteer';
2-
import { API_KEY, DEFAULT_STYLE } from '../puppeteer/config';
2+
import { API_KEY } from '../puppeteer/config';
33
import {
44
makeScreenshotsPath,
55
makeSnapshot,
66
initMapWithOptions,
77
defaultFontsPath,
88
waitForMapReady,
9+
emptyStyle,
910
} from '../puppeteer/utils';
1011
import { HexagonLayer } from '@deck.gl/aggregation-layers/typed';
1112
import * as puppeteer from 'puppeteer';
@@ -16,7 +17,8 @@ describe('Base tests', () => {
1617
beforeEach(async () => {
1718
page = await pageSetUp();
1819
await initMapWithOptions(page, {
19-
style: DEFAULT_STYLE,
20+
//@ts-ignore
21+
style: emptyStyle,
2022
styleOptions: {
2123
fontsPath: defaultFontsPath,
2224
},
@@ -30,9 +32,12 @@ describe('Base tests', () => {
3032
await waitForMapReady(page);
3133
await page.evaluate(() => {
3234
window.polyline = new window.Polyline(window.map, {
33-
coordinates: [[59, 24], [59.296872, 24.261885]],
35+
coordinates: [
36+
[59, 24],
37+
[59.296872, 24.261885],
38+
],
3439
});
35-
})
40+
});
3641
await page.evaluate(() => {
3742
window.deckgl = window.initDeck(window.map, window.Deck, { antialiasing: 'msaa' });
3843
});
@@ -70,13 +75,13 @@ describe('Base tests', () => {
7075
},
7176
{
7277
point: {
73-
lon: 59.299030,
78+
lon: 59.29903,
7479
lat: 24.254414,
7580
},
7681
},
7782
{
7883
point: {
79-
lon: 59.299030,
84+
lon: 59.29903,
8085
lat: 24.254413,
8186
},
8287
},

0 commit comments

Comments
 (0)