forked from Maps4HTML/MapML.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- fix bug in "Focus Controls" popup navigation button - closes Maps4HTML#828
- Loading branch information
prushfor
authored and
prushfor
committed
Feb 23, 2024
1 parent
7cb1984
commit dabd75c
Showing
4 changed files
with
79 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<title>Query Popup Navigation test</title> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<script type="module" src="mapml-viewer.js"></script> | ||
</head> | ||
|
||
<body> | ||
<mapml-viewer data-testid="viewer" style="width: 500px;height: 500px;" projection="CBMTILE" zoom="1" lat="46.17" lon="-88.9" controls> | ||
<layer- id="query" label="Fire" checked> | ||
<map-extent units="CBMTILE" checked hidden> | ||
<map-input name="z" type="zoom" value="18" min="0" max="18" ></map-input> | ||
<map-input name="txmin" type="location" units="tilematrix" position="top-left" axis="easting" ></map-input> | ||
<map-input name="tymin" type="location" units="tilematrix" position="bottom-left" axis="northing"></map-input> | ||
<map-input name="txmax" type="location" units="tilematrix" position="top-right" axis="easting"></map-input> | ||
<map-input name="tymax" type="location" units="tilematrix" position="top-left" axis="northing"></map-input> | ||
<map-input name="i" type="location" units="map" axis="i" ></map-input> | ||
<map-input name="j" type="location" units="map" axis="j" ></map-input> | ||
<map-input name="xmin" type="location" units="pcrs" position="top-left" axis="easting"></map-input> | ||
<map-input name="ymin" type="location" units="pcrs" position="bottom-left" axis="northing"></map-input> | ||
<map-input name="xmax" type="location" units="pcrs" position="top-right" axis="easting"></map-input> | ||
<map-input name="ymax" type="location" units="pcrs" position="top-left" axis="northing"></map-input> | ||
<map-input name="w" type="width" ></map-input> | ||
<map-input name="h" type="height" ></map-input> | ||
<map-link rel="query" tref="data/query-feature.mapml?service=WMS&version=1.3.0&request=GetFeatureInfo&i={i}&j={j}&query_layers=FBP_FuelLayer_wBurnScars&layers=FBP_FuelLayer_wBurnScars&info_format=text/html&bbox={xmin},{ymin},{xmax},{ymax}&width={w}&height={h}&CRS=EPSG:3857"></map-link> | ||
</map-extent> | ||
</layer-> | ||
|
||
</mapml-viewer> | ||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { test, expect, chromium } from '@playwright/test'; | ||
|
||
test.describe('Playwright Keyboard Navigation + Query Layer Tests', () => { | ||
let page; | ||
let context; | ||
test.beforeAll(async () => { | ||
context = await chromium.launchPersistentContext(''); | ||
page = | ||
context.pages().find((page) => page.url() === 'about:blank') || | ||
(await context.newPage()); | ||
await page.goto('focusControl.html'); | ||
await page.waitForTimeout(1000); | ||
}); | ||
|
||
test.afterAll(async function () { | ||
await context.close(); | ||
}); | ||
|
||
test('Focus Controls button after query focuses the zoom in control', async () => { | ||
await page.getByTestId('viewer').click(); | ||
await page.getByTitle('Focus Controls').click(); | ||
await expect(page.getByTitle('Zoom in')).toBeFocused(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<mapml- xmlns="http://www.w3.org/1999/xhtml"> | ||
<map-head> | ||
<map-title>A Feature, Returned by a Query</map-title> | ||
<map-meta name="projection" content="CBMTILE"></map-meta> | ||
</map-head> | ||
<map-body> | ||
<map-feature data-testid="pcrsgeometry" zoom="1"> | ||
<map-properties> | ||
<h1>Test</h1> | ||
</map-properties> | ||
<map-geometry cs="pcrs"> | ||
<map-polygon> | ||
<map-coordinates>-2826361 3009094 3788235 3009094 3788235 -3605502 -2826361 -3605502 -2826361 3009094</map-coordinates> | ||
</map-polygon> | ||
</map-geometry> | ||
</map-feature> | ||
</map-body> | ||
</mapml-> |