@@ -100,82 +100,105 @@ class RouteLineLayersTest : BaseTest<BasicNavigationViewActivity>(
100
100
)
101
101
102
102
assertEquals(
103
- " mapbox-layerGroup-1 -restricted" ,
103
+ " mapbox-masking-layer -restricted" ,
104
104
style.styleLayers[topLevelRouteLayerIndex - 1 ].id
105
105
)
106
106
assertEquals(
107
- " mapbox-layerGroup-1 -traffic" ,
107
+ " mapbox-masking-layer -traffic" ,
108
108
style.styleLayers[topLevelRouteLayerIndex - 2 ].id
109
109
)
110
110
assertEquals(
111
- " mapbox-layerGroup-1 -main" ,
111
+ " mapbox-masking-layer -main" ,
112
112
style.styleLayers[topLevelRouteLayerIndex - 3 ].id
113
113
)
114
114
assertEquals(
115
- " mapbox-layerGroup-1 -casing" ,
115
+ " mapbox-masking-layer -casing" ,
116
116
style.styleLayers[topLevelRouteLayerIndex - 4 ].id
117
117
)
118
118
assertEquals(
119
- " mapbox-layerGroup-1 -trail" ,
119
+ " mapbox-masking-layer -trail" ,
120
120
style.styleLayers[topLevelRouteLayerIndex - 5 ].id
121
121
)
122
122
assertEquals(
123
- " mapbox-layerGroup-1 -trailCasing" ,
123
+ " mapbox-masking-layer -trailCasing" ,
124
124
style.styleLayers[topLevelRouteLayerIndex - 6 ].id
125
125
)
126
-
127
126
assertEquals(
128
- " mapbox-layerGroup-2 -restricted" ,
127
+ " mapbox-layerGroup-1 -restricted" ,
129
128
style.styleLayers[topLevelRouteLayerIndex - 7 ].id
130
129
)
131
130
assertEquals(
132
- " mapbox-layerGroup-2 -traffic" ,
131
+ " mapbox-layerGroup-1 -traffic" ,
133
132
style.styleLayers[topLevelRouteLayerIndex - 8 ].id
134
133
)
135
134
assertEquals(
136
- " mapbox-layerGroup-2 -main" ,
135
+ " mapbox-layerGroup-1 -main" ,
137
136
style.styleLayers[topLevelRouteLayerIndex - 9 ].id
138
137
)
139
138
assertEquals(
140
- " mapbox-layerGroup-2 -casing" ,
139
+ " mapbox-layerGroup-1 -casing" ,
141
140
style.styleLayers[topLevelRouteLayerIndex - 10 ].id
142
141
)
143
142
assertEquals(
144
- " mapbox-layerGroup-2 -trail" ,
143
+ " mapbox-layerGroup-1 -trail" ,
145
144
style.styleLayers[topLevelRouteLayerIndex - 11 ].id
146
145
)
147
146
assertEquals(
148
- " mapbox-layerGroup-2 -trailCasing" ,
147
+ " mapbox-layerGroup-1 -trailCasing" ,
149
148
style.styleLayers[topLevelRouteLayerIndex - 12 ].id
150
149
)
150
+ assertEquals(
151
+ " mapbox-layerGroup-2-restricted" ,
152
+ style.styleLayers[topLevelRouteLayerIndex - 13 ].id
153
+ )
154
+ assertEquals(
155
+ " mapbox-layerGroup-2-traffic" ,
156
+ style.styleLayers[topLevelRouteLayerIndex - 14 ].id
157
+ )
158
+ assertEquals(
159
+ " mapbox-layerGroup-2-main" ,
160
+ style.styleLayers[topLevelRouteLayerIndex - 15 ].id
161
+ )
162
+ assertEquals(
163
+ " mapbox-layerGroup-2-casing" ,
164
+ style.styleLayers[topLevelRouteLayerIndex - 16 ].id
165
+ )
166
+ assertEquals(
167
+ " mapbox-layerGroup-2-trail" ,
168
+ style.styleLayers[topLevelRouteLayerIndex - 17 ].id
169
+ )
170
+ assertEquals(
171
+ " mapbox-layerGroup-2-trailCasing" ,
172
+ style.styleLayers[topLevelRouteLayerIndex - 18 ].id
173
+ )
151
174
152
175
assertEquals(
153
176
" mapbox-layerGroup-3-restricted" ,
154
- style.styleLayers[topLevelRouteLayerIndex - 13 ].id
177
+ style.styleLayers[topLevelRouteLayerIndex - 19 ].id
155
178
)
156
179
assertEquals(
157
180
" mapbox-layerGroup-3-traffic" ,
158
- style.styleLayers[topLevelRouteLayerIndex - 14 ].id
181
+ style.styleLayers[topLevelRouteLayerIndex - 20 ].id
159
182
)
160
183
assertEquals(
161
184
" mapbox-layerGroup-3-main" ,
162
- style.styleLayers[topLevelRouteLayerIndex - 15 ].id
185
+ style.styleLayers[topLevelRouteLayerIndex - 21 ].id
163
186
)
164
187
assertEquals(
165
188
" mapbox-layerGroup-3-casing" ,
166
- style.styleLayers[topLevelRouteLayerIndex - 16 ].id
189
+ style.styleLayers[topLevelRouteLayerIndex - 22 ].id
167
190
)
168
191
assertEquals(
169
192
" mapbox-layerGroup-3-trail" ,
170
- style.styleLayers[topLevelRouteLayerIndex - 17 ].id
193
+ style.styleLayers[topLevelRouteLayerIndex - 23 ].id
171
194
)
172
195
assertEquals(
173
196
" mapbox-layerGroup-3-trailCasing" ,
174
- style.styleLayers[topLevelRouteLayerIndex - 18 ].id
197
+ style.styleLayers[topLevelRouteLayerIndex - 24 ].id
175
198
)
176
199
assertEquals(
177
200
" mapbox-bottom-level-route-layer" ,
178
- style.styleLayers[topLevelRouteLayerIndex - 19 ].id
201
+ style.styleLayers[topLevelRouteLayerIndex - 25 ].id
179
202
)
180
203
}
181
204
}
@@ -212,29 +235,53 @@ class RouteLineLayersTest : BaseTest<BasicNavigationViewActivity>(
212
235
)
213
236
)
214
237
assertEquals(
215
- " mapbox-layerGroup-1 -restricted" ,
238
+ " mapbox-masking-layer -restricted" ,
216
239
style.styleLayers[topLevelRouteLayerIndex - 1 ].id
217
240
)
218
241
assertEquals(
219
- " mapbox-layerGroup-1 -traffic" ,
242
+ " mapbox-masking-layer -traffic" ,
220
243
style.styleLayers[topLevelRouteLayerIndex - 2 ].id
221
244
)
222
245
assertEquals(
223
- " mapbox-layerGroup-1 -main" ,
246
+ " mapbox-masking-layer -main" ,
224
247
style.styleLayers[topLevelRouteLayerIndex - 3 ].id
225
248
)
226
249
assertEquals(
227
- " mapbox-layerGroup-1 -casing" ,
250
+ " mapbox-masking-layer -casing" ,
228
251
style.styleLayers[topLevelRouteLayerIndex - 4 ].id
229
252
)
230
253
assertEquals(
231
- " mapbox-layerGroup-1 -trail" ,
254
+ " mapbox-masking-layer -trail" ,
232
255
style.styleLayers[topLevelRouteLayerIndex - 5 ].id
233
256
)
234
257
assertEquals(
235
- " mapbox-layerGroup-1 -trailCasing" ,
258
+ " mapbox-masking-layer -trailCasing" ,
236
259
style.styleLayers[topLevelRouteLayerIndex - 6 ].id
237
260
)
261
+ assertEquals(
262
+ " mapbox-layerGroup-1-restricted" ,
263
+ style.styleLayers[topLevelRouteLayerIndex - 7 ].id
264
+ )
265
+ assertEquals(
266
+ " mapbox-layerGroup-1-traffic" ,
267
+ style.styleLayers[topLevelRouteLayerIndex - 8 ].id
268
+ )
269
+ assertEquals(
270
+ " mapbox-layerGroup-1-main" ,
271
+ style.styleLayers[topLevelRouteLayerIndex - 9 ].id
272
+ )
273
+ assertEquals(
274
+ " mapbox-layerGroup-1-casing" ,
275
+ style.styleLayers[topLevelRouteLayerIndex - 10 ].id
276
+ )
277
+ assertEquals(
278
+ " mapbox-layerGroup-1-trail" ,
279
+ style.styleLayers[topLevelRouteLayerIndex - 11 ].id
280
+ )
281
+ assertEquals(
282
+ " mapbox-layerGroup-1-trailCasing" ,
283
+ style.styleLayers[topLevelRouteLayerIndex - 12 ].id
284
+ )
238
285
// This mimics selecting an alternative route by making the first
239
286
// alternative the primary route and the original primary route one
240
287
// of the alternatives.
@@ -253,29 +300,53 @@ class RouteLineLayersTest : BaseTest<BasicNavigationViewActivity>(
253
300
object : CountDownTimer (1000 , 1000 ) {
254
301
override fun onFinish () {
255
302
assertEquals(
256
- " mapbox-layerGroup-2 -restricted" ,
303
+ " mapbox-masking-layer -restricted" ,
257
304
style.styleLayers[topLevelRouteLayerIndex - 1 ].id
258
305
)
259
306
assertEquals(
260
- " mapbox-layerGroup-2 -traffic" ,
307
+ " mapbox-masking-layer -traffic" ,
261
308
style.styleLayers[topLevelRouteLayerIndex - 2 ].id
262
309
)
263
310
assertEquals(
264
- " mapbox-layerGroup-2 -main" ,
311
+ " mapbox-masking-layer -main" ,
265
312
style.styleLayers[topLevelRouteLayerIndex - 3 ].id
266
313
)
267
314
assertEquals(
268
- " mapbox-layerGroup-2 -casing" ,
315
+ " mapbox-masking-layer -casing" ,
269
316
style.styleLayers[topLevelRouteLayerIndex - 4 ].id
270
317
)
271
318
assertEquals(
272
- " mapbox-layerGroup-2 -trail" ,
319
+ " mapbox-masking-layer -trail" ,
273
320
style.styleLayers[topLevelRouteLayerIndex - 5 ].id
274
321
)
275
322
assertEquals(
276
- " mapbox-layerGroup-2 -trailCasing" ,
323
+ " mapbox-masking-layer -trailCasing" ,
277
324
style.styleLayers[topLevelRouteLayerIndex - 6 ].id
278
325
)
326
+ assertEquals(
327
+ " mapbox-layerGroup-2-restricted" ,
328
+ style.styleLayers[topLevelRouteLayerIndex - 7 ].id
329
+ )
330
+ assertEquals(
331
+ " mapbox-layerGroup-2-traffic" ,
332
+ style.styleLayers[topLevelRouteLayerIndex - 8 ].id
333
+ )
334
+ assertEquals(
335
+ " mapbox-layerGroup-2-main" ,
336
+ style.styleLayers[topLevelRouteLayerIndex - 9 ].id
337
+ )
338
+ assertEquals(
339
+ " mapbox-layerGroup-2-casing" ,
340
+ style.styleLayers[topLevelRouteLayerIndex - 10 ].id
341
+ )
342
+ assertEquals(
343
+ " mapbox-layerGroup-2-trail" ,
344
+ style.styleLayers[topLevelRouteLayerIndex - 11 ].id
345
+ )
346
+ assertEquals(
347
+ " mapbox-layerGroup-2-trailCasing" ,
348
+ style.styleLayers[topLevelRouteLayerIndex - 12 ].id
349
+ )
279
350
countDownLatch.countDown()
280
351
}
281
352
@@ -332,9 +403,13 @@ class RouteLineLayersTest : BaseTest<BasicNavigationViewActivity>(
332
403
)?.visibility
333
404
)
334
405
assertEquals(
335
- " mapbox-layerGroup-1 -traffic" ,
406
+ " mapbox-masking-layer -traffic" ,
336
407
style.styleLayers[topLevelRouteLayerIndex - 1 ].id
337
408
)
409
+ assertEquals(
410
+ " mapbox-layerGroup-1-traffic" ,
411
+ style.styleLayers[topLevelRouteLayerIndex - 6 ].id
412
+ )
338
413
// This mimics selecting an alternative route by making the first
339
414
// alternative the primary route and the original primary route one
340
415
// of the alternatives.
@@ -354,24 +429,34 @@ class RouteLineLayersTest : BaseTest<BasicNavigationViewActivity>(
354
429
override fun onFinish () {
355
430
// Primary route group is now 2 and not visible
356
431
assertEquals(
357
- " mapbox-layerGroup-2 -traffic" ,
432
+ " mapbox-masking-layer -traffic" ,
358
433
style.styleLayers[topLevelRouteLayerIndex - 1 ].id
359
434
)
435
+ assertEquals(
436
+ " mapbox-layerGroup-2-traffic" ,
437
+ style.styleLayers[topLevelRouteLayerIndex - 6 ].id
438
+ )
360
439
assertEquals(
361
440
Visibility .NONE ,
362
441
style.getLayer(
363
442
style.styleLayers[topLevelRouteLayerIndex - 1 ].id
364
443
)?.visibility
365
444
)
445
+ assertEquals(
446
+ Visibility .NONE ,
447
+ style.getLayer(
448
+ style.styleLayers[topLevelRouteLayerIndex - 6 ].id
449
+ )?.visibility
450
+ )
366
451
// Previously primary route group is 1 and is now visible
367
452
assertEquals(
368
453
" mapbox-layerGroup-1-traffic" ,
369
- style.styleLayers[topLevelRouteLayerIndex - 6 ].id
454
+ style.styleLayers[topLevelRouteLayerIndex - 11 ].id
370
455
)
371
456
assertEquals(
372
457
Visibility .VISIBLE ,
373
458
style.getLayer(
374
- style.styleLayers[topLevelRouteLayerIndex - 6 ].id
459
+ style.styleLayers[topLevelRouteLayerIndex - 11 ].id
375
460
)?.visibility
376
461
)
377
462
countDownLatch.countDown()
0 commit comments