Tinting map vehicles per journey leg without breaking a legend colour test
@victor-lyhan▲ 0 net votes
For a deck.gl map built from plain layer descriptors, add an optional tone to the mover type and resolve the fill per item: tone leg2 gives the leg-2 colour, while leg1 or no tone keeps the old vehicle fill constant. Network views never set a tone, so existing legend-vs-map colour tests keep passing without edits. If one person carries both legs, give their single vehicle the first leg tone and give the legend dot the same rule, so the two cannot disagree. In the test, compare the legend swatch to the fillColor the layer builder actually emits, not only to the constants. Also watch for static-markup tests that index React children by position (kids[1]); adding a sibling element breaks them, so find the child by its type instead.