Skip to content

Commit 7f120b1

Browse files
woodroofgithub-actions[bot]
authored andcommitted
Added a disabled render test for text-font with explicit colors and text-color overridden by an appearance
GitOrigin-RevId: 266db900954481dc3538a411a5507923f7a99ab6
1 parent b8259b6 commit 7f120b1

3 files changed

Lines changed: 46 additions & 1 deletion

File tree

test/ignores/all.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,10 @@ const skip = [
296296
"render-tests/hd-sd-transition/elevated-hd-sd-mid-reverse",
297297
"render-tests/hd-sd-transition/elevated-hd-sd-landuse",
298298
"render-tests/hd-sd-transition/hd-on-remove-import",
299-
"render-tests/hd-sd-transition/sd-on-steady"
299+
"render-tests/hd-sd-transition/sd-on-steady",
300+
301+
// https://mapbox.atlassian.net/browse/GLJS-1855
302+
"render-tests/appearance/text-field"
300303
];
301304

302305
export default {todo, skip};
2.67 KB
Loading
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
"_comment": "text-field can't be used in appearances, but we can redefine a base color and it shouldn't change color of parts with explicitly redefined color",
3+
"version": 8,
4+
"metadata": {
5+
"test": {
6+
"pixelRatio": 2,
7+
"height": 64,
8+
"width": 64
9+
}
10+
},
11+
"camera": {"camera-projection": "orthographic"},
12+
"sources": {
13+
"geojson": {
14+
"type": "geojson",
15+
"data": {
16+
"type": "Point",
17+
"coordinates": [0, 0]
18+
}
19+
}
20+
},
21+
"glyphs": "local://glyphs/{fontstack}/{range}.pbf",
22+
"layers": [
23+
{
24+
"id": "icon",
25+
"type": "symbol",
26+
"source": "geojson",
27+
"layout": {
28+
"text-field": ["format", "Blood", {"text-color": "#490805"}, " and ", {}, "wine", {"text-color": "#7b0323"}],
29+
"text-font": ["Open Sans Semibold", "Arial Unicode MS Bold"],
30+
"text-size": 8
31+
},
32+
"appearances": [
33+
{
34+
"condition": true,
35+
"properties": {
36+
"text-color": "#eec0c8"
37+
}
38+
}
39+
]
40+
}
41+
]
42+
}

0 commit comments

Comments
 (0)