File tree 5 files changed +9
-20
lines changed
5 files changed +9
-20
lines changed Original file line number Diff line number Diff line change @@ -200,8 +200,7 @@ export class MapViewer extends HTMLElement {
200
200
projection : this . projection ,
201
201
query : true ,
202
202
contextMenu : true ,
203
- //Will replace with M.options.announceMoves
204
- announceMovement : true ,
203
+ announceMovement : M . options . announceMovement ,
205
204
mapEl : this ,
206
205
crs : M [ this . projection ] ,
207
206
zoom : this . zoom ,
Original file line number Diff line number Diff line change @@ -214,8 +214,7 @@ export class WebMap extends HTMLMapElement {
214
214
projection : this . projection ,
215
215
query : true ,
216
216
contextMenu : true ,
217
- //Will replace with M.options.announceMoves
218
- announceMovement : true ,
217
+ announceMovement : M . options . announceMovement ,
219
218
mapEl : this ,
220
219
crs : M [ this . projection ] ,
221
220
zoom : this . zoom ,
Original file line number Diff line number Diff line change 1
- const playwright = require ( "playwright" ) ;
1
+ const playwright = require ( "playwright" ) ;
2
2
jest . setTimeout ( 50000 ) ;
3
3
( async ( ) => {
4
4
for ( const browserType of BROWSER ) {
@@ -22,13 +22,6 @@ jest.setTimeout(50000);
22
22
} ) ;
23
23
24
24
test ( "[" + browserType + "]" + " Output values are correct during regular movement" , async ( ) => {
25
- const announceMovement = await page . $eval (
26
- "body > mapml-viewer" ,
27
- ( map ) => map . _map . announceMovement . _enabled
28
- ) ;
29
- if ( ! announceMovement ) {
30
- return ;
31
- }
32
25
await page . keyboard . press ( "Tab" ) ;
33
26
await page . keyboard . press ( "ArrowUp" ) ;
34
27
await page . waitForTimeout ( 100 ) ;
@@ -61,13 +54,6 @@ jest.setTimeout(50000);
61
54
} ) ;
62
55
63
56
test ( "[" + browserType + "]" + " Output values are correct at bounds and bounces back" , async ( ) => {
64
- const announceMovement = await page . $eval (
65
- "body > mapml-viewer" ,
66
- ( map ) => map . _map . announceMovement . _enabled
67
- ) ;
68
- if ( ! announceMovement ) {
69
- return ;
70
- }
71
57
//Zoom out to min layer bound
72
58
await page . keyboard . press ( "Minus" ) ;
73
59
await page . waitForTimeout ( 100 ) ;
Original file line number Diff line number Diff line change @@ -169,7 +169,7 @@ jest.setTimeout(50000);
169
169
"xpath=//html/body/mapml-viewer >> css=div > div.leaflet-pane.leaflet-map-pane > div.leaflet-pane.leaflet-overlay-pane > svg > g" ,
170
170
( tile ) => tile . childElementCount
171
171
) ;
172
- expect ( feature ) . toEqual ( 4 ) ;
172
+ expect ( feature ) . toEqual ( 3 ) ;
173
173
} ) ;
174
174
175
175
test ( "[" + browserType + "]" + " Layer deselected then reselected" , async ( ) => {
Original file line number Diff line number Diff line change 4
4
< head >
5
5
< title > Basic Mapml-Viewer</ title >
6
6
< meta charset ="UTF-8 ">
7
+ < script >
8
+ let options = document . createElement ( "map-options" ) ;
9
+ options . innerHTML = '{"announceMovement":true}' ;
10
+ document . head . appendChild ( options ) ;
11
+ </ script >
7
12
< script type ="module " src ="mapml-viewer.js "> </ script >
8
13
< style >
9
14
html {
You can’t perform that action at this time.
0 commit comments