Skip to content

Commit fb449de

Browse files
author
Peter Rushforth
committed
Formatting by prettier
1 parent 354cf6f commit fb449de

File tree

6 files changed

+29
-17
lines changed

6 files changed

+29
-17
lines changed

src/map-tile.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export class HTMLTileElement extends HTMLElement {
3232
}
3333
get col() {
3434
/* jshint ignore:start */
35-
return this.#hasConnected ? +this.#initialCol : +this.getAttribute('col');;
35+
return this.#hasConnected ? +this.#initialCol : +this.getAttribute('col');
3636
/* jshint ignore:end */
3737
}
3838
set col(val) {
@@ -46,7 +46,7 @@ export class HTMLTileElement extends HTMLElement {
4646
}
4747
get zoom() {
4848
/* jshint ignore:start */
49-
return this.#hasConnected ? +this.#initialZoom : +this.getAttribute('zoom');;
49+
return this.#hasConnected ? +this.#initialZoom : +this.getAttribute('zoom');
5050
/* jshint ignore:end */
5151
}
5252
set zoom(val) {

test/e2e/core/mismatchedLayerWithMap.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ test.describe('Playwright Mismatched Layers Test', () => {
3131
<map is="web-map" style="width:500px;height:500px" projection="CBMTILE" zoom="2" lat="45" lon="-90" controls >
3232
<map-layer label='CBMT' src='cbmtile-cbmt.mapml' checked></map-layer>
3333
<map-layer id="checkMe" label="OpenStreetMap" src="osm.mapml" checked></map-layer>
34-
</map>
34+
</map>
3535
</body>
3636
</html>
3737
`);

test/e2e/elements/map-layer/map-layer-media.test.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@ enabled and added to the layer control when mq removed`, async () => {
8686
const noInitialQueryLayer = page.getByTestId('no-initial-mq');
8787
await noInitialQueryLayer.evaluate((l) => l.setAttribute('media', '(foo '));
8888
// Wait for the invalid media query to trigger the disabled attribute
89-
await expect(noInitialQueryLayer).toHaveAttribute('disabled', '', { timeout: 2000 });
89+
await expect(noInitialQueryLayer).toHaveAttribute('disabled', '', {
90+
timeout: 2000
91+
});
9092
});
9193
});

test/e2e/elements/map/map-in-shadow-root.test.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ test.describe('Playwright map[is=web-map] fullscreen tests', () => {
3030
expect(fullscreenElement).toEqual('map1');
3131
await fullscreenButton.click();
3232
// Wait for fullscreen to exit properly
33-
await page.waitForFunction(() => !document.fullscreenElement, { timeout: 2000 });
33+
await page.waitForFunction(() => !document.fullscreenElement, {
34+
timeout: 2000
35+
});
3436
fullscreenElement = await page.evaluate(`document.fullscreenElement`);
3537
expect(fullscreenElement).toBeFalsy();
3638

test/e2e/layers/featureLayer.test.js

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,20 @@ test.describe('Playwright featureLayer (Static Features) Layer Tests', () => {
4646
test('Loading in retrieved features', async () => {
4747
await page.waitForTimeout(350);
4848
// Wait for the layer to be ready and SVG to be created
49-
await page.waitForFunction(() => {
50-
const layer = document.querySelector('map-layer#US');
51-
return layer &&
52-
layer._layer &&
53-
layer._layer._container &&
54-
layer._layer._container.querySelector('svg') &&
55-
layer._layer._container.querySelector('svg').firstChild;
56-
}, { timeout: 5000 });
57-
49+
await page.waitForFunction(
50+
() => {
51+
const layer = document.querySelector('map-layer#US');
52+
return (
53+
layer &&
54+
layer._layer &&
55+
layer._layer._container &&
56+
layer._layer._container.querySelector('svg') &&
57+
layer._layer._container.querySelector('svg').firstChild
58+
);
59+
},
60+
{ timeout: 5000 }
61+
);
62+
5863
const features = await page.$eval(
5964
'map-layer#US',
6065
(layer) =>

test/e2e/layers/mixedLayer-zindex-rendering.test.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,9 +164,12 @@ test.describe('Mixed Layer Z-Index Rendering Tests', () => {
164164

165165
await page.waitForTimeout(500);
166166
const viewer = page.getByTestId('viewer');
167-
await expect(viewer).toHaveScreenshot('mixedLayer-hierarchy-validation.png', {
168-
maxDiffPixels: 50
169-
});
167+
await expect(viewer).toHaveScreenshot(
168+
'mixedLayer-hierarchy-validation.png',
169+
{
170+
maxDiffPixels: 50
171+
}
172+
);
170173
});
171174

172175
test.afterAll(async () => {

0 commit comments

Comments
 (0)