@@ -98,84 +98,102 @@ class RouteLineLayersTest : BaseTest<BasicNavigationViewActivity>(
98
98
" background"
99
99
)
100
100
)
101
-
102
101
assertEquals(
103
102
" mapbox-layerGroup-1-restricted" ,
104
103
style.styleLayers[topLevelRouteLayerIndex - 1 ].id
105
104
)
106
105
assertEquals(
107
- " mapbox-layerGroup-1 -traffic" ,
106
+ " mapbox-masking-layer -traffic" ,
108
107
style.styleLayers[topLevelRouteLayerIndex - 2 ].id
109
108
)
110
109
assertEquals(
111
- " mapbox-layerGroup-1 -main" ,
110
+ " mapbox-masking-layer -main" ,
112
111
style.styleLayers[topLevelRouteLayerIndex - 3 ].id
113
112
)
114
113
assertEquals(
115
- " mapbox-layerGroup-1 -casing" ,
114
+ " mapbox-masking-layer -casing" ,
116
115
style.styleLayers[topLevelRouteLayerIndex - 4 ].id
117
116
)
118
117
assertEquals(
119
- " mapbox-layerGroup-1 -trail" ,
118
+ " mapbox-masking-layer -trail" ,
120
119
style.styleLayers[topLevelRouteLayerIndex - 5 ].id
121
120
)
122
121
assertEquals(
123
- " mapbox-layerGroup-1 -trailCasing" ,
122
+ " mapbox-masking-layer -trailCasing" ,
124
123
style.styleLayers[topLevelRouteLayerIndex - 6 ].id
125
124
)
126
-
127
125
assertEquals(
128
- " mapbox-layerGroup-2-restricted " ,
126
+ " mapbox-layerGroup-1-traffic " ,
129
127
style.styleLayers[topLevelRouteLayerIndex - 7 ].id
130
128
)
131
129
assertEquals(
132
- " mapbox-layerGroup-2-traffic " ,
130
+ " mapbox-layerGroup-1-main " ,
133
131
style.styleLayers[topLevelRouteLayerIndex - 8 ].id
134
132
)
135
133
assertEquals(
136
- " mapbox-layerGroup-2-main " ,
134
+ " mapbox-layerGroup-1-casing " ,
137
135
style.styleLayers[topLevelRouteLayerIndex - 9 ].id
138
136
)
139
137
assertEquals(
140
- " mapbox-layerGroup-2-casing " ,
138
+ " mapbox-layerGroup-1-trail " ,
141
139
style.styleLayers[topLevelRouteLayerIndex - 10 ].id
142
140
)
143
141
assertEquals(
144
- " mapbox-layerGroup-2-trail " ,
142
+ " mapbox-layerGroup-1-trailCasing " ,
145
143
style.styleLayers[topLevelRouteLayerIndex - 11 ].id
146
144
)
147
145
assertEquals(
148
- " mapbox-layerGroup-2-trailCasing " ,
146
+ " mapbox-layerGroup-2-restricted " ,
149
147
style.styleLayers[topLevelRouteLayerIndex - 12 ].id
150
148
)
149
+ assertEquals(
150
+ " mapbox-layerGroup-2-traffic" ,
151
+ style.styleLayers[topLevelRouteLayerIndex - 13 ].id
152
+ )
153
+ assertEquals(
154
+ " mapbox-layerGroup-2-main" ,
155
+ style.styleLayers[topLevelRouteLayerIndex - 14 ].id
156
+ )
157
+ assertEquals(
158
+ " mapbox-layerGroup-2-casing" ,
159
+ style.styleLayers[topLevelRouteLayerIndex - 15 ].id
160
+ )
161
+ assertEquals(
162
+ " mapbox-layerGroup-2-trail" ,
163
+ style.styleLayers[topLevelRouteLayerIndex - 16 ].id
164
+ )
165
+ assertEquals(
166
+ " mapbox-layerGroup-2-trailCasing" ,
167
+ style.styleLayers[topLevelRouteLayerIndex - 17 ].id
168
+ )
151
169
152
170
assertEquals(
153
171
" mapbox-layerGroup-3-restricted" ,
154
- style.styleLayers[topLevelRouteLayerIndex - 13 ].id
172
+ style.styleLayers[topLevelRouteLayerIndex - 18 ].id
155
173
)
156
174
assertEquals(
157
175
" mapbox-layerGroup-3-traffic" ,
158
- style.styleLayers[topLevelRouteLayerIndex - 14 ].id
176
+ style.styleLayers[topLevelRouteLayerIndex - 19 ].id
159
177
)
160
178
assertEquals(
161
179
" mapbox-layerGroup-3-main" ,
162
- style.styleLayers[topLevelRouteLayerIndex - 15 ].id
180
+ style.styleLayers[topLevelRouteLayerIndex - 20 ].id
163
181
)
164
182
assertEquals(
165
183
" mapbox-layerGroup-3-casing" ,
166
- style.styleLayers[topLevelRouteLayerIndex - 16 ].id
184
+ style.styleLayers[topLevelRouteLayerIndex - 21 ].id
167
185
)
168
186
assertEquals(
169
187
" mapbox-layerGroup-3-trail" ,
170
- style.styleLayers[topLevelRouteLayerIndex - 17 ].id
188
+ style.styleLayers[topLevelRouteLayerIndex - 22 ].id
171
189
)
172
190
assertEquals(
173
191
" mapbox-layerGroup-3-trailCasing" ,
174
- style.styleLayers[topLevelRouteLayerIndex - 18 ].id
192
+ style.styleLayers[topLevelRouteLayerIndex - 23 ].id
175
193
)
176
194
assertEquals(
177
195
" mapbox-bottom-level-route-layer" ,
178
- style.styleLayers[topLevelRouteLayerIndex - 19 ].id
196
+ style.styleLayers[topLevelRouteLayerIndex - 24 ].id
179
197
)
180
198
}
181
199
}
@@ -216,25 +234,45 @@ class RouteLineLayersTest : BaseTest<BasicNavigationViewActivity>(
216
234
style.styleLayers[topLevelRouteLayerIndex - 1 ].id
217
235
)
218
236
assertEquals(
219
- " mapbox-layerGroup-1 -traffic" ,
237
+ " mapbox-masking-layer -traffic" ,
220
238
style.styleLayers[topLevelRouteLayerIndex - 2 ].id
221
239
)
222
240
assertEquals(
223
- " mapbox-layerGroup-1 -main" ,
241
+ " mapbox-masking-layer -main" ,
224
242
style.styleLayers[topLevelRouteLayerIndex - 3 ].id
225
243
)
226
244
assertEquals(
227
- " mapbox-layerGroup-1 -casing" ,
245
+ " mapbox-masking-layer -casing" ,
228
246
style.styleLayers[topLevelRouteLayerIndex - 4 ].id
229
247
)
230
248
assertEquals(
231
- " mapbox-layerGroup-1 -trail" ,
249
+ " mapbox-masking-layer -trail" ,
232
250
style.styleLayers[topLevelRouteLayerIndex - 5 ].id
233
251
)
234
252
assertEquals(
235
- " mapbox-layerGroup-1 -trailCasing" ,
253
+ " mapbox-masking-layer -trailCasing" ,
236
254
style.styleLayers[topLevelRouteLayerIndex - 6 ].id
237
255
)
256
+ assertEquals(
257
+ " mapbox-layerGroup-1-traffic" ,
258
+ style.styleLayers[topLevelRouteLayerIndex - 7 ].id
259
+ )
260
+ assertEquals(
261
+ " mapbox-layerGroup-1-main" ,
262
+ style.styleLayers[topLevelRouteLayerIndex - 8 ].id
263
+ )
264
+ assertEquals(
265
+ " mapbox-layerGroup-1-casing" ,
266
+ style.styleLayers[topLevelRouteLayerIndex - 9 ].id
267
+ )
268
+ assertEquals(
269
+ " mapbox-layerGroup-1-trail" ,
270
+ style.styleLayers[topLevelRouteLayerIndex - 10 ].id
271
+ )
272
+ assertEquals(
273
+ " mapbox-layerGroup-1-trailCasing" ,
274
+ style.styleLayers[topLevelRouteLayerIndex - 11 ].id
275
+ )
238
276
// This mimics selecting an alternative route by making the first
239
277
// alternative the primary route and the original primary route one
240
278
// of the alternatives.
@@ -257,25 +295,45 @@ class RouteLineLayersTest : BaseTest<BasicNavigationViewActivity>(
257
295
style.styleLayers[topLevelRouteLayerIndex - 1 ].id
258
296
)
259
297
assertEquals(
260
- " mapbox-layerGroup-2 -traffic" ,
298
+ " mapbox-masking-layer -traffic" ,
261
299
style.styleLayers[topLevelRouteLayerIndex - 2 ].id
262
300
)
263
301
assertEquals(
264
- " mapbox-layerGroup-2 -main" ,
302
+ " mapbox-masking-layer -main" ,
265
303
style.styleLayers[topLevelRouteLayerIndex - 3 ].id
266
304
)
267
305
assertEquals(
268
- " mapbox-layerGroup-2 -casing" ,
306
+ " mapbox-masking-layer -casing" ,
269
307
style.styleLayers[topLevelRouteLayerIndex - 4 ].id
270
308
)
271
309
assertEquals(
272
- " mapbox-layerGroup-2 -trail" ,
310
+ " mapbox-masking-layer -trail" ,
273
311
style.styleLayers[topLevelRouteLayerIndex - 5 ].id
274
312
)
275
313
assertEquals(
276
- " mapbox-layerGroup-2 -trailCasing" ,
314
+ " mapbox-masking-layer -trailCasing" ,
277
315
style.styleLayers[topLevelRouteLayerIndex - 6 ].id
278
316
)
317
+ assertEquals(
318
+ " mapbox-layerGroup-2-traffic" ,
319
+ style.styleLayers[topLevelRouteLayerIndex - 7 ].id
320
+ )
321
+ assertEquals(
322
+ " mapbox-layerGroup-2-main" ,
323
+ style.styleLayers[topLevelRouteLayerIndex - 8 ].id
324
+ )
325
+ assertEquals(
326
+ " mapbox-layerGroup-2-casing" ,
327
+ style.styleLayers[topLevelRouteLayerIndex - 9 ].id
328
+ )
329
+ assertEquals(
330
+ " mapbox-layerGroup-2-trail" ,
331
+ style.styleLayers[topLevelRouteLayerIndex - 10 ].id
332
+ )
333
+ assertEquals(
334
+ " mapbox-layerGroup-2-trailCasing" ,
335
+ style.styleLayers[topLevelRouteLayerIndex - 11 ].id
336
+ )
279
337
countDownLatch.countDown()
280
338
}
281
339
@@ -332,9 +390,13 @@ class RouteLineLayersTest : BaseTest<BasicNavigationViewActivity>(
332
390
)?.visibility
333
391
)
334
392
assertEquals(
335
- " mapbox-layerGroup-1 -traffic" ,
393
+ " mapbox-masking-layer -traffic" ,
336
394
style.styleLayers[topLevelRouteLayerIndex - 1 ].id
337
395
)
396
+ assertEquals(
397
+ " mapbox-layerGroup-1-traffic" ,
398
+ style.styleLayers[topLevelRouteLayerIndex - 6 ].id
399
+ )
338
400
// This mimics selecting an alternative route by making the first
339
401
// alternative the primary route and the original primary route one
340
402
// of the alternatives.
@@ -354,24 +416,34 @@ class RouteLineLayersTest : BaseTest<BasicNavigationViewActivity>(
354
416
override fun onFinish () {
355
417
// Primary route group is now 2 and not visible
356
418
assertEquals(
357
- " mapbox-layerGroup-2 -traffic" ,
419
+ " mapbox-masking-layer -traffic" ,
358
420
style.styleLayers[topLevelRouteLayerIndex - 1 ].id
359
421
)
422
+ assertEquals(
423
+ " mapbox-layerGroup-2-traffic" ,
424
+ style.styleLayers[topLevelRouteLayerIndex - 6 ].id
425
+ )
360
426
assertEquals(
361
427
Visibility .NONE ,
362
428
style.getLayer(
363
429
style.styleLayers[topLevelRouteLayerIndex - 1 ].id
364
430
)?.visibility
365
431
)
432
+ assertEquals(
433
+ Visibility .NONE ,
434
+ style.getLayer(
435
+ style.styleLayers[topLevelRouteLayerIndex - 6 ].id
436
+ )?.visibility
437
+ )
366
438
// Previously primary route group is 1 and is now visible
367
439
assertEquals(
368
440
" mapbox-layerGroup-1-traffic" ,
369
- style.styleLayers[topLevelRouteLayerIndex - 6 ].id
441
+ style.styleLayers[topLevelRouteLayerIndex - 11 ].id
370
442
)
371
443
assertEquals(
372
444
Visibility .VISIBLE ,
373
445
style.getLayer(
374
- style.styleLayers[topLevelRouteLayerIndex - 6 ].id
446
+ style.styleLayers[topLevelRouteLayerIndex - 11 ].id
375
447
)?.visibility
376
448
)
377
449
countDownLatch.countDown()
0 commit comments