Skip to content

Commit d6d6b94

Browse files
woodroofgithub-actions[bot]
authored andcommitted
Appearance runtime change render tests
GitOrigin-RevId: 21d5b5145f6581f5815c0919ee0df51b8157c891
1 parent 21ac385 commit d6d6b94

7 files changed

Lines changed: 204 additions & 0 deletions

File tree

test/ignores/all.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,9 @@ const skip = [
282282
// Not implemented, https://mapbox.atlassian.net/browse/GLJS-1591
283283
"render-tests/slots/inner-slot-before-outer",
284284
"render-tests/slots/mixed-slot-order-with-imports",
285+
286+
// https://mapbox.atlassian.net/browse/GLJS-1647
287+
"render-tests/appearance/runtime-changes/property-change",
285288
];
286289

287290
export default {todo, skip};
736 Bytes
Loading
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
{
2+
"version": 8,
3+
"metadata": {
4+
"test": {
5+
"height": 64,
6+
"width": 64,
7+
"operations": [
8+
["wait"],
9+
["setLayerProperty", "test_layer", "appearances",
10+
[
11+
{
12+
"condition": [">=", ["zoom"], 0],
13+
"properties": {
14+
"icon-image": "bank-12"
15+
}
16+
},
17+
{
18+
"condition": true,
19+
"properties": {
20+
"icon-image": "bakery-12"
21+
}
22+
}
23+
]
24+
]
25+
]
26+
}
27+
},
28+
"camera": {"camera-projection": "orthographic"},
29+
"sources": {
30+
"test_source": {
31+
"type": "geojson",
32+
"data": {
33+
"type": "FeatureCollection",
34+
"features": [
35+
{
36+
"type": "Feature",
37+
"geometry": {
38+
"type": "Point",
39+
"coordinates": [
40+
0,
41+
0
42+
]
43+
}
44+
}
45+
]
46+
}
47+
}
48+
},
49+
"sprite": "local://sprites/sprite",
50+
"layers": [
51+
{
52+
"id": "test_layer",
53+
"type": "symbol",
54+
"source": "test_source",
55+
"appearances": [
56+
{
57+
"condition": [">", ["zoom"], 2],
58+
"properties": {
59+
"icon-image": "bank-12"
60+
}
61+
},
62+
{
63+
"condition": true,
64+
"properties": {
65+
"icon-image": "bakery-12"
66+
}
67+
}
68+
]
69+
}
70+
]
71+
}
736 Bytes
Loading
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
{
2+
"version": 8,
3+
"metadata": {
4+
"test": {
5+
"height": 64,
6+
"width": 64,
7+
"operations": [
8+
["wait"],
9+
["setLayerProperty", "test_layer", "appearances",
10+
[
11+
{
12+
"condition": ["<", ["zoom"], 2],
13+
"properties": {
14+
"icon-image": "bank-12"
15+
}
16+
},
17+
{
18+
"condition": ["<", ["zoom"], 1],
19+
"properties": {
20+
"icon-image": "bakery-12"
21+
}
22+
}
23+
]
24+
]
25+
]
26+
}
27+
},
28+
"camera": {"camera-projection": "orthographic"},
29+
"sources": {
30+
"test_source": {
31+
"type": "geojson",
32+
"data": {
33+
"type": "FeatureCollection",
34+
"features": [
35+
{
36+
"type": "Feature",
37+
"geometry": {
38+
"type": "Point",
39+
"coordinates": [
40+
0,
41+
0
42+
]
43+
}
44+
}
45+
]
46+
}
47+
}
48+
},
49+
"sprite": "local://sprites/sprite",
50+
"layers": [
51+
{
52+
"id": "test_layer",
53+
"type": "symbol",
54+
"source": "test_source",
55+
"appearances": [
56+
{
57+
"condition": ["<", ["zoom"], 1],
58+
"properties": {
59+
"icon-image": "bakery-12"
60+
}
61+
},
62+
{
63+
"condition": ["<", ["zoom"], 2],
64+
"properties": {
65+
"icon-image": "bank-12"
66+
}
67+
}
68+
]
69+
}
70+
]
71+
}
736 Bytes
Loading
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
{
2+
"version": 8,
3+
"metadata": {
4+
"test": {
5+
"height": 64,
6+
"width": 64,
7+
"operations": [
8+
["wait"],
9+
["setLayerProperty", "test_layer", "appearances",
10+
[
11+
{
12+
"condition": ["<", ["zoom"], 1],
13+
"properties": {
14+
"icon-image": "bank-12"
15+
}
16+
}
17+
]
18+
]
19+
]
20+
}
21+
},
22+
"camera": {"camera-projection": "orthographic"},
23+
"sources": {
24+
"test_source": {
25+
"type": "geojson",
26+
"data": {
27+
"type": "FeatureCollection",
28+
"features": [
29+
{
30+
"type": "Feature",
31+
"geometry": {
32+
"type": "Point",
33+
"coordinates": [
34+
0,
35+
0
36+
]
37+
}
38+
}
39+
]
40+
}
41+
}
42+
},
43+
"sprite": "local://sprites/sprite",
44+
"layers": [
45+
{
46+
"id": "test_layer",
47+
"type": "symbol",
48+
"source": "test_source",
49+
"appearances": [
50+
{
51+
"condition": ["<", ["zoom"], 1],
52+
"properties": {
53+
"icon-image": "bakery-12"
54+
}
55+
}
56+
]
57+
}
58+
]
59+
}

0 commit comments

Comments
 (0)